/*
Theme Name: Thangka World
Theme URI: https://thangkaworld.com/
Author: Thangka World
Author URI: https://thangkaworld.com/
Description: A museum-inspired WordPress theme for a bilingual thangka image library, Free Downloads funnel and Learn journal.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thangka-world
Tags: blog, education, custom-logo, custom-menu, featured-images, theme-options, translation-ready, wide-blocks
*/

:root {
	--paper: #f3eddf;
	--paper-deep: #e7dcc4;
	--ink: #211a16;
	--muted: #6e6257;
	--burgundy: #6b1726;
	--gold: #c49a3a;
	--navy: #14233a;
	--line: rgba(33, 26, 22, 0.18);
	--display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
	--sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
.shell { width: min(1400px, calc(100% - 80px)); margin-inline: auto; }
.content-shell { width: min(820px, calc(100% - 40px)); margin-inline: auto; padding-block: 75px 110px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed !important; z-index: 100000; top: 10px; left: 10px; width: auto; height: auto; padding: 12px 18px; clip: auto; background: #fff; color: var(--ink); }
.eyebrow { margin: 0 0 16px; color: var(--burgundy); font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; }
.utility-bar { min-height: 30px; display: grid; place-items: center; padding: 6px 20px; background: var(--ink); color: #eadcbf; font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; }

.site-header { height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 32px; border-bottom: 1px solid var(--line); }
.brand { flex: 0 0 auto; width: 265px; line-height: 0; }
.brand img, .brand .custom-logo { width: 100%; max-height: 70px; object-fit: contain; object-position: left center; }
.desktop-nav { display: flex; align-items: center; }
.desktop-nav ul, .mobile-menu ul { margin: 0; padding: 0; list-style: none; }
.desktop-nav ul { display: flex; align-items: center; gap: clamp(20px, 2.7vw, 44px); }
.desktop-nav a { display: block; padding-block: 10px; color: #4b4038; font-size: 12px; letter-spacing: 0.04em; border-bottom: 1px solid transparent; }
.desktop-nav a:hover, .desktop-nav a:focus-visible, .desktop-nav .current-menu-item > a { color: var(--burgundy); border-color: currentColor; }
.header-action, .button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 13px 20px; border: 1px solid var(--ink); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; transition: background 0.2s, color 0.2s, transform 0.2s; }
.header-action:hover, .button-outline:hover { background: var(--ink); color: var(--paper); }
.button-primary { background: var(--burgundy); border-color: var(--burgundy); color: #fff8ed; }
.button-primary:hover { background: #4f101b; color: #fff8ed; transform: translateY(-2px); }
.button-light { border-color: #eadcbf; color: #fff8ed; }
.button-light:hover { background: #eadcbf; color: var(--ink); }
.button-wide { width: 100%; }
.mobile-menu { display: none; position: relative; }

.hero { min-height: 690px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, 0.72fr); gap: 8vw; align-items: center; padding-block: 70px 84px; }
.hero h1, .page-hero h1, .article-header h1, .error-page h1 { margin: 0; font-family: var(--display); font-size: clamp(60px, 6.3vw, 102px); line-height: 0.92; font-weight: 400; letter-spacing: -0.052em; }
.hero h1 em { display: block; color: var(--burgundy); font-weight: 400; }
.hero-intro, .page-lead { max-width: 720px; margin: 30px 0 0; color: #5b5048; font-family: var(--display); font-size: 20px; line-height: 1.65; }
.button-row { margin-top: 34px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.text-button { display: inline-flex; gap: 14px; color: var(--burgundy); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.hero-stats { margin: 48px 0 0; display: flex; gap: 50px; }
.hero-stats div { display: grid; gap: 4px; }
.hero-stats dt { font-family: var(--display); font-size: 28px; }
.hero-stats dd { margin: 0; color: var(--muted); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; }
.hero-art { margin: 0; min-width: 0; }
.thangka-frame { position: relative; padding: 15px; background: var(--gold); box-shadow: 0 22px 65px rgba(53, 39, 25, 0.19); }
.thangka-frame::before { content: ""; position: absolute; inset: 7px; z-index: 1; border: 1px solid #f0d792; pointer-events: none; }
.thangka-frame img { width: 100%; height: 520px; object-fit: cover; object-position: center; border: 10px solid #2a2019; }
.hero-art figcaption { margin-top: 14px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline; color: var(--muted); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.hero-art figcaption span { color: var(--burgundy); font-weight: 800; }
.hero-art figcaption strong { color: var(--ink); font-family: var(--display); font-size: 13px; letter-spacing: 0; text-transform: none; }

.principles { border-block: 1px solid var(--line); background: rgba(255, 255, 255, 0.18); }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.principle-grid p { margin: 0; padding: 25px 35px; border-right: 1px solid var(--line); font-family: var(--display); font-size: 17px; }
.principle-grid p:last-child { border-right: 0; }
.principle-grid span { margin-right: 18px; color: var(--burgundy); font-family: var(--sans); font-size: 10px; font-weight: 800; }

.gallery-section, .journal-section > .shell { padding-block: 110px 120px; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr); gap: 80px; align-items: end; }
.section-heading h2, .download-ribbon h2, .download-copy h2, .premium-grid h2, .disclosure h2, .about-copy h2, .article-body h2, .comments-area h2 { margin: 0; font-family: var(--display); font-size: clamp(42px, 4.6vw, 70px); line-height: 1; font-weight: 400; letter-spacing: -0.035em; }
.section-heading > p { margin: 0; color: var(--muted); font-family: var(--display); font-size: 17px; line-height: 1.65; }
.art-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 46px 24px; }
.art-card { min-width: 0; }
.art-image { height: 440px; overflow: hidden; background: var(--paper-deep); }
.art-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1); }
.art-card:hover img { transform: scale(1.025); }
.art-kicker { margin: 18px 0 8px; color: var(--burgundy); font-size: 9px; font-weight: 800; letter-spacing: 0.15em; text-transform: uppercase; }
.art-card h3 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 400; }
.art-card > span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.centered-action { margin-top: 58px; display: flex; justify-content: center; }

.download-ribbon, .premium-section { background: var(--navy); color: #f4ecdf; }
.download-ribbon-inner { min-height: 260px; display: grid; grid-template-columns: 1fr auto; gap: 60px; align-items: center; }
.download-ribbon .eyebrow, .premium-section .eyebrow { color: #dab665; }
.download-ribbon h2 { max-width: 880px; font-size: clamp(40px, 4.5vw, 66px); }
.journal-section { background: var(--paper-deep); }

.post-grid { margin-top: 54px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.post-card { min-width: 0; }
.post-image { display: block; height: 260px; overflow: hidden; background: #d5c7aa; }
.post-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.post-card:hover .post-image img { transform: scale(1.025); }
.post-meta { margin-top: 17px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }
.post-meta span { color: var(--burgundy); font-weight: 800; }
.post-card h2 { margin: 13px 0 10px; font-family: var(--display); font-size: 29px; font-weight: 400; line-height: 1.08; }
.post-excerpt, .post-excerpt p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.read-link { display: inline-flex; gap: 12px; margin-top: 18px; color: var(--burgundy); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.empty-message { grid-column: 1 / -1; padding: 32px; border: 1px solid var(--line); color: var(--muted); text-align: center; }

.page-hero { padding-block: 105px 80px; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 1100px; font-size: clamp(58px, 7vw, 108px); }
.page-lead p { margin: 0; }
.download-feature, .about-grid { display: grid; grid-template-columns: minmax(360px, 0.75fr) 1fr; gap: 8vw; align-items: center; padding-block: 90px 120px; }
.download-cover img { height: 650px; }
.download-copy h2 { max-width: 760px; }
.resource-list { margin: 35px 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.resource-list li { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.resource-list strong { font-family: var(--display); font-size: 18px; font-weight: 400; }
.resource-list span { color: var(--muted); font-size: 12px; }
.microcopy { color: var(--muted); font-size: 11px; line-height: 1.5; }
.premium-grid { min-height: 360px; display: grid; grid-template-columns: 1fr 1fr; gap: 9vw; align-items: center; }
.premium-grid > div:last-child p { margin: 0 0 28px; color: #c6bdaf; font-family: var(--display); font-size: 19px; line-height: 1.65; }
.disclosure { max-width: 900px; padding-block: 105px 120px; text-align: center; }
.disclosure h2 { font-size: 52px; }
.disclosure > p:last-child { margin: 25px auto 0; color: var(--muted); font-family: var(--display); font-size: 18px; line-height: 1.75; }
.journal-index { padding-block: 25px 120px; }
.about-image img { height: 680px; }
.about-copy p:not(.eyebrow) { color: var(--muted); font-family: var(--display); font-size: 18px; line-height: 1.75; }
.about-copy .button { margin-top: 14px; }

.article { padding-block: 90px 120px; }
.article-header { max-width: 1030px; margin: 0 auto 60px; padding-inline: 20px; text-align: center; }
.article-header h1 { font-size: clamp(56px, 6.5vw, 96px); }
.article-header > p:not(.eyebrow) { max-width: 760px; margin: 25px auto; color: var(--muted); font-family: var(--display); font-size: 20px; line-height: 1.6; }
.article-header time { color: var(--muted); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.article-hero { max-width: 760px; margin: 0 auto; }
.article-hero img { height: auto; max-height: 950px; object-fit: cover; }
.article-body { max-width: 760px; margin: 80px auto 0; }
.article-body h2 { margin: 52px 0 22px; font-size: 42px; }
.article-body h3, .entry-content h3 { margin-top: 38px; font-family: var(--display); font-size: 30px; font-weight: 400; }
.article-body p, .entry-content p, .entry-content li { color: #51463f; font-family: var(--display); font-size: 19px; line-height: 1.85; }
.article-body a:not(.button), .entry-content a:not(.button) { color: var(--burgundy); text-decoration: underline; text-underline-offset: 0.18em; }
.article-body aside { margin: 75px 0; padding: 44px; border: 1px solid var(--line); background: var(--paper-deep); text-align: center; }
.article-body aside h2 { margin: 0 0 28px; }
.related { max-width: 960px; margin: 90px auto 0; padding-top: 38px; border-top: 1px solid var(--line); }
.related > div { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.related a { padding: 25px; border: 1px solid var(--line); }
.related span { display: block; margin-bottom: 8px; color: var(--burgundy); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; }
.related strong { font-family: var(--display); font-size: 22px; font-weight: 400; }
.standard-page .entry-content { min-height: 360px; }
.entry-content > * { max-width: 100%; }
.entry-content blockquote { margin: 38px 0; padding: 5px 30px; border-left: 3px solid var(--gold); }
.entry-content figure { margin: 40px 0; }
.alignwide { width: min(1100px, calc(100vw - 40px)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.wp-caption-text, figcaption { color: var(--muted); font-size: 12px; line-height: 1.5; }
.page-links, .nav-links { margin-top: 40px; display: flex; gap: 10px; justify-content: center; }
.page-numbers { display: inline-flex; min-width: 42px; min-height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); }
.page-numbers.current, .page-numbers:hover { background: var(--ink); color: var(--paper); }
.comments-area { padding-top: 0; }
.comment-list { padding-left: 22px; }
.comment-list li { margin-block: 25px; }
.comment-form input:not([type="submit"]), .comment-form textarea { width: 100%; padding: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.28); }
.comment-form .submit { min-height: 48px; padding: 13px 20px; border: 0; background: var(--burgundy); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.error-page { min-height: 620px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.error-page h1 { max-width: 980px; }
.error-page > p:not(.eyebrow) { max-width: 680px; color: var(--muted); font-family: var(--display); font-size: 20px; line-height: 1.65; }

.site-footer { padding: 72px 0 24px; background: #191512; color: #e8dfd2; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 60px; }
.footer-brand img { width: 260px; filter: brightness(1.35); }
.footer-brand p { max-width: 360px; color: #9e9389; font-family: var(--display); line-height: 1.6; }
.footer-grid > div:not(.footer-brand) { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-menu { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.footer-grid h2 { margin: 0 0 8px; color: #d2ae65; font-family: var(--sans); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; }
.footer-grid a { color: #aaa096; font-size: 12px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { margin-top: 60px; padding-top: 18px; display: flex; justify-content: space-between; border-top: 1px solid rgba(255, 255, 255, 0.12); color: #756c64; font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

@media (max-width: 1100px) {
	.desktop-nav { display: none; }
	.mobile-menu { display: block; }
	.mobile-menu summary { cursor: pointer; padding: 12px 0; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; list-style: none; }
	.mobile-menu nav { position: absolute; right: 0; top: 48px; z-index: 10; width: 240px; padding: 15px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 18px 45px rgba(33, 26, 22, 0.14); }
	.mobile-menu nav a { display: block; padding: 12px; border-bottom: 1px solid var(--line); }
	.hero { grid-template-columns: 1fr 400px; gap: 50px; }
	.art-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
	.shell { width: min(calc(100% - 40px), 700px); }
	.header-action { display: none; }
	.hero { grid-template-columns: 1fr; padding-top: 55px; }
	.hero-art { width: min(100%, 520px); }
	.section-heading, .download-ribbon-inner, .premium-grid, .download-feature, .about-grid { grid-template-columns: 1fr; gap: 38px; }
	.principle-grid { grid-template-columns: 1fr; }
	.principle-grid p { border-right: 0; border-bottom: 1px solid var(--line); }
	.post-grid { grid-template-columns: 1fr; }
	.post-image { height: 360px; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
	.shell { width: calc(100% - 28px); }
	.utility-bar { text-align: center; line-height: 1.45; }
	.site-header { height: 78px; gap: 16px; }
	.brand { width: 205px; }
	.hero h1 { font-size: 52px; }
	.hero-intro, .page-lead { font-size: 17px; }
	.hero-stats { justify-content: space-between; gap: 10px; }
	.hero-stats dt { font-size: 22px; }
	.thangka-frame { padding: 10px; }
	.thangka-frame img { height: 110vw; max-height: 560px; border-width: 7px; }
	.hero-art figcaption { grid-template-columns: 1fr; }
	.gallery-section, .journal-section > .shell { padding-block: 75px; }
	.art-grid { grid-template-columns: 1fr; }
	.art-image { height: 125vw; max-height: 620px; }
	.post-image { height: 58vw; }
	.download-ribbon-inner { padding-block: 58px; }
	.download-cover img, .about-image img { height: 120vw; max-height: 650px; }
	.resource-list li { grid-template-columns: 110px 1fr; }
	.premium-grid { padding-block: 70px; }
	.footer-grid { grid-template-columns: 1fr; }
	.footer-bottom { flex-direction: column; gap: 8px; }
	.article { padding-block: 65px 90px; }
	.article-body aside { padding: 28px 20px; }
	.related > div { grid-template-columns: 1fr; }
}
