/*
Theme Name: Вдвоём Journal
Author: karpaty-build.com.ua
Version: 2.0
*/

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,600;0,700;1,400&family=Work+Sans:wght@400;500;600&display=swap&subset=cyrillic,latin');

/* =========================================================
   TOKENS
   ========================================================= */
:root {
  --bg:        #f5f3ec;
  --surface:   #ffffff;
  --text:      #232a24;
  --muted:     #6d746a;
  --line:      #e0ddd2;
  --accent:    #4a6b52;
  --accent-dk: #2b3a2e;
  --accent-lt: #d8e6da;
  --ff-serif:  'Spectral', Georgia, serif;
  --ff-sans:   'Work Sans', system-ui, sans-serif;
  --col:       760px;
  --r:         10px;
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { font-family: var(--ff-serif); font-weight: 700; line-height: 1.2; color: var(--text); }

/* =========================================================
   LAYOUT WRAPPER
   ========================================================= */
.jrn-wrap {
  max-width: var(--col);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 5vw, 2rem);
}

/* =========================================================
   HEADER
   ========================================================= */
.jrn-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-block: 1.5rem 0;
  text-align: center;
}
/* wider header so the nav fits on ONE line (content stays narrow) */
.jrn-header .jrn-wrap {
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 5vw, 2rem);
}
.jrn-header .jrn-nav { flex-wrap: nowrap; white-space: nowrap; }
@media(max-width:820px){ .jrn-header .jrn-nav { flex-wrap: wrap; white-space: normal; } }
.jrn-header__brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: 1.25rem;
}
.jrn-header__brand:hover { text-decoration: none; }

/* logo helpers from functions.php */
.logo-mark { display: flex; flex-shrink: 0; }
.logo-word {
  font-family: var(--ff-serif);
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}
/* .wm-accent removed — logo uses full single-colour wordmark */

/* horizontal nav below brand */
.jrn-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 .15rem;
  border-top: 1px solid var(--line);
  padding-block: .55rem;
}
.jrn-nav a {
  font-family: var(--ff-sans);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .45rem .9rem;
  border-radius: 99px;
  transition: color .18s, background .18s;
}
.jrn-nav a:hover { color: var(--accent); background: var(--accent-lt); text-decoration: none; }

/* =========================================================
   INTRO MANIFESTO (single H1 on front page)
   ========================================================= */
.intro {
  padding-block: 3.5rem 3rem;
  background: var(--bg);
  text-align: center;
}
.intro__inner {
  max-width: 62ch;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.intro__rule {
  display: block;
  width: 2.75rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 1.6rem;
}
.intro__title {
  font-family: var(--ff-serif);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 1rem;
}
.intro__desc {
  font-family: var(--ff-sans);
  font-size: clamp(1.15rem, 3.1vw, 1.3rem);
  color: var(--muted);
  line-height: 1.7;
  max-width: 48ch;
}

/* =========================================================
   HERO FEATURED POST
   ========================================================= */
.jrn-hero { padding-block: 0 2.25rem; }
.jrn-hero__img {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--r);
  margin-bottom: 1.4rem;
}
.jrn-hero__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.jrn-hero__img:hover img { transform: scale(1.025); }
.jrn-hero__img:empty { display: none; }

.jrn-cat {
  display: inline-block;
  font-family: var(--ff-sans);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-lt);
  padding: .22em .8em;
  border-radius: 99px;
  margin-bottom: .9rem;
}
.jrn-cat:hover { text-decoration: none; color: var(--accent-dk); }

.jrn-hero__title {
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  letter-spacing: -.02em;
  margin-bottom: .8rem;
}
.jrn-hero__title a { color: inherit; }
.jrn-hero__title a:hover { color: var(--accent); text-decoration: none; }

.jrn-hero__lede {
  font-size: 1.06rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1rem;
  max-width: 62ch;
}
.jrn-hero__meta {
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.jrn-hero__meta .dot { color: var(--line); }

/* =========================================================
   DIVIDER
   ========================================================= */
.jrn-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin-block: 2.25rem;
}

/* =========================================================
   SECTION HEADING (category label inside roll)
   ========================================================= */
.jrn-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}
.jrn-sec-head h2 {
  font-family: var(--ff-sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.jrn-sec-head a {
  font-size: .78rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

/* =========================================================
   POST CARD (blog roll item)
   ========================================================= */
.jrn-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--surface);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: box-shadow .2s;
}
.jrn-card:hover { box-shadow: 0 4px 16px rgba(35,42,36,.1); }

.jrn-card__img {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.jrn-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.jrn-card:hover .jrn-card__img img { transform: scale(1.03); }
.jrn-card__img:empty { display: none; }

.jrn-card__body {
  padding: 1.4rem 1.5rem 1.5rem;
}
.jrn-card__title {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  letter-spacing: -.01em;
  margin-bottom: .55rem;
}
.jrn-card__title a { color: inherit; }
.jrn-card__title a:hover { color: var(--accent); text-decoration: none; }

.jrn-card__excerpt {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: .9rem;
}
.jrn-card__meta {
  font-size: .75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}
.jrn-card__meta .dot { color: var(--line); }

/* stack of cards */
.jrn-roll {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* =========================================================
   SECTION BLOCK (category group on front page)
   ========================================================= */
.jrn-section { margin-block: 2.5rem; }

/* =========================================================
   SINGLE ARTICLE
   ========================================================= */
.jrn-article { padding-block: 2.5rem 3rem; }

.jrn-article__img {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--r);
  margin-bottom: 1.75rem;
}
.jrn-article__img img { width: 100%; height: 100%; object-fit: cover; }
.jrn-article__img:empty { display: none; }

.jrn-article__pretitle {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .9rem;
}
.jrn-article__h1 {
  font-size: clamp(1.7rem, 5.5vw, 2.6rem);
  letter-spacing: -.025em;
  margin-bottom: 1.1rem;
}
.jrn-article__meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--muted);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}
.jrn-article__meta .dot { color: var(--line); }
.jrn-article__meta .av { border-radius: 50%; overflow: hidden; flex-shrink: 0; }

