/*
Theme Name: NiceDom Journal v3
Theme URI: https://nicedom.by/
Author: NiceDom
Description: Журнальная тема NiceDom на основе визуальной системы предоставленного Elementor-примера.
Version: 3.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: nicedom-journal
*/

:root {
  --ink: #18231e;
  --muted: #66716b;
  --line: #dde2dc;
  --soft: #f4f7f3;
  --deep: #15231d;
  --green: #264f40;
  --accent: #f3d34e;
  --accent-dark: #d9b923;
  --white: #fff;
  --display: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--display); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: .18em; }
a:hover { color: #ae711d; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.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; }
.skip-link:focus { position: fixed !important; top: 15px; left: 15px; width: auto; height: auto; margin: 0; padding: .7rem 1rem; clip: auto; background: #fff; z-index: 1000; }

.site-shell { width: min(1180px, calc(100% - 42px)); margin: 0 auto; }
.site-header { position: absolute; z-index: 30; inset: 0 0 auto; color: var(--white); border-bottom: 1px solid rgba(255,255,255,.25); }
.header-row { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; white-space: nowrap; }
.brand-symbol { width: 27px; height: 27px; border: 2px solid currentColor; border-radius: 50% 50% 50% 5px; transform: rotate(-35deg); position: relative; }
.brand-symbol::after { content: ""; position: absolute; width: 12px; height: 2px; background: currentColor; left: 4px; top: 12px; transform: rotate(-19deg); }
.brand-name { font-size: 1.45rem; font-weight: 650; letter-spacing: -.03em; }
.brand-note { margin-left: 4px; color: rgba(255,255,255,.7); font-size: .67rem; letter-spacing: .14em; text-transform: uppercase; }
.main-nav ul { display: flex; align-items: center; gap: 27px; list-style: none; margin: 0; padding: 0; }
.main-nav a { color: rgba(255,255,255,.94); font-size: .92rem; text-decoration: none; }
.main-nav a:hover { color: var(--accent); }
.menu-toggle { display: none; border: 1px solid rgba(255,255,255,.55); color: var(--white); background: transparent; border-radius: 999px; padding: .45rem .72rem; font: inherit; }

.hero { min-height: 735px; position: relative; display: flex; align-items: center; background: var(--deep) center / cover no-repeat; color: var(--white); }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,19,14,.83) 0%, rgba(7,19,14,.55) 49%, rgba(7,19,14,.12) 100%); }
.hero-inner { position: relative; z-index: 1; padding: 145px 0 90px; }
.hero-copy { max-width: 770px; }
.eyebrow { margin: 0 0 17px; color: var(--accent); font-size: .74rem; font-weight: 750; letter-spacing: .17em; text-transform: uppercase; }
.hero h1 { max-width: 810px; margin: 0 0 21px; font-size: clamp(3.15rem, 7vw, 6.55rem); line-height: .97; letter-spacing: -.065em; font-weight: 650; }
.hero-lede { max-width: 610px; margin: 0 0 30px; color: rgba(255,255,255,.84); font-size: 1.12rem; line-height: 1.55; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: .7rem 1.45rem; border: 1px solid transparent; border-radius: 999px; font-size: .94rem; font-weight: 650; text-decoration: none; transition: transform .2s ease, background .2s ease, color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: #1f2a1e; }
.btn-accent:hover { background: var(--accent-dark); color: #1f2a1e; }
.btn-outline { border-color: rgba(255,255,255,.82); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.12); color: var(--white); }

.section { padding: 88px 0; }
.section-soft { background: var(--soft); }
.section-kicker { margin: 0 0 12px; color: var(--green); font-size: .74rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 36px; }
.section-head h2 { max-width: 700px; margin: 0; font-size: clamp(2.2rem, 5vw, 4.15rem); line-height: 1.02; letter-spacing: -.055em; font-weight: 650; }
.section-head p { max-width: 385px; margin: 0; color: var(--muted); }
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 70px; }
.split-media { overflow: hidden; border-radius: 2px; }
.split-media img { width: 100%; aspect-ratio: 1.1 / 1; object-fit: cover; }
.split-copy h2 { margin: 0 0 19px; font-size: clamp(2.15rem, 4vw, 3.55rem); line-height: 1.03; letter-spacing: -.055em; font-weight: 650; }
.split-copy p { color: var(--muted); }
.list { display: grid; gap: 13px; margin: 27px 0 0; padding: 0; list-style: none; }
.list li { display: flex; gap: 12px; align-items: flex-start; }
.list li::before { content: "↗"; color: var(--green); font-weight: 800; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; }
.category-grid-six { grid-template-columns: repeat(3, 1fr); }
.category-card { position: relative; min-height: 280px; overflow: hidden; color: var(--white); background: var(--deep); text-decoration: none; }
.category-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11,25,18,.8), rgba(11,25,18,.06) 70%); }
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.category-card:hover { color: var(--white); }
.category-card:hover img { transform: scale(1.05); }
.category-card-body { position: absolute; z-index: 1; right: 20px; bottom: 18px; left: 20px; }
.category-card-number { display: block; margin-bottom: 15px; color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .15em; }
.category-card strong { display: block; font-size: 1.45rem; line-height: 1.08; }

