/*
Theme Name: Мой новый путь
Theme URI: https://mynewway.ru/
Author: Татьяна
Description: Светлая редакционная тема для личного блога о новой жизни.
Version: 1.1.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: mynewway
*/

@font-face {
  font-family: "Onest";
  src: url("assets/fonts/Onest-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --soft: #f2f1ee;
  --quiet: #e8efe8;
  --ink: #121212;
  --muted: #656565;
  --line: #d7d7d3;
  --accent: #db473b;
  --accent-dark: #aa2f27;
  --content: 1280px;
  --reading: 780px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Onest", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-color: rgba(219,71,59,.55); text-underline-offset: .18em; }
a:hover { color: var(--accent-dark); }
button, input, textarea { font: inherit; }
::selection { color: #fff; background: var(--accent); }
:focus-visible { outline: 3px solid rgba(219,71,59,.35); outline-offset: 3px; }

.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 { width: auto; height: auto; padding: 10px 14px; margin: 8px; clip: auto; background: #fff; z-index: 10000; }

.wrap { width: min(calc(100% - 64px), var(--content)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.site-branding { display: flex; align-items: baseline; gap: 12px; min-width: max-content; }
.site-title { margin: 0; font-size: 30px; font-weight: 850; line-height: 1; }
.site-title a { text-decoration: none; }
.site-mark { color: var(--accent); font-size: 13px; font-weight: 800; line-height: 1; text-transform: uppercase; }
.site-description { margin: 0; color: var(--muted); font-size: 13px; }

.menu-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { content: ""; display: block; width: 23px; height: 2px; margin: 5px auto; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span { opacity: 0; }
.menu-toggle[aria-expanded="true"]::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"]::after { transform: translateY(-7px) rotate(-45deg); }
.primary-menu { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.primary-menu a, .primary-menu span { color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.primary-menu a:hover { color: var(--ink); }
.primary-menu span[aria-current="page"] { color: var(--ink); font-weight: 800; }

.intro { padding: 104px 0 66px; border-bottom: 2px solid var(--ink); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 88px; align-items: end; }
.intro h1 { max-width: 900px; margin: 0; font-size: 96px; font-weight: 850; line-height: .98; letter-spacing: 0; overflow-wrap: anywhere; text-wrap: balance; }
.intro h1 em { color: var(--accent); font-style: normal; font-weight: 850; }
.intro-note { margin: 0 0 7px; color: #3f3f3f; font-size: 17px; line-height: 1.55; }
.intro-note strong { display: block; margin-bottom: 16px; color: var(--ink); font-size: 14px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 88px; padding-block: 72px 112px; align-items: start; }
.main-content { min-width: 0; }
.section-title, .archive-title { margin: 0 0 48px; font-size: 34px; font-weight: 800; line-height: 1.1; }

.post-card { max-width: 860px; padding: 0 0 50px; margin: 0 0 50px; border-bottom: 2px solid var(--ink); }
.post-card:last-child { margin-bottom: 0; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 16px; color: var(--muted); font-size: 13px; font-weight: 700; text-transform: uppercase; }
.post-card h2 { margin: 0 0 18px; font-size: 50px; font-weight: 800; line-height: 1.05; letter-spacing: 0; overflow-wrap: anywhere; text-wrap: balance; }
.post-card h2 a { text-decoration: none; }
.post-excerpt { max-width: 680px; margin: 0; color: #454545; font-size: 18px; line-height: 1.6; }
.read-more { display: inline-block; margin-top: 22px; color: var(--accent-dark); font-size: 15px; font-weight: 750; text-decoration: none; }
.read-more::after { content: " →"; }

.sidebar { position: sticky; top: 118px; display: grid; gap: 48px; }
.widget { margin: 0; }
.widget-title { margin: 0 0 18px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); font-size: 14px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; line-height: 1.45; }
.widget li a { text-decoration: none; }
.author-block { display: grid; gap: 18px; }
.author-photo { display: grid; place-items: center; aspect-ratio: 5 / 4; overflow: hidden; background: var(--soft); color: var(--accent); font-size: 84px; font-weight: 850; }
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-block p { margin: 0; color: #454545; font-size: 15px; line-height: 1.62; }
.author-name { color: var(--ink); font-size: 27px; font-weight: 800; }

.search-form { display: flex; border-bottom: 1px solid var(--ink); }
.search-field { width: 100%; min-width: 0; padding: 12px 0; border: 0; color: var(--ink); background: transparent; }
.search-field::placeholder { color: #777c79; }
.search-submit { width: 44px; border: 0; background: transparent; color: var(--accent-dark); font-weight: 700; cursor: pointer; }
.subscribe { padding: 28px; background: var(--quiet); }
.subscribe p { margin: 0 0 16px; color: #4e5350; font-size: 14px; }
.subscribe-form { display: grid; gap: 10px; }
.subscribe-form input[type="email"] { width: 100%; padding: 11px 12px; border: 1px solid #c9cbc8; border-radius: 0; background: #fff; }
.button, .subscribe-form button, input[type="submit"] { min-height: 44px; padding: 10px 18px; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: #fff; font-weight: 700; cursor: pointer; }
.button:hover, .subscribe-form button:hover, input[type="submit"]:hover { border-color: var(--accent-dark); background: var(--accent-dark); color: #fff; }
.subscribe-form button:disabled, .subscribe-form input:disabled { cursor: not-allowed; opacity: .58; }

.entry-header { max-width: 1040px; padding: 104px 0 52px; }
.entry-title { margin: 0 0 26px; font-size: 82px; font-weight: 850; line-height: 1; letter-spacing: 0; overflow-wrap: anywhere; text-wrap: balance; }
.entry-cover { width: 100%; max-height: 680px; object-fit: cover; margin-bottom: 52px; }
.entry-content { max-width: var(--reading); font-size: 21px; line-height: 1.7; }
.entry-content > * { max-width: 100%; }
.entry-content h2, .entry-content h3 { margin: 2.2em 0 .7em; line-height: 1.2; }
.entry-content blockquote { margin: 2em 0; padding: 0 0 0 24px; border-left: 1px solid var(--accent); color: #444945; font-size: 1.15em; }
.entry-content figcaption { color: var(--muted); font-size: 13px; }
.entry-footer { max-width: var(--reading); margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 46px; }
.pagination a, .pagination span { display: grid; place-items: center; min-width: 42px; min-height: 42px; padding: 6px 12px; border: 1px solid var(--line); text-decoration: none; }
.pagination .current { color: #fff; background: var(--ink); border-color: var(--ink); }
.empty-state { max-width: 650px; padding: 54px 0; }
.empty-state h2 { margin: 0 0 14px; font-size: 42px; font-weight: 800; line-height: 1.08; }
.empty-state p { color: var(--muted); }

.comments-area { max-width: var(--reading); margin-top: 64px; padding-top: 38px; border-top: 1px solid var(--line); }
.comment-list { padding: 0; list-style: none; }
.comment-body { padding: 22px 0; border-bottom: 1px solid var(--line); }
textarea, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] { width: 100%; padding: 11px 12px; border: 1px solid #c9cbc8; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; padding-block: 34px; color: var(--muted); font-size: 13px; }
.footer-inner p { margin: 0; }

@media (max-width: 1180px) {
  body.admin-bar .site-header { top: 46px; }
  .wrap { width: min(calc(100% - 36px), var(--content)); }
  .header-inner { min-height: 70px; }
  .site-description { display: none; }
  .menu-toggle { display: block; }
  .main-navigation { position: absolute; inset: 70px 0 auto; display: none; padding: 14px 18px 22px; border-bottom: 1px solid var(--line); background: #fff; }
  .main-navigation.is-open { display: block; }
  .primary-menu { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-menu a, .primary-menu span { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .intro-grid, .layout { grid-template-columns: minmax(0, 1fr); }
  .intro { padding-top: 76px; }
  .intro h1 { font-size: 68px; }
  .entry-title { font-size: 60px; }
  .intro-grid { gap: 30px; }
  .intro-note { max-width: 570px; }
  .layout { gap: 76px; }
  .sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px 30px; padding-top: 42px; border-top: 1px solid var(--line); }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { width: min(calc(100% - 28px), var(--content)); }
  .header-inner { min-height: 66px; }
  .main-navigation { inset: 66px 0 auto; }
  .site-title { font-size: 24px; }
  .site-mark { display: none; }
  .intro { padding: 52px 0 42px; }
  .intro h1 { font-size: 46px; line-height: 1.01; }
  .intro-note { font-size: 16px; }
  .layout { padding-block: 48px 76px; }
  .post-card { padding-bottom: 36px; margin-bottom: 36px; }
  .post-card h2 { font-size: 34px; line-height: 1.08; }
  .post-excerpt { font-size: 17px; }
  .sidebar { grid-template-columns: 1fr; }
  .section-title, .archive-title { margin-bottom: 34px; font-size: 30px; }
  .entry-header { padding: 56px 0 34px; }
  .entry-title { font-size: 44px; }
  .entry-content { font-size: 19px; line-height: 1.68; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
