/*
Theme Name: DaoGen Life
Theme URI: https://daogenlife.com/
Author: DaoGen Life
Description: A calm editorial WordPress theme for traditional Chinese wellness culture, movement, philosophy, research, and stories.
Version: 1.1.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: daogen-life
*/

:root {
  --ink: #19221f;
  --ink-soft: #46534e;
  --paper: #f7f3e9;
  --paper-deep: #ede6d7;
  --pine: #29483b;
  --pine-deep: #173128;
  --jade: #789383;
  --cinnabar: #a5472d;
  --gold: #c7a66a;
  --white: #fffdf7;
  --line: rgba(25, 34, 31, .14);
  --shadow: 0 24px 70px rgba(21, 35, 29, .12);
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", "Noto Serif", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 40px)); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--cinnabar); font-size: .76rem; font-weight: 750;
  letter-spacing: .18em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.section { padding: 104px 0; }
.section--compact { padding: 72px 0; }
.section--dark { background: var(--pine-deep); color: var(--white); }
.section--white { background: var(--white); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 44px; }
.section-head h2, .entry-title, .page-hero h1 {
  margin: 10px 0 0; font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -.035em;
}
.section-head h2 { max-width: 720px; font-size: clamp(2.2rem, 5vw, 4.6rem); }
.section-head p { max-width: 480px; margin: 0; color: var(--ink-soft); }
.section--dark .section-head p { color: rgba(255,255,255,.7); }
.text-link { color: var(--cinnabar); font-weight: 700; text-decoration: none; }
.text-link::after { content: " →"; }

.site-header {
  position: sticky; z-index: 50; top: 0; border-bottom: 1px solid rgba(255,255,255,.11);
  background: rgba(23,49,40,.94); color: var(--white); backdrop-filter: blur(14px);
}
.header-inner { min-height: 78px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 13px; color: inherit; text-decoration: none; white-space: nowrap; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.48);
  border-radius: 50% 50% 48% 52%; font-family: var(--serif); font-size: 1.12rem; color: #efd8aa;
}
.brand-copy strong { display: block; font-family: var(--serif); font-size: 1.18rem; font-weight: 500; letter-spacing: .04em; line-height: 1.1; }
.brand-copy span { display: block; margin-top: 4px; opacity: .62; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: clamp(13px, 2vw, 27px); margin: 0; padding: 0; list-style: none; }
.primary-nav a { color: rgba(255,255,255,.8); font-size: .82rem; font-weight: 650; text-decoration: none; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: #fff; }
.menu-toggle { display: none; margin-left: auto; border: 0; background: none; color: #fff; font-size: 1.45rem; }

.hero {
  min-height: 690px; position: relative; display: grid; align-items: center; overflow: hidden;
  background-color: #6d745f; background-size: cover; background-position: center;
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(19,33,27,.9) 0%, rgba(19,33,27,.62) 39%, rgba(19,33,27,.08) 75%); }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 120px; background: linear-gradient(transparent, rgba(16,29,24,.35)); }
.hero-content { position: relative; z-index: 1; max-width: 720px; padding: 90px 0 110px; color: var(--white); }
.hero .eyebrow { color: #e8c986; }
.hero h1 { margin: 22px 0; font-family: var(--serif); font-weight: 500; font-size: clamp(3.5rem, 7vw, 7rem); line-height: .97; letter-spacing: -.045em; }
.hero p { max-width: 620px; margin: 0; color: rgba(255,255,255,.82); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 23px;
  border: 1px solid var(--pine); background: var(--pine); color: #fff; font-size: .83rem; font-weight: 750;
  letter-spacing: .04em; text-decoration: none; transition: transform .2s, background .2s;
}
.button:hover { transform: translateY(-2px); background: #203c31; }
.button--light { border-color: var(--white); background: var(--white); color: var(--pine-deep); }
.button--ghost { border-color: rgba(255,255,255,.5); background: transparent; }

.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pillar-card {
  min-height: 410px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 30px; border: 1px solid var(--line); background: var(--white); text-decoration: none; box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.pillar-card::before { content: attr(data-mark); position: absolute; top: 5px; right: 14px; color: var(--paper-deep); font-family: var(--serif); font-size: 8.7rem; line-height: 1; transition: color .25s, transform .25s; }
.pillar-card::after { content: ""; position: absolute; inset: 0; border-top: 4px solid var(--cinnabar); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.pillar-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.pillar-card:hover::after { transform: scaleX(1); }
.pillar-card:hover::before { color: #e8dfcf; transform: translateY(4px); }
.pillar-card .number { position: relative; color: var(--cinnabar); font-size: .72rem; letter-spacing: .12em; }
.pillar-card h3 { position: relative; margin: 14px 0 4px; font-family: var(--serif); font-size: 2rem; font-weight: 500; line-height: 1.05; }
.pillar-card .chinese { position: relative; color: var(--jade); font-family: var(--serif); font-size: 1rem; }
.pillar-card p { position: relative; margin: 22px 0 0; color: var(--ink-soft); font-size: .89rem; line-height: 1.65; }

.feature-split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 75px; align-items: center; }
.ink-panel { min-height: 510px; position: relative; display: grid; place-items: center; overflow: hidden; background: #dcd6c7; }
.ink-panel::before, .ink-panel::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); }
.ink-panel::before { width: 420px; height: 420px; right: -80px; bottom: -160px; background: rgba(41,72,59,.2); }
.ink-panel::after { width: 300px; height: 300px; left: -110px; top: -120px; background: rgba(165,71,45,.12); }
.ink-symbol { position: relative; z-index: 1; font-family: var(--serif); font-size: 11rem; font-weight: 400; color: var(--pine-deep); text-shadow: 22px 20px 0 rgba(255,255,255,.25); }
.feature-copy h2 { margin: 14px 0 25px; font-family: var(--serif); font-size: clamp(2.5rem, 4.3vw, 4.5rem); line-height: 1.04; font-weight: 500; letter-spacing: -.04em; }
.feature-copy p { color: var(--ink-soft); }
.topic-list { margin: 30px 0 34px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.topic-list li { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.topic-list span { color: var(--jade); }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.article-card { border-top: 1px solid var(--line); padding-top: 22px; }
.article-card .meta, .entry-meta { color: var(--cinnabar); font-size: .72rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.article-card h3 { margin: 13px 0 12px; font-family: var(--serif); font-size: 1.75rem; font-weight: 500; line-height: 1.2; }
.article-card h3 a { text-decoration: none; }
.article-card p { color: var(--ink-soft); font-size: .9rem; }

.research-band { background: var(--pine-deep); color: var(--white); }
.research-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; align-items: start; }
.research-grid h2 { margin: 12px 0 24px; font-family: var(--serif); font-size: clamp(2.4rem, 4vw, 4rem); font-weight: 500; line-height: 1.05; }
.research-grid p { color: rgba(255,255,255,.7); }
.research-items { display: grid; gap: 12px; }
.research-item { padding: 24px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.035); }
.research-item h3 { margin: 0 0 7px; font-family: var(--serif); font-size: 1.4rem; font-weight: 500; }
.research-item p { margin: 0; font-size: .85rem; }

.page-hero { padding: 116px 0 76px; background: var(--paper-deep); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 900px; font-size: clamp(3rem, 7vw, 6.5rem); }
.page-hero .lede { max-width: 760px; margin: 24px 0 0; color: var(--ink-soft); font-family: var(--serif); font-size: 1.3rem; }
.page-hero .chinese-title { display: block; margin-top: 10px; color: var(--cinnabar); font-family: var(--serif); font-size: 1.2rem; }
.topic-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 80px; }
.topic-aside { position: sticky; top: 105px; align-self: start; }
.topic-aside strong { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.topic-aside ul { margin: 18px 0 0; padding: 0; list-style: none; }
.topic-aside a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: .86rem; text-decoration: none; }
.entry-content { font-family: var(--serif); font-size: 1.14rem; }
.entry-content > * { max-width: 760px; }
.entry-content h2, .entry-content h3 { color: var(--ink); font-weight: 500; line-height: 1.2; }
.entry-content h2 { margin: 2.3em 0 .65em; font-size: 2.15rem; }
.entry-content h3 { margin: 1.8em 0 .5em; font-size: 1.5rem; }
.entry-content p { margin: 0 0 1.35em; }
.entry-content blockquote { margin: 2em 0; padding: 8px 0 8px 28px; border-left: 3px solid var(--cinnabar); color: var(--ink-soft); font-size: 1.3rem; }
.entry-content .wp-block-image, .entry-content figure { max-width: 100%; }
.topic-section { margin-bottom: 54px; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.topic-section h2 { margin-top: 0; }
.topic-links { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin-top: 24px; }
.topic-link { padding: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.48); font-family: var(--sans); font-size: .9rem; text-decoration: none; }
.topic-link:hover { border-color: var(--cinnabar); color: var(--cinnabar); }

.post-header { padding: 100px 0 58px; }
.post-header .entry-title { max-width: 920px; font-size: clamp(2.8rem, 6vw, 5.4rem); }
.post-header .entry-meta { margin-bottom: 18px; }
.post-shell { display: grid; grid-template-columns: minmax(0,760px) 250px; justify-content: center; gap: 80px; padding-bottom: 110px; }
.notice { padding: 20px; border: 1px solid #d2c7af; background: #f1eadb; color: #5a554a; font-size: .78rem; line-height: 1.55; }
.post-sidebar { position: sticky; top: 110px; align-self: start; }
.post-sidebar h3 { margin: 0 0 12px; font-family: var(--serif); font-weight: 500; }

.site-footer { padding: 76px 0 30px; background: #101f1a; color: rgba(255,255,255,.7); }
.footer-grid { display: grid; grid-template-columns: 1.4fr .7fr .7fr; gap: 70px; }
.footer-brand p { max-width: 500px; }
.footer-title { color: #fff; font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; }
.footer-links { margin: 18px 0 0; padding: 0; list-style: none; }
.footer-links a { display: inline-block; padding: 4px 0; color: rgba(255,255,255,.68); font-size: .86rem; text-decoration: none; }
.footer-bottom { margin-top: 64px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: .72rem; }

.pagination { display: flex; gap: 10px; justify-content: center; margin-top: 55px; }
.pagination .page-numbers { min-width: 40px; padding: 7px 11px; border: 1px solid var(--line); text-align: center; text-decoration: none; }
.pagination .current { background: var(--pine); color: #fff; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

@media (max-width: 980px) {
  .menu-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 78px; left: 0; right: 0; padding: 18px 20px 24px; background: var(--pine-deep); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-nav a { display: block; padding: 9px 0; }
  .pillar-grid { grid-template-columns: 1fr 1fr; }
  .feature-split, .research-grid, .topic-layout, .post-shell { grid-template-columns: 1fr; gap: 48px; }
  .topic-aside, .post-sidebar { position: static; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .container, .narrow { width: min(100% - 28px, 1180px); }
  .brand-copy span { display: none; }
  .section { padding: 72px 0; }
  .section-head { display: block; }
  .section-head p { margin-top: 18px; }
  .hero { min-height: 660px; background-position: 63% center; }
  .hero::before { background: linear-gradient(90deg, rgba(17,31,25,.92), rgba(17,31,25,.5)); }
  .hero h1 { font-size: clamp(3.1rem, 15vw, 4.9rem); }
  .pillar-grid, .article-grid, .topic-links, .footer-grid { grid-template-columns: 1fr; }
  .pillar-card { min-height: 320px; }
  .ink-panel { min-height: 370px; }
  .ink-symbol { font-size: 8rem; }
  .page-hero { padding: 84px 0 58px; }
  .footer-grid { gap: 36px; }
}
