/*
Theme Name: Validio
Theme URI: https://validio.com.ua
Description: Тёмная премиум-тема для блога о психологии отношений: сланцево-стальной графит с сапфировым акцентом, гравированная типографика Cinzel, чередующиеся широкие ряды. Чистый семантический SEO-HTML, один H1 на страницу. Без тяжёлых эффектов — быстрая загрузка.
Author: Claude Dev
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: validio
*/

/* ============================================================
   Tokens — dark premium: slate graphite + sapphire ice
   ============================================================ */
:root {
  --bg:        #171b21;
  --bg-2:      #1d222a;
  --surface:   #222831;
  --text:      #e8ecf1;
  --muted:     #9aa6b4;
  --faint:     #6e7986;
  --sapphire:  #7fb2dd;
  --sapphire-dk:#5a93c4;
  --line:      rgba(232, 236, 241, 0.12);
  --line-2:    rgba(232, 236, 241, 0.24);

  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --text-base: clamp(1rem, 0.96rem + 0.25vw, 1.08rem);
  --text-hero: clamp(2.2rem, 1.2rem + 4.6vw, 5rem);
  --text-h2:   clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem);
  --text-row:  clamp(1.5rem, 1.1rem + 1.8vw, 2.6rem);
  --text-h3:   clamp(1.2rem, 1.04rem + 0.7vw, 1.5rem);

  --space-section: clamp(3.2rem, 2.3rem + 4vw, 6rem);
  --container:  1200px;
  --container-narrow: 720px;
  --radius:     3px;

  --duration: 300ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--text-base); line-height: 1.7;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sapphire); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: #fff; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.14; letter-spacing: 0.01em; margin: 0 0 0.5em; color: #fff; }
p { margin: 0 0 1.2em; }

:focus-visible { outline: 2px solid var(--sapphire); outline-offset: 3px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 0.5rem + 3vw, 2.8rem); }
.container--narrow { max-width: var(--container-narrow); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--sapphire); color: #0e1217; padding: 0.75rem 1.25rem; z-index: 1000; font-weight: 700; }
.skip-link:focus { left: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

.eyebrow { font-family: var(--font-body); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: var(--sapphire); }
.pill { display: inline-flex; font-family: var(--font-body); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--sapphire); }

/* ============================================================
   Header
   ============================================================ */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 86px; }
.site-brand { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; display: inline-flex; align-items: center; gap: 0.6rem; }
.site-brand:hover { color: var(--sapphire); }
.site-brand__heart { width: 18px; height: 18px; color: var(--sapphire); flex: none; }
.site-brand img { max-height: 46px; width: auto; }
.main-nav ul { list-style: none; display: flex; gap: clamp(0.9rem, 0.4rem + 1.5vw, 2.2rem); margin: 0; padding: 0; }
.main-nav a { color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; padding-block: 0.4rem; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); color: var(--text); width: 46px; height: 42px; border-radius: 2px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }

/* ============================================================
   Hero (centered engraved)
   ============================================================ */