/* =========================================================
   PROSE (article body)
   ========================================================= */
.jrn-prose {
  font-family: var(--ff-serif);
  font-size: 1.08rem;
  line-height: 1.82;
  color: var(--text);
}
.jrn-prose p { margin-bottom: 1.4rem; }
.jrn-prose p:last-child { margin-bottom: 0; }
.jrn-prose h2 { font-size: 1.45rem; margin: 2.2rem 0 .75rem; }
.jrn-prose h3 { font-size: 1.2rem; margin: 1.8rem 0 .6rem; }
.jrn-prose h4 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.jrn-prose ul, .jrn-prose ol { margin: 1rem 0 1.4rem 1.4rem; }
.jrn-prose li { margin-bottom: .4rem; }
.jrn-prose img { border-radius: var(--r); margin-block: 1.6rem; }
.jrn-prose a { color: var(--accent); border-bottom: 1px solid var(--accent-lt); }
.jrn-prose a:hover { color: var(--accent-dk); border-color: var(--accent); text-decoration: none; }
.jrn-prose strong { font-weight: 700; }
.jrn-prose em { font-style: italic; }
.jrn-prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.8rem 0;
  padding: .9rem 1.4rem;
  background: var(--accent-lt);
  border-radius: 0 var(--r) var(--r) 0;
  font-style: italic;
  color: var(--accent-dk);
}
.jrn-prose blockquote p { margin-bottom: 0; }
.jrn-prose hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
.jrn-prose figure { margin: 1.6rem 0; }
.jrn-prose figcaption { font-family: var(--ff-sans); font-size: .78rem; color: var(--muted); margin-top: .5rem; text-align: center; }

/* =========================================================
   RELATED POSTS
   ========================================================= */
.jrn-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.jrn-related__label {
  font-family: var(--ff-sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.jrn-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.jrn-rel-item {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  transition: box-shadow .2s;
}
.jrn-rel-item:hover { box-shadow: 0 4px 14px rgba(35,42,36,.1); text-decoration: none; }
.jrn-rel-item__img { aspect-ratio: 3/2; overflow: hidden; }
.jrn-rel-item__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.jrn-rel-item:hover .jrn-rel-item__img img { transform: scale(1.04); }
.jrn-rel-item__title {
  font-family: var(--ff-serif);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0 .9rem .9rem;
  color: var(--text);
}

/* =========================================================
   ARCHIVE PAGE
   ========================================================= */
.jrn-page-lead {
  padding-block: 2.5rem 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.25rem;
}
.jrn-page-lead__kicker {
  display: block;
  font-family: var(--ff-sans);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}
.jrn-page-lead h1 {
  font-size: clamp(1.6rem, 5vw, 2.3rem);
  letter-spacing: -.02em;
}
.jrn-page-lead__desc {
  font-size: .95rem;
  color: var(--muted);
  margin-top: .7rem;
}

/* =========================================================
   PAGINATION
   ========================================================= */
.jrn-pager { margin-block: 2.5rem; display: flex; justify-content: center; }
.jrn-pager .nav-links { display: flex; gap: .5rem; align-items: center; }
.jrn-pager .page-numbers {
  font-family: var(--ff-sans);
  font-size: .85rem;
  font-weight: 500;
  padding: .45rem .85rem;
  border-radius: 6px;
  color: var(--muted);
  border: 1px solid var(--line);
  transition: background .15s, color .15s;
}
.jrn-pager .page-numbers.current,
.jrn-pager .page-numbers:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  text-decoration: none;
}

/* =========================================================
   FOOTER
   ========================================================= */
.jrn-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  text-align: center;
  padding-block: 2rem;
  margin-top: 3.5rem;
  font-family: var(--ff-sans);
  font-size: .78rem;
  color: var(--muted);
  line-height: 2;
}
.jrn-footer a { color: var(--accent); }
.jrn-footer a:hover { text-decoration: underline; }
.jrn-footer__row { display: block; }

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 600px) {
  .jrn-related__grid { grid-template-columns: 1fr 1fr; }
  .jrn-hero__lede { display: none; }
  .intro { padding-block: 2.25rem 1.75rem; }
  .intro__title { font-size: 1.55rem; }
  .intro__rule { margin-bottom: 1.1rem; }
  .intro__desc { font-size: 1.15rem; }
}
@media (max-width: 420px) {
  .jrn-related__grid { grid-template-columns: 1fr; }
}
