/* =========================================================
   Moy Yat Ving Tsun – Belo Horizonte
   Identidade: tinta sumi, papel de arroz, selo cinábrio.
   ========================================================= */

:root {
  --paper: #f4eee2;
  --paper-2: #ebe3d3;
  --paper-3: #e0d5c0;
  --ink: #16120f;
  --ink-2: #2a241f;
  --ink-soft: #5b5148;
  --line: rgba(22, 18, 15, .14);
  --seal: #b4261c;
  --seal-dark: #8e1b13;
  --gold: #a8844c;
  --jade: #3e5c50;
  --bg: var(--paper);
  --bg-alt: var(--paper-2);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --card: #fbf8f1;
  --header-bg: rgba(244, 238, 226, .86);
  --shadow: 0 1px 2px rgba(22,18,15,.06), 0 12px 32px -12px rgba(22,18,15,.18);
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --zh: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12100e; --bg-alt: #1a1714; --fg: #efe7d8; --fg-soft: #b3a796;
    --line: rgba(239,231,216,.12); --card: #1d1a16; --header-bg: rgba(18,16,14,.84);
    --paper-3: #2a251f; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 40px -16px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12100e; --bg-alt: #1a1714; --fg: #efe7d8; --fg-soft: #b3a796;
  --line: rgba(239,231,216,.12); --card: #1d1a16; --header-bg: rgba(18,16,14,.84);
  --paper-3: #2a251f; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 18px 40px -16px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 17px/1.7 var(--sans); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* textura sutil de papel */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .site-header, .site-footer { position: relative; z-index: 1; }
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--seal); text-underline-offset: 3px; }
a:hover { color: var(--seal); }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; border-radius: 4px; }
[lang="zh"] { font-family: var(--zh); }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--seal); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--fg-soft); }
.small { font-size: .85rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.18rem; color: var(--fg-soft); max-width: 62ch; }
.eyebrow {
  font: 700 .74rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  color: var(--seal); margin: 0 0 1rem; display: inline-flex; align-items: center; gap: .7rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.eyebrow-light { color: #e8c38a; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  font: 700 .92rem/1 var(--sans); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  transition: transform .2s ease, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-seal { background: var(--seal); color: #fff; box-shadow: 0 10px 24px -10px rgba(180,38,28,.7); }
.btn-seal:hover { background: var(--seal-dark); color: #fff; }
.btn-ghost { border-color: currentColor; color: var(--fg); }
.btn-ghost:hover { background: var(--fg); color: var(--bg); }
.btn-ghost-light { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--ink); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { background: #fff; color: var(--seal); }
.link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; border-bottom: 2px solid var(--seal); padding-bottom: 2px; margin-right: 1.5rem; }
.link-arrow::after { content: "→"; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Selo ---------- */
.seal {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  background: var(--seal); color: #fbeee0; font: 900 1.6rem/1 var(--zh);
  border-radius: 6px; box-shadow: inset 0 0 0 2px rgba(251,238,224,.35), inset 0 0 0 4px var(--seal);
  transform: rotate(-3deg);
}
.seal-lg { width: 72px; height: 72px; font-size: 2.6rem; }
.seal-xl { width: 120px; height: 120px; font-size: 4.4rem; margin-bottom: 1.5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line); transition: border-color .3s;
}
/* O efeito de vidro fica numa camada própria: backdrop-filter no próprio cabeçalho
   faria o menu mobile (position: fixed) ficar preso dentro dos 76px do cabeçalho. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  transition: opacity .3s;
}
.page-home .site-header:not(.is-scrolled) { border-color: transparent; color: #f4eee2; }
.page-home .site-header:not(.is-scrolled)::before { opacity: 0; }
.page-home .site-header { position: fixed; left: 0; right: 0; }
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 76px; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font: 700 1.25rem/1.1 var(--serif); letter-spacing: .01em; }
.brand-text small { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.main-nav { margin-left: auto; }
.main-nav > ul { list-style: none; display: flex; align-items: center; gap: .3rem; margin: 0; padding: 0; }
.main-nav a { display: block; padding: .55rem .8rem; text-decoration: none; font-weight: 600; font-size: .94rem; border-radius: 8px; }
.main-nav a[aria-current="page"] { color: var(--seal); }
.page-home .site-header:not(.is-scrolled) .main-nav a[aria-current="page"] { color: #e8c38a; }
.main-nav .nav-cta a { color: #fff; padding: .7rem 1.2rem; margin-left: .4rem; }
.has-sub { position: relative; }
.has-sub > a::after { content: "▾"; font-size: .7em; margin-left: .35em; opacity: .7; }
.sub {
  list-style: none; margin: 0; padding: .5rem; position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { font-weight: 500; }
.sub a:hover { background: var(--bg-alt); }
.header-tools { display: flex; gap: .3rem; }
.icon-btn { background: none; border: 0; color: inherit; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: rgba(127,127,127,.15); }
.menu-toggle { display: none; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: currentColor; margin: 2.5px 0; transition: .25s; }

@media (max-width: 1040px) {
  .menu-toggle { display: grid; align-content: center; justify-items: center; }
  .main-nav {
    position: fixed; inset: 76px 0 0 0; background: var(--bg); color: var(--fg);
    padding: 1.5rem var(--gutter) 3rem; overflow-y: auto;
    transform: translateX(100%); transition: transform .3s ease; margin: 0;
  }
  .main-nav.is-open { transform: none; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { font-size: 1.25rem; font-family: var(--serif); padding: .9rem .25rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; padding: 0 0 0 1rem; }
  .sub a { font-size: 1.05rem; }
  .has-sub > a::after { display: none; }
  .main-nav .nav-cta a { margin: 1.5rem 0 0; text-align: center; font-family: var(--sans); font-size: 1rem; border: 0; border-radius: 999px; }
  .menu-open .menu-toggle span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
  .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }
  body.menu-open { overflow: hidden; }
  .menu-open .site-header::before { opacity: 1; background: var(--bg); }
  .page-home.menu-open .site-header { color: var(--fg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(120% 90% at 75% 20%, #2c2520 0%, #14110f 55%, #0c0a09 100%);
  color: #f4eee2; overflow: hidden; isolation: isolate;
}
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .45; filter: grayscale(.3) contrast(1.05); }
.hero.has-photo::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12,10,9,.92) 0%, rgba(12,10,9,.55) 60%, rgba(12,10,9,.3) 100%); }
.hero-ink { position: absolute; inset: auto 0 0 0; height: 70%; z-index: -1; pointer-events: none; }
.hero-ink svg { width: 100%; height: 100%; }
.hero-ink .m1 { fill: rgba(244,238,226,.04); animation: drift 26s ease-in-out infinite alternate; }
.hero-ink .m2 { fill: rgba(244,238,226,.06); animation: drift 20s ease-in-out infinite alternate-reverse; }
.hero-ink .m3 { fill: rgba(12,10,9,.9); }
@keyframes drift { to { transform: translateX(-40px); } }
.hero-calligraphy {
  position: absolute; right: clamp(-20px, 4vw, 80px); top: 50%; transform: translateY(-55%);
  display: flex; flex-direction: column; font: 900 clamp(9rem, 22vw, 20rem)/.95 var(--zh);
  color: rgba(244,238,226,.07); z-index: -1; user-select: none;
}
.hero-calligraphy span { animation: brush 2.4s cubic-bezier(.2,.7,.2,1) both; }
.hero-calligraphy span + span { animation-delay: .5s; }
@keyframes brush { from { opacity: 0; filter: blur(12px); transform: translateY(30px); } to { opacity: 1; filter: none; transform: none; } }
.hero-inner { padding-top: 120px; padding-bottom: 180px; }
.hero h1 { font-size: clamp(3.6rem, 10vw, 8.5rem); line-height: .92; margin-bottom: 1.6rem; }
.hero h1 em { font-style: italic; color: #e8c38a; font-weight: 500; }
.hero-sub { font-size: clamp(1.05rem, 1.8vw, 1.3rem); max-width: 54ch; color: rgba(244,238,226,.82); }
.hero .eyebrow { color: #e8c38a; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero .btn-ghost { color: #f4eee2; }
.hero .btn-ghost:hover { background: #f4eee2; color: var(--ink); }
.hero-stats { position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid rgba(244,238,226,.14); background: rgba(12,10,9,.55); backdrop-filter: blur(6px); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-grid > div { padding: 1.3rem 1rem 1.4rem; border-left: 1px solid rgba(244,238,226,.12); }
.stats-grid > div:first-child { border-left: 0; padding-left: 0; }
.stats-grid strong { display: block; font: 600 2.6rem/1 var(--serif); color: #e8c38a; }
.stats-grid span { font-size: .82rem; color: rgba(244,238,226,.72); line-height: 1.4; display: block; margin-top: .3rem; }
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats-grid > div { padding: .9rem .8rem; border-top: 1px solid rgba(244,238,226,.08); }
  .stats-grid strong { font-size: 2rem; }
  .hero-inner { padding-bottom: 230px; }
  .hero-calligraphy { opacity: .7; right: -30px; }
}

/* ---------- Seções ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head.row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.about-media { margin: 0; position: relative; }
.about-media img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.about-media figcaption { margin-top: .9rem; font-size: .88rem; color: var(--fg-soft); }
.seal-art {
  aspect-ratio: 4/5; border-radius: var(--radius); display: grid; place-content: center; text-align: center; gap: 1rem;
  background: radial-gradient(circle at 30% 20%, #2c2520, #14110f); color: #f4eee2; box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.seal-art::after { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(232,195,138,.25); border-radius: 8px; }
.seal-stamp {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; grid-template-areas: "c a" "d b";
  width: clamp(150px, 18vw, 210px); aspect-ratio: 1; margin: 0 auto; padding: 10px; gap: 4px;
  background: var(--seal); border-radius: 8px; transform: rotate(-2deg);
  box-shadow: inset 0 0 0 3px rgba(251,238,224,.4), inset 0 0 0 7px var(--seal), 0 18px 40px -12px rgba(180,38,28,.55);
}
.seal-stamp i { font: normal 900 clamp(2.6rem, 3.6vw, 3.6rem)/1 var(--zh); color: #fbeee0; display: grid; place-items: center; }
.seal-stamp .s1 { grid-area: a; } .seal-stamp .s2 { grid-area: b; } .seal-stamp .s3 { grid-area: c; } .seal-stamp .s4 { grid-area: d; }
.seal-art-sub { font: italic 500 1.3rem var(--serif); color: #e8c38a; }
.facts { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: .7rem; }
.facts li { padding-left: 1.6rem; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 10px; background: var(--seal); transform: rotate(45deg); }

.samfaat-band { background: #14110f; color: #f4eee2; position: relative; overflow: hidden; }
.samfaat-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 10% 50%, rgba(180,38,28,.25), transparent 70%); }
.samfaat-grid { position: relative; display: grid; grid-template-columns: auto 1fr; gap: clamp(32px, 7vw, 110px); align-items: center; }
.samfaat-chars { font: 900 clamp(6rem, 14vw, 12rem)/1 var(--zh); color: var(--seal); text-shadow: 0 20px 60px rgba(180,38,28,.35); }
.samfaat-band p { color: rgba(244,238,226,.82); max-width: 62ch; }
.samfaat-band strong { color: #fff; }
@media (max-width: 760px) { .samfaat-grid { grid-template-columns: 1fr; } .samfaat-chars { display: flex; gap: .2em; } .samfaat-chars br { display: none; } }
.quote { margin: 2rem 0; padding: 1.5rem 0 1.5rem 1.8rem; border-left: 3px solid var(--seal); }
.quote p { font: italic 500 clamp(1.4rem, 2.4vw, 1.9rem)/1.35 var(--serif); color: #f4eee2 !important; margin-bottom: .6rem; }
.quote cite { font-style: normal; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: #e8c38a; }

/* Trilho de gerações */
.rail { overflow-x: auto; scroll-snap-type: x mandatory; padding: .5rem 0 2rem; scrollbar-width: thin; scrollbar-color: var(--seal) transparent; }
.rail-track { list-style: none; margin: 0; padding: 0 var(--gutter); display: flex; gap: 14px; width: max-content; position: relative; }
.rail-track::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 50%; height: 1px; background: var(--line); z-index: -1; }
.rail-item { scroll-snap-align: start; }
.rail-item a {
  display: flex; flex-direction: column; gap: .25rem; width: 200px; min-height: 230px; padding: 1.3rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: .25s;
}
.rail-item a:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--seal); color: inherit; }
.rail-gen { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--seal); font-weight: 700; }
.rail-zh { font: 700 2rem/1.2 var(--zh); margin: .4rem 0; }
.rail-name { font: 600 1.35rem/1.15 var(--serif); }
.rail-role { font-size: .82rem; color: var(--fg-soft); margin-top: auto; }
.rail-item.is-moy a { background: #1a1612; color: #f4eee2; border-color: #3a3028; }
.rail-item.is-moy .rail-role { color: #c9b9a2; }
.rail-item.is-moy .rail-zh { color: #e8c38a; }

/* Níveis */
.levels { list-style: none; padding: 0; margin: 0 0 3rem; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.level { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; position: relative; transition: .25s; }
.level:hover { border-color: var(--seal); transform: translateY(-4px); }
.level-n { font: 600 .8rem var(--sans); color: var(--seal); }
.level-zh { font: 700 1.7rem/1.2 var(--zh); margin: .3rem 0 .5rem; }
.level strong { font: 600 1.25rem/1.1 var(--serif); }
.level span:last-child { font-size: .85rem; color: var(--fg-soft); }
@media (max-width: 1000px) { .levels { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .levels { grid-template-columns: repeat(2, 1fr); } }

/* Cards de publicação */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: .25s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.card-link:hover { color: inherit; }
.card-media { position: relative; aspect-ratio: 16/10; background: #1a1612; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-placeholder { position: absolute; inset: 0; display: grid; place-items: center; font: 900 5rem var(--zh); color: var(--seal); opacity: .8; }
.chip { position: absolute; left: 14px; top: 14px; background: var(--seal); color: #fff; font-size: .72rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; letter-spacing: .04em; }
.card-body { padding: 1.3rem 1.4rem 1.6rem; }
.card-body time { font-size: .78rem; color: var(--fg-soft); letter-spacing: .06em; text-transform: uppercase; }
.card-body h3 { margin: .4rem 0 .5rem; font-size: 1.5rem; }
.card-body p { color: var(--fg-soft); font-size: .95rem; margin: 0; }

/* CTA */
.cta-band { background: var(--seal); color: #fff; padding: clamp(56px, 7vw, 90px) 0; position: relative; overflow: hidden; }
.cta-band::after { content: "訪"; position: absolute; right: -2rem; top: 50%; transform: translateY(-50%); font: 900 20rem/1 var(--zh); color: rgba(255,255,255,.07); pointer-events: none; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; position: relative; z-index: 1; }
.cta-inner h2 { margin-bottom: .3em; }
.cta-inner p { margin: 0; color: rgba(255,255,255,.85); max-width: 52ch; }
.cta-band .eyebrow-light { color: #ffe1b8; }
.cta-actions { display: flex; gap: .8rem; flex-wrap: wrap; }

/* ---------- Cabeçalho de página ---------- */
.page-head { position: relative; padding: clamp(56px, 8vw, 110px) 0 clamp(40px, 5vw, 70px); border-bottom: 1px solid var(--line); overflow: hidden; }
.page-head-zh { position: absolute; right: -1rem; top: 50%; transform: translateY(-50%); font: 900 clamp(10rem, 24vw, 22rem)/1 var(--zh); color: var(--seal); opacity: .07; pointer-events: none; }
.crumbs { font-size: .85rem; color: var(--fg-soft); margin-bottom: 1.6rem; }
.crumbs a { text-decoration: none; }

/* ---------- Prosa ---------- */
.prose-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 6vw, 80px); padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(64px, 8vw, 110px); align-items: start; }
@media (max-width: 960px) { .prose-wrap { grid-template-columns: 1fr; } }
.prose { font-size: 1.08rem; max-width: 70ch; }
.prose h2 { margin-top: 2.2em; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8em; }
.prose a { color: var(--seal); }
.prose img, .prose video { border-radius: 10px; margin: 2rem auto; }
.prose iframe.ql-video { width: 100%; aspect-ratio: 16/9; height: auto; border: 0; border-radius: 10px; margin: 2rem 0; display: block; }
.prose video { width: 100%; background: #000; }
.prose blockquote { margin: 2rem 0; padding: .3rem 0 .3rem 1.5rem; border-left: 3px solid var(--seal); font: italic 500 1.45rem/1.45 var(--serif); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li[data-list="bullet"] { list-style-type: disc; }
.prose li { margin-bottom: .4rem; }
.prose pre { background: var(--bg-alt); padding: 1rem; border-radius: 8px; overflow-x: auto; font-size: .9rem; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-justify { text-align: justify; }
.prose .ql-indent-1 { padding-left: 2em; } .prose .ql-indent-2 { padding-left: 4em; }
.prose table { border-collapse: collapse; width: 100%; } .prose td, .prose th { border: 1px solid var(--line); padding: .5rem; }
.pull { margin: 2.5rem 0; padding: 2rem; background: var(--bg-alt); border-radius: var(--radius); position: relative; }
.pull::before { content: "「"; position: absolute; left: .6rem; top: -.2rem; font: 700 3rem var(--zh); color: var(--seal); }
.pull p { font: italic 500 1.55rem/1.35 var(--serif); margin: 0 0 .6rem; }
.pull figcaption { font-size: .85rem; color: var(--fg-soft); }
.next-links { margin-top: 3rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.prose-aside { position: sticky; top: 100px; display: grid; gap: 20px; }
.aside-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; font-size: .95rem; }
.aside-card h3 { font-size: 1.25rem; }
.aside-card ul { padding-left: 1.1rem; margin: 0; } .aside-card li { margin-bottom: .5rem; }
.aside-ink { background: #14110f; color: #f4eee2; border-color: #14110f; text-align: center; }
.big-zh { font: 900 4.5rem/1 var(--zh); color: var(--seal); margin: .5rem 0 1rem; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0; }
.dl dt { font-weight: 700; color: var(--seal); } .dl dd { margin: 0; }

.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 2rem 0; }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.pillar > span { font: 900 2rem/1 var(--zh); color: var(--seal); }
.pillar h3 { margin: .6rem 0 .4rem; font-size: 1.25rem; }
.pillar p { font-size: .95rem; margin: 0; color: var(--fg-soft); }
@media (max-width: 600px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Árvore genealógica ---------- */
.tree-layout { display: grid; grid-template-columns: 360px 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.tree { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.tree::before { content: ""; position: absolute; left: 8px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(var(--line), var(--seal)); }
.tree-node { position: relative; margin-bottom: 6px; }
.tree-node::before { content: ""; position: absolute; left: -24px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--bg); border: 2px solid var(--fg-soft); transition: .2s; }
.tree-node.is-moy::before { border-color: var(--seal); }
.tree-node.is-mg::before { background: var(--seal); }
.tree-btn { width: 100%; display: grid; grid-template-columns: 92px auto 1fr; align-items: center; gap: .7rem; background: none; border: 1px solid transparent; border-radius: 10px; padding: .6rem .8rem; cursor: pointer; text-align: left; color: inherit; font: inherit; transition: .2s; }
.tree-btn:hover { background: var(--bg-alt); }
.tree-btn[aria-expanded="true"] { background: var(--card); border-color: var(--seal); box-shadow: var(--shadow); }
.tree-gen { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--seal); font-weight: 700; }
.tree-zh { font: 700 1.1rem var(--zh); }
.tree-name { font: 600 1.15rem var(--serif); }
.tree-detail { position: sticky; top: 100px; }
.tree-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.6rem, 4vw, 3rem); box-shadow: var(--shadow); position: relative; overflow: hidden; animation: cardIn .4s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }
.tree-card-zh { position: absolute; right: 1.2rem; top: .6rem; font: 900 clamp(4rem, 9vw, 7rem)/1 var(--zh); color: var(--seal); opacity: .12; writing-mode: vertical-rl; }
.tree-card h2 { font-size: clamp(2rem, 4vw, 3rem); position: relative; }
.kf-name { font: italic 500 1.2rem var(--serif); color: var(--seal); margin-top: -.6rem; }
.years { font-weight: 700; color: var(--fg-soft); letter-spacing: .06em; }
@media (max-width: 860px) {
  .tree-layout { grid-template-columns: 1fr; }
  .tree-detail { position: static; order: -1; }
  .tree-btn { grid-template-columns: 80px auto 1fr; }
}

.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 900px; }
.timeline::before { content: ""; position: absolute; left: 166px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 140px 1fr; gap: 3rem; padding: 0 0 2.2rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 160px; top: .45rem; width: 14px; height: 14px; background: var(--seal); transform: rotate(45deg); }
.timeline time { font: 700 .95rem var(--sans); color: var(--seal); text-align: right; padding-top: .1rem; }
.timeline h3 { margin-bottom: .3rem; }
.timeline p { color: var(--fg-soft); margin: 0; }
@media (max-width: 640px) {
  .timeline::before { left: 6px; } .timeline li { grid-template-columns: 1fr; gap: .3rem; padding-left: 2rem; }
  .timeline li::before { left: 0; } .timeline time { text-align: left; }
}

.family-section { background: var(--bg-alt); }
.family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin-bottom: 1.5rem; }
.family-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.family-block h3 { display: flex; flex-direction: column; gap: .2rem; font-size: 1.1rem; margin-bottom: .9rem; }
.family-block h3 time { font: 700 .75rem var(--sans); letter-spacing: .1em; color: var(--seal); }
.family-block ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.family-block li { display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; align-items: center; }
.m-zh { grid-row: span 2; font: 700 1.05rem/1.1 var(--zh); color: #fbeee0; background: var(--seal); padding: .45rem .5rem; border-radius: 5px; min-width: 3.2em; text-align: center; letter-spacing: .05em; }
.m-name { font-weight: 600; font-size: .95rem; }
.m-kf { font: italic 500 1rem var(--serif); color: var(--fg-soft); }

/* ---------- Sistema ---------- */
.levels-detail { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.level-row { display: grid; grid-template-columns: 50px 180px 1fr; gap: 1.5rem; align-items: start; padding: 1.8rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.level-row .level-n { font: 600 2rem var(--serif); }
.level-row .level-zh { font-size: 2.4rem; margin: 0; color: var(--seal); }
.level-row h2 { font-size: 1.8rem; margin-bottom: .1rem; }
.level-sub { font: italic 500 1.1rem var(--serif); color: var(--fg-soft); margin-bottom: .6rem; }
.level-row p:last-child { margin: 0; }
@media (max-width: 700px) { .level-row { grid-template-columns: auto 1fr; } .level-row > div { grid-column: 1 / -1; } }
.steps { padding-left: 1.2rem; margin: 0 0 2rem; } .steps li { margin-bottom: .8rem; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature { background: var(--card); padding: 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); }
.feature-n { font: 600 2.4rem var(--serif); color: var(--seal); }
.feature h3 { margin: .3rem 0 .4rem; }
.feature p { color: var(--fg-soft); margin: 0; font-size: .95rem; }

/* ---------- Contato / mapa ---------- */
.big-address { font: normal 500 1.35rem/1.45 var(--serif); margin: 1rem 0 1.5rem; }
.schedule { padding: 1rem 1.2rem; border-left: 3px solid var(--seal); background: var(--bg-alt); border-radius: 0 10px 10px 0; margin-bottom: 1rem; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; background: var(--bg-alt); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.4) contrast(1.05); }
.contact { align-items: start; }
.contact-cards { display: grid; gap: 12px; margin-bottom: 1rem; }
.contact-card { display: grid; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--card); transition: .2s; }
.contact-card:hover { border-color: var(--seal); transform: translateX(4px); color: inherit; }
.contact-card.wa { background: #1f6f43; color: #fff; border-color: #1f6f43; }
.contact-card.wa:hover { color: #fff; }
.cc-label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; font-weight: 700; }
.contact-card strong { font: 600 1.4rem var(--serif); }
.contact-card span:last-child { font-size: .85rem; opacity: .8; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.4rem, 4vw, 2.6rem); box-shadow: var(--shadow); }
form label { display: grid; gap: .35rem; font-size: .88rem; font-weight: 600; margin-bottom: 1rem; }
input[type=text], input[type=email], input[type=tel], input[type=search], input[type=password], input[type=url], input[type=datetime-local], select, textarea {
  width: 100%; font: 400 1rem var(--sans); color: var(--fg); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: .8rem .95rem; transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--seal); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }
.alert { background: rgba(180,38,28,.1); border: 1px solid rgba(180,38,28,.35); border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; }
.alert p { margin: 0; }
.success { text-align: center; padding: 2rem 0; } .success .seal { margin-bottom: 1.2rem; }

/* ---------- Blog ---------- */
.blog-tools { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-link { padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .88rem; font-weight: 600; }
.chip-link.is-active, .chip-link:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.search-inline input { min-width: 240px; border-radius: 999px; }
.pager { display: flex; justify-content: center; gap: 1.5rem; margin-top: 3rem; align-items: center; }
.pager a { font-weight: 700; }
.empty { text-align: center; padding: 4rem 0; color: var(--fg-soft); } .empty .seal { margin-bottom: 1rem; }

.post-head { padding: clamp(48px, 7vw, 90px) 0 2.5rem; position: relative; }
.post-head.has-cover { color: #f4eee2; padding-top: clamp(140px, 22vw, 300px); background: #14110f; overflow: hidden; }
.post-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.post-head.has-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 20%, rgba(12,10,9,.9)); }
.post-head .wrap { position: relative; z-index: 1; }
.post-head h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
.post-head.has-cover .crumbs { color: rgba(244,238,226,.75); }
.post-meta { color: var(--fg-soft); font-size: .9rem; }
.post-head.has-cover .post-meta { color: rgba(244,238,226,.8); }
.content { margin: 2.5rem 0 3rem; max-width: none; }
.content > p:first-child::first-letter { float: left; font: 700 4.2rem/.85 var(--serif); color: var(--seal); margin: .35rem .6rem 0 0; }
.share { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: 1.5rem 0 4rem; border-top: 1px solid var(--line); }
.share span { font-weight: 700; margin-right: .4rem; }
.share a, .share button { font: 600 .85rem var(--sans); padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; background: none; color: inherit; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--seal); color: var(--seal); }
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; }
.read-progress span { display: block; height: 100%; width: 0; background: var(--seal); }
.preview-bar { background: #e8c38a; color: #14110f; text-align: center; padding: .5rem; font-weight: 600; font-size: .9rem; }

/* ---------- Glossário ---------- */
.gloss-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin: 2rem 0 0; }
.gloss-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.gloss-item dt { display: flex; align-items: baseline; gap: .8rem; font: 600 1.35rem var(--serif); margin-bottom: .4rem; }
.g-zh { font: 700 1.5rem var(--zh); color: var(--seal); }
.gloss-item dd { margin: 0; color: var(--fg-soft); font-size: .95rem; }
.gloss-item[hidden] { display: none; }

/* termos vivos (marcados via JS) */
.kf-term { border-bottom: 1px dotted var(--seal); cursor: help; position: relative; }
.kf-tip {
  position: absolute; z-index: 70; max-width: 300px; background: #14110f; color: #f4eee2; padding: .9rem 1rem; border-radius: 10px;
  font: 400 .88rem/1.5 var(--sans); box-shadow: 0 16px 40px -12px rgba(0,0,0,.6); pointer-events: none;
}
.kf-tip b { display: block; font: 600 1.15rem var(--serif); color: #e8c38a; margin-bottom: .2rem; }
.kf-tip b span { font-family: var(--zh); margin-left: .4rem; color: var(--seal); }

/* ---------- Rodapé ---------- */
.site-footer { background: #0e0c0a; color: #cfc4b3; padding: 80px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; }
.footer-grid h3 { font: 700 .78rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #e8c38a; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; } .footer-grid li { margin-bottom: .45rem; }
.footer-grid a { text-decoration: none; } .footer-grid a:hover { color: #fff; }
.footer-motto { font: 700 1.4rem var(--zh); color: #f4eee2; margin: 1rem 0 .5rem; }
.footer-grid address { font-style: normal; margin-bottom: 1rem; }
.socials { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-family { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; padding: 1.4rem var(--gutter); border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.footer-family span { color: #8f8475; } .footer-family a { text-decoration: none; } .footer-family a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 1.2rem; padding-bottom: 1.6rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .82rem; color: #8f8475; }
.footer-bottom p { margin: 0; } .to-top { text-decoration: none; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom { flex-direction: column; gap: .5rem; } }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; align-items: center; gap: .6rem;
  background: #1f6f43; color: #fff; text-decoration: none; padding: .8rem; border-radius: 999px;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.5); transition: .25s;
}
.wa-float span { max-width: 0; overflow: hidden; white-space: nowrap; font-weight: 700; font-size: .9rem; transition: max-width .35s ease, padding .35s; }
.wa-float:hover { color: #fff; } .wa-float:hover span { max-width: 200px; padding-right: .5rem; }

.notfound { min-height: 60vh; display: grid; place-items: center; }

/* ---------- Animações de entrada ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (max-width: 420px) { .brand-text small { font-size: .6rem; letter-spacing: .08em; } .brand-text strong { font-size: 1.1rem; } }

/* ---------- Blocos editáveis pelo painel ---------- */
.block-about > p:first-child { font-size: 1.18rem; color: var(--fg-soft); }
.block-about > p:first-child strong { font-weight: 400; }
.block-about ul { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; gap: .7rem; }
.block-about li { padding-left: 1.6rem; position: relative; }
.block-about li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 10px; background: var(--seal); transform: rotate(45deg); }
.block a { color: var(--seal); }
.samfaat-band .block a { color: #e8c38a; }
.block-samfaat blockquote, .samfaat-band .block blockquote {
  margin: 2rem 0; padding: 1.2rem 0 1.2rem 1.8rem; border-left: 3px solid var(--seal);
  font: italic 500 clamp(1.4rem, 2.4vw, 1.9rem)/1.35 var(--serif); color: #f4eee2;
}
.block-steps ol { padding-left: 1.2rem; margin: 0 0 2rem; } .block-steps li { margin-bottom: .8rem; }
.aside-card.prose { font-size: .95rem; max-width: none; }
.aside-card.prose h3 { margin-top: 1.4rem; } .aside-card.prose h3:first-child { margin-top: 0; }
.aside-card.prose ul { padding-left: 1.1rem; }
.m-zh-empty { opacity: .35; }