.hero { padding-block: clamp(3rem, 5vw, 6rem); border-bottom: 1px solid var(--line); }
.hero__plate { position: relative; text-align: center; border: 1px solid var(--line-2); padding: clamp(2.6rem, 5vw, 5rem) clamp(1.4rem, 4vw, 4rem); box-shadow: inset 0 0 0 1px rgba(127, 178, 221, 0.08); }
.hero__seal { position: absolute; top: -11px; left: 50%; width: 22px; height: 22px; transform: translateX(-50%) rotate(45deg); background: var(--bg); border: 1px solid var(--sapphire); }
.hero__seal::after { content: ""; position: absolute; inset: 4px; background: var(--sapphire); }
.hero__eyebrow { margin-bottom: 1.4rem; }
.hero h1 { font-size: var(--text-hero); margin: 0 auto; max-width: 20ch; font-weight: 600; }
.hero__lede { color: var(--muted); font-size: clamp(1.05rem, 1rem + 0.5vw, 1.25rem); max-width: 60ch; margin: 1.5rem auto 0; }
.hero__corners i { position: absolute; width: 12px; height: 12px; border: 1px solid var(--sapphire); }
.hero__corners i:nth-child(1) { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hero__corners i:nth-child(2) { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.hero__corners i:nth-child(3) { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.hero__corners i:nth-child(4) { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ============================================================
   Alternating wide rows (signature layout)
   ============================================================ */
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: center; padding-block: clamp(2.2rem, 1.6rem + 2.5vw, 4rem); }
.row + .row { border-top: 1px solid var(--line); }
.row__media, .row__body { grid-row: 1; }
.row__media { grid-column: 1; }
.row__body { grid-column: 2; }
.row:nth-child(even) .row__media { grid-column: 2; }
.row:nth-child(even) .row__body { grid-column: 1; }
.row__media { overflow: hidden; border: 1px solid var(--line-2); }
.row__media a, .row__media span { display: block; overflow: hidden; aspect-ratio: 3 / 2; }
.row__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
.row:hover .row__media img { transform: scale(1.04); }
.row__media-fallback { display: block; width: 100%; height: 100%; background: linear-gradient(140deg, #232a34, #161a20); }
.row__cat { display: inline-block; margin-bottom: 0.6rem; }
.row__title { font-size: var(--text-row); line-height: 1.12; margin: 0 0 0.7rem; }
.row__title a { color: #fff; }
.row__title a:hover { color: var(--sapphire); }
.row__excerpt { color: var(--muted); font-size: 1.02rem; max-width: 48ch; margin: 0; }
.row__meta { margin-top: 1rem; font-size: 0.8rem; color: var(--faint); letter-spacing: 0.05em; text-transform: uppercase; }

/* ============================================================
   Section head + grid (archive/search/related)
   ============================================================ */
.section { padding-block: var(--space-section); }
.section--tight { padding-top: clamp(1.6rem, 2vw, 2.4rem); }
.section-head { text-align: center; margin-bottom: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); }
.section-head h2, .section-head__title { font-size: var(--text-h2); margin: 0; }
.section-head__title { font-family: var(--font-display); font-weight: 600; color: #fff; }
.section-head .eyebrow { display: block; margin-bottom: 0.5rem; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: clamp(1.5rem, 1rem + 2vw, 2.6rem); }
.card { display: flex; flex-direction: column; }
.card__media { overflow: hidden; border: 1px solid var(--line-2); aspect-ratio: 3 / 2; background: var(--surface); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__media-fallback { display: block; width: 100%; height: 100%; background: linear-gradient(140deg, #232a34, #161a20); }
.card__body { padding-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.card__title { font-size: var(--text-h3); line-height: 1.18; margin: 0; }
.card__title a { color: #fff; }
.card__title a:hover { color: var(--sapphire); }
.card__excerpt { color: var(--muted); font-size: 0.95rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { font-size: 0.78rem; color: var(--faint); letter-spacing: 0.04em; text-transform: uppercase; }

/* ============================================================
   Single
   ============================================================ */
.breadcrumbs { font-size: 0.8rem; color: var(--faint); padding-block: 1.3rem; text-transform: uppercase; letter-spacing: 0.08em; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; align-items: center; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.5rem; }
.breadcrumbs li:not(:last-child)::after { content: "·"; color: var(--faint); }
.breadcrumbs a { color: var(--muted); }

.entry-header { padding-block: clamp(0.8rem, 2vw, 1.8rem) clamp(1.2rem, 2vw, 2rem); text-align: center; }
.entry-title { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.6rem); margin: 0.8rem auto 1rem; max-width: 22ch; font-weight: 600; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: center; color: var(--faint); font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.06em; }
.entry-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--sapphire); }

.entry-featured { margin: 0 0 clamp(1.8rem, 3vw, 2.8rem); border: 1px solid var(--line-2); }
.entry-featured img { width: 100%; max-height: 580px; object-fit: cover; }

.entry-content { font-size: clamp(1.06rem, 1rem + 0.4vw, 1.2rem); line-height: 1.9; color: #d4dae1; }
.entry-content > * { margin-bottom: 1.4em; }
.entry-content h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); margin: 1.8em 0 0.5em; color: #fff; }
.entry-content h3 { font-size: var(--text-h3); margin: 1.5em 0 0.4em; color: #fff; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote { border-left: 2px solid var(--sapphire); margin: 1.8em 0; padding: 0.2em 0 0.2em 1.6rem; font-family: var(--font-display); font-size: 1.4rem; line-height: 1.4; color: #fff; }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content li::marker { color: var(--sapphire); }
.entry-content figcaption { color: var(--faint); font-size: 0.86rem; text-align: center; margin-top: 0.5rem; }

.entry-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.5rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.entry-tags a { font-size: 0.8rem; color: var(--text); border: 1px solid var(--line-2); padding: 0.4rem 0.9rem; }
.entry-tags a:hover { border-color: var(--sapphire); color: #fff; }

.related { margin-top: var(--space-section); padding-top: clamp(2rem, 3vw, 3rem); border-top: 1px solid var(--line); }

/* ============================================================
   Archive / page hero
   ============================================================ */
.page-hero { padding-block: clamp(2.8rem, 4vw, 4.5rem) clamp(1.6rem, 2.5vw, 2.4rem); border-bottom: 1px solid var(--line); text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.6rem); margin: 0.5rem 0 0.5rem; font-weight: 600; }
.page-hero p { color: var(--muted); max-width: 58ch; margin: 0 auto; }

/* ============================================================
   Buttons + pagination
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.9rem 1.9rem; font-family: var(--font-body); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; }
.btn--primary { background: var(--sapphire); color: #0e1217; }
.btn--primary:hover { background: #fff; color: #0e1217; }

.pagination { margin-top: clamp(2.5rem, 4vw, 4rem); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.pagination .page-numbers { min-width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; padding-inline: 0.7rem; border: 1px solid var(--line-2); color: var(--muted); font-weight: 600; }
.pagination .page-numbers:hover { border-color: var(--sapphire); color: #fff; }
.pagination .page-numbers.current { background: var(--sapphire); color: #0e1217; border-color: var(--sapphire); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { margin-top: var(--space-section); border-top: 1px solid var(--line); background: var(--bg-2); padding-block: clamp(3rem, 5vw, 4.5rem) 2rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.site-footer__title { font-family: var(--font-body); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); margin: 0 0 1.1rem; }
.site-footer__about .site-footer__brand { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; display: block; margin-bottom: 0.6rem; }
.site-footer__about p { color: var(--muted); max-width: 38ch; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.site-footer ul a { color: var(--muted); font-size: 0.95rem; }
.site-footer ul a:hover { color: #fff; }
.site-footer__bottom { border-top: 1px solid var(--line); padding-top: 1.6rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.8rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 820px) {
  .row { grid-template-columns: 1fr; gap: 1.2rem; }
  .row__media, .row:nth-child(even) .row__media { grid-column: 1; grid-row: 1; }
  .row__body, .row:nth-child(even) .row__body { grid-column: 1; grid-row: 2; }
}
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 1rem clamp(1.1rem,0.5rem+3vw,2.8rem) 1.5rem; display: none; z-index: 50; }
  .site-header { position: relative; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0.2rem; }
  .main-nav a { display: block; padding: 0.6rem 0; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