.editorial-note { padding: 37px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.editorial-note-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(230px, .7fr); gap: 50px; align-items: center; }
.editorial-note h2 { margin: 0 0 10px; font-size: clamp(1.8rem, 3vw, 2.75rem); line-height: 1.05; letter-spacing: -.045em; }
.editorial-note p { margin: 0; color: var(--muted); }
.editorial-note a { color: var(--green); font-weight: 700; }

.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card { border: 1px solid var(--line); background: var(--white); overflow: hidden; }
.article-card-media { display: block; overflow: hidden; background: var(--soft); }
.article-card-media img { width: 100%; aspect-ratio: 1.42 / 1; object-fit: cover; transition: transform .5s ease; }
.article-card:hover .article-card-media img { transform: scale(1.04); }
.article-card-body { padding: 21px 21px 24px; }
.article-card .tag { color: var(--green); font-size: .72rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.article-card h3 { margin: 9px 0 11px; font-size: 1.46rem; line-height: 1.12; letter-spacing: -.035em; }
.article-card h3 a { color: var(--ink); text-decoration: none; }
.article-card h3 a:hover { color: #ae711d; }
.article-card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.article-card .date { display: block; margin-top: 17px; color: #89938d; font-size: .76rem; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.principle { padding: 30px 28px 32px; background: var(--white); }
.principle-number { color: var(--green); font-size: .75rem; font-weight: 750; letter-spacing: .14em; }
.principle h3 { margin: 23px 0 9px; font-size: 1.4rem; line-height: 1.1; }
.principle p { margin: 0; color: var(--muted); font-size: .95rem; }

.image-grid { display: grid; grid-template-columns: 1.35fr .8fr .8fr; grid-template-rows: 215px 215px; gap: 14px; }
.image-grid figure { position: relative; min-height: 0; margin: 0; overflow: hidden; }
.image-grid figure:first-child { grid-row: 1 / 3; }
.image-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.image-grid figure:hover img { transform: scale(1.04); }
.image-grid figcaption { position: absolute; right: 15px; bottom: 13px; left: 15px; color: var(--white); font-size: .9rem; text-shadow: 0 1px 14px rgba(0,0,0,.5); }

.site-footer { position: relative; padding: 66px 0 28px; background: var(--deep) center / cover; color: rgba(255,255,255,.76); }
.site-footer::before { content: ""; position: absolute; inset: 0; background: rgba(9,24,17,.82); }
.footer-inner { position: relative; z-index: 1; }
.footer-top { display: flex; justify-content: space-between; gap: 34px; padding-bottom: 45px; border-bottom: 1px solid rgba(255,255,255,.2); }
.footer-brand { color: var(--white); font-size: 1.65rem; font-weight: 650; }
.footer-note { max-width: 420px; margin: 10px 0 0; font-size: .95rem; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 20px; padding: 0; margin: 0; list-style: none; }
.footer-nav a { color: rgba(255,255,255,.83); text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 22px; color: rgba(255,255,255,.56); font-size: .8rem; }

.archive-header { padding: 155px 0 65px; background: var(--deep); color: var(--white); }
.archive-header h1 { max-width: 850px; margin: 0; font-size: clamp(3.2rem, 7vw, 6.2rem); line-height: .95; letter-spacing: -.065em; }
.archive-description { max-width: 650px; margin: 19px 0 0; color: rgba(255,255,255,.75); font-size: 1.1rem; }
.archive-grid { padding: 70px 0 90px; }

.single-wrap { padding: 150px 0 90px; }
.article-header { max-width: 850px; margin: 0 auto 45px; text-align: center; }
.article-header h1 { margin: 14px 0 18px; font-size: clamp(3rem, 7vw, 6.25rem); line-height: .95; letter-spacing: -.065em; }
.article-meta { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: .8rem; }
.article-dek { max-width: 660px; margin: 20px auto 0; color: var(--muted); font-size: 1.15rem; }
.article-hero { max-width: 1000px; margin: 0 auto 50px; }
.article-hero img { width: 100%; max-height: 560px; object-fit: cover; }
.article-body { max-width: 700px; margin: 0 auto; font-size: 1.12rem; line-height: 1.8; }
.article-body h2, .article-body h3 { margin-top: 2.2em; line-height: 1.15; letter-spacing: -.035em; }
.article-body h2 { font-size: 1.8rem; }
.article-body h3 { font-size: 1.3rem; }
.article-body blockquote { margin: 2em 0; padding: 10px 0 10px 25px; border-left: 3px solid var(--accent); color: var(--green); font-size: 1.35rem; line-height: 1.45; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: .94rem; line-height: 1.45; }
.article-body th, .article-body td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.article-body th { background: var(--soft); color: var(--green); font-weight: 700; }
.article-body .table-scroll { overflow-x: auto; }
.article-body .key-takeaways { margin: 1.5em 0 2em; padding: 21px 25px; background: var(--soft); border-left: 3px solid var(--accent); list-style: none; }
.article-body .key-takeaways li + li { margin-top: 7px; }
.article-body .sources, .article-body .related-links { padding-left: 1.25em; }
.article-body .sources a, .article-body .related-links a { color: var(--green); }
.article-body .editorial-note { padding: 18px 20px; background: var(--soft); color: var(--muted); font-size: .95rem; }
.empty-editorial { grid-column: 1 / -1; padding: 34px; background: var(--soft); border: 1px solid var(--line); }
.empty-editorial h3 { margin-top: 0; }

@media (max-width: 900px) {
  .site-shell { width: min(100% - 30px, 700px); }
  .header-row { min-height: 76px; }
  .brand-note { display: none; }
  .menu-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; top: 76px; left: 15px; right: 15px; padding: 12px; border: 1px solid rgba(255,255,255,.28); background: rgba(18,35,27,.98); box-shadow: 0 15px 35px rgba(0,0,0,.22); }
  .main-nav.is-open { display: block; }
  .main-nav ul { display: grid; gap: 0; }
  .main-nav a { display: block; padding: 11px 8px; }
  .hero { min-height: 680px; }
  .hero-inner { padding: 125px 0 80px; }
  .split { grid-template-columns: 1fr; gap: 35px; }
  .split-media { order: 2; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .category-grid-six { grid-template-columns: 1fr 1fr; }
  .article-grid { grid-template-columns: 1fr 1fr; }
  .editorial-note-inner { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 63px 0; }
  .hero h1 { font-size: clamp(3rem, 16vw, 4.9rem); }
  .hero-lede { font-size: 1rem; }
  .section-head { display: block; }
  .section-head p { margin-top: 15px; }
  .category-grid, .category-grid-six, .article-grid, .principles { grid-template-columns: 1fr; }
  .category-card { min-height: 225px; }
  .image-grid { display: block; }
  .image-grid figure { height: 235px; margin-bottom: 14px; }
  .footer-top, .footer-bottom { display: block; }
  .footer-nav { margin-top: 22px; }
  .footer-bottom p + p { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
