/*
Theme Name: Ноктюрн Columns
Author: cantabile.com.ua
Version: 2.0
*/

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

/* =====================================================================
   DESIGN TOKENS
   ===================================================================== */
:root {
  --bg:        #faf3f0;
  --surface:   #fffdfc;
  --accent:    #b06a86;
  --plum:      #8a5a72;
  --text:      #3a2b32;
  --muted:     #8f7680;
  --line:      #efe0e2;
  --chip-bg:   #f5e6ec;

  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'DM Sans', system-ui, sans-serif;

  --r-card: 18px;
  --r-img:  14px;
  --shadow: 0 4px 24px rgba(176,106,134,.10);
  --shadow-hover: 0 8px 36px rgba(176,106,134,.18);

  --w-content: 780px;
  --w-wide: 1180px;
  --gap: 28px;
}

/* =====================================================================
   RESET & BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--line); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text);
}

/* =====================================================================
   LAYOUT WRAPPER
   ===================================================================== */
.cjl-wrap {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* =====================================================================
   HEADER
   ===================================================================== */
.cjl-header {
  background: var(--surface);
  border-bottom: 1.5px solid var(--line);
  padding: 28px 24px 20px;
  text-align: center;
}

.cjl-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  margin-bottom: 18px;
}
.cjl-brand:hover { text-decoration: none; }

.logo-mark svg { flex-shrink: 0; }

.logo-word {
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--text);
  letter-spacing: -.01em;
}
.logo-word .wm-accent { color: var(--accent); }

.cjl-tagline {
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: 20px;
  letter-spacing: .02em;
}

/* Navigation */
.cjl-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
}
.cjl-nav a {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  text-decoration: none;
}
.cjl-nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

/* Decorative divider below header */
.cjl-header-rule {
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 40%, var(--plum) 60%, transparent 100%);
  opacity: .35;
}

/* =====================================================================
   CATEGORY CHIP
   ===================================================================== */
.cjl-chip {
  display: inline-block;
  background: var(--chip-bg);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 20px;
  text-decoration: none;
  line-height: 1;
  transition: background .2s, color .2s;
}
.cjl-chip:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* =====================================================================
   FRONT PAGE — INTRO BLOCK (editorial manifesto, single H1)
   ===================================================================== */
.cjl-intro {
  text-align: center;
  padding: 56px 24px 52px;
  background: var(--surface);
  border-bottom: 1.5px solid var(--line);
}

.cjl-intro__inner {
  max-width: 62ch;
  margin: 0 auto;
}

.cjl-intro__rule {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 0 auto 28px;
  opacity: .85;
}

.cjl-intro__title {
  font-family: var(--serif);
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  font-weight: 400;
  line-height: 1.28;
  color: var(--text);
  letter-spacing: -.015em;
  margin-bottom: 18px;
}

.cjl-intro__desc {
  font-size: 1.3rem;
  color: var(--muted);
  line-height: 1.65;
  letter-spacing: .01em;
}

@media (max-width: 640px) {
  .cjl-intro { padding: 36px 20px 32px; }
  .cjl-intro__title { font-size: 1.45rem; }
  .cjl-intro__desc { font-size: 1.05rem; }
  .cjl-intro__rule { margin-bottom: 20px; }
}

/* =====================================================================
   FRONT PAGE — HERO / FEATURED
   ===================================================================== */
.cjl-hero {
  max-width: var(--w-wide);
  margin: 52px auto 44px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}

.cjl-hero__img {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cjl-hero__img img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  border-radius: 22px;
}
.cjl-hero__img-placeholder {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--chip-bg) 0%, var(--line) 100%);
  border-radius: 22px;
}

.cjl-hero__body { display: flex; flex-direction: column; gap: 18px; }

.cjl-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cjl-hero__eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.cjl-hero__title {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.18;
  color: var(--text);
}
.cjl-hero__title a { color: inherit; text-decoration: none; }
.cjl-hero__title a:hover { color: var(--accent); }

.cjl-hero__excerpt {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.7;
}

.cjl-hero__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  color: var(--muted);
}
.cjl-hero__meta .sep { color: var(--line); }

.cjl-hero__cta {
  align-self: flex-start;
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 500;
  padding: 11px 26px;
  border-radius: 50px;
  text-decoration: none;
  letter-spacing: .02em;
  transition: background .2s, transform .15s;
}
.cjl-hero__cta:hover {
  background: var(--plum);
  transform: translateY(-1px);
  text-decoration: none;
}

/* =====================================================================
   SECTION HEADING (rubric style)
   ===================================================================== */
.cjl-sec {
  max-width: var(--w-wide);
  margin: 52px auto 0;
  padding: 0 24px;
}

.cjl-sec__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--line);
}
.cjl-sec__head h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--accent);
  letter-spacing: -.01em;
}
.cjl-sec__head::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.3em;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
  align-self: center;
}
.cjl-sec__all {
  margin-left: auto;
  font-size: .8rem;
  font-weight: 600;
  color: var(--plum);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.cjl-sec__all:hover { color: var(--accent); text-decoration: none; }

/* =====================================================================
   MAGAZINE COLUMN GRID
   ===================================================================== */
.cjl-grid {
  columns: 3;
  column-gap: var(--gap);
  margin-bottom: 52px;
}

/* Card */
.cjl-card {
  break-inside: avoid;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  margin-bottom: var(--gap);
  overflow: hidden;
  transition: box-shadow .25s, transform .2s;
  display: flex;
  flex-direction: column;
}
.cjl-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.cjl-card__img {
  overflow: hidden;
  background: var(--chip-bg);
}
.cjl-card__img img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.cjl-card:hover .cjl-card__img img { transform: scale(1.04); }

.cjl-card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.cjl-card__title {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--text);
}
.cjl-card__title a { color: inherit; text-decoration: none; }
.cjl-card__title a:hover { color: var(--accent); }

.cjl-card__excerpt {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.cjl-card__meta {
  font-size: .775rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.cjl-card__meta .sep { color: var(--line); }

/* "Tall" card variant — no image cutoff, occupies 2 rows visually */
.cjl-card--tall .cjl-card__img img { height: 240px; }

/* =====================================================================
   LATEST FEED (latexst posts strip, 4-col)
   ===================================================================== */
.cjl-latest-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 52px;
}

.cjl-strip-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cjl-strip-item__img { border-radius: 10px; overflow: hidden; }
.cjl-strip-item__img img { width: 100%; height: 120px; object-fit: cover; }
.cjl-strip-item__cat { font-size: .72rem; }
.cjl-strip-item__title { font-family: var(--serif); font-size: .975rem; line-height: 1.3; }
.cjl-strip-item__title a { color: var(--text); text-decoration: none; }
.cjl-strip-item__title a:hover { color: var(--accent); }
.cjl-strip-item__meta { font-size: .75rem; color: var(--muted); }

/* =====================================================================
   SINGLE POST
   ===================================================================== */
.cjl-single {
  max-width: var(--w-content);
  margin: 52px auto 80px;
  padding: 0 24px;
}

.cjl-single__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.cjl-single__title {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.18;
  margin-bottom: 8px;
}

.cjl-single__rule {
  width: 56px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin: 20px 0;
}

.cjl-single__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem;
  color: var(--muted);
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.cjl-single__meta .sep { color: var(--line); }

.cjl-single__hero-img {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow);
}
.cjl-single__hero-img img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}

/* Prose styles */
.cjl-prose {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text);
}
.cjl-prose p { margin-bottom: 1.4em; }
.cjl-prose h2 {
  font-size: 1.45rem;
  margin: 2em 0 .75em;
  color: var(--text);
}
.cjl-prose h3 {
  font-size: 1.2rem;
  margin: 1.75em 0 .65em;
}
.cjl-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cjl-prose a:hover { color: var(--plum); }

.cjl-prose img {
  border-radius: var(--r-img);
  max-width: 100%;
  margin: 2em auto;
  box-shadow: var(--shadow);
}

.cjl-prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 2em 0;
  padding: 18px 28px;
  background: var(--chip-bg);
  border-radius: 0 12px 12px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--plum);
  line-height: 1.6;
}
.cjl-prose blockquote p { margin: 0; }

.cjl-prose ul, .cjl-prose ol {
  margin: 1.2em 0 1.4em 1.5em;
}
.cjl-prose li { margin-bottom: .5em; }

.cjl-prose strong { font-weight: 600; color: var(--text); }
.cjl-prose em { color: var(--plum); }

/* =====================================================================
   RELATED POSTS
   ===================================================================== */
.cjl-related {
  margin-top: 60px;
  padding-top: 36px;
  border-top: 2px solid var(--line);
}

.cjl-related__label {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 24px;
}

.cjl-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cjl-related__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
}
.cjl-related__item:hover { text-decoration: none; }

.cjl-related__item-img {
  border-radius: 12px;
  overflow: hidden;
}
.cjl-related__item-img img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform .3s ease;
}
.cjl-related__item:hover .cjl-related__item-img img { transform: scale(1.05); }

.cjl-related__item-title {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--text);
  line-height: 1.35;
}
.cjl-related__item:hover .cjl-related__item-title { color: var(--accent); }

/* =====================================================================
   ARCHIVE PAGE
   ===================================================================== */
.cjl-archive { max-width: var(--w-wide); margin: 0 auto; padding: 0 24px 80px; }

.cjl-page-lead {
  text-align: center;
  padding: 56px 0 44px;
  border-bottom: 1.5px solid var(--line);
  margin-bottom: 48px;
}

.cjl-page-lead__kicker {
  display: inline-block;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.cjl-page-lead__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--text);
  margin-bottom: 14px;
}

.cjl-page-lead__desc {
  font-size: .9625rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Archive grid = masonry columns */
.cjl-archive-grid {
  columns: 3;
  column-gap: var(--gap);
}

.cjl-arc-item {
  break-inside: avoid;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  margin-bottom: var(--gap);
  overflow: hidden;
  transition: box-shadow .25s, transform .2s;
}
.cjl-arc-item:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.cjl-arc-item__img img { width: 100%; height: 180px; object-fit: cover; }
.cjl-arc-item__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 9px; }
.cjl-arc-item__title { font-family: var(--serif); font-size: 1.05rem; line-height: 1.3; }
.cjl-arc-item__title a { color: var(--text); text-decoration: none; }
.cjl-arc-item__title a:hover { color: var(--accent); }
.cjl-arc-item__excerpt { font-size: .845rem; color: var(--muted); line-height: 1.6; }
.cjl-arc-item__meta { font-size: .77rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }

/* Pagination */
.cjl-pager {
  text-align: center;
  margin: 48px 0 0;
}
.cjl-pager .nav-links { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.cjl-pager .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  font-size: .875rem;
  color: var(--text);
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.cjl-pager .page-numbers:hover,
.cjl-pager .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.cjl-footer {
  background: #3d1f30;
  color: rgba(255,255,255,.65);
  padding: 40px 24px;
  text-align: center;
  font-size: .875rem;
  line-height: 2;
}
.cjl-footer .cjl-footer-brand {
  display: block;
  margin-bottom: 14px;
}
.cjl-footer .cjl-footer-brand .logo-word { color: #fff; font-size: 1.25rem; }
.cjl-footer .cjl-footer-brand .wm-accent { color: var(--accent); }
.cjl-footer a { color: rgba(255,255,255,.8); text-decoration: underline; text-underline-offset: 3px; }
.cjl-footer a:hover { color: #fff; }
.cjl-footer .cjl-footer-divider {
  width: 40px; height: 2px;
  background: var(--accent);
  opacity: .5;
  border-radius: 2px;
  margin: 14px auto;
}
.cjl-footer .cjl-footer-copy { color: rgba(255,255,255,.45); font-size: .8rem; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 960px) {
  .cjl-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .cjl-hero__img img { height: 300px; }

  .cjl-grid { columns: 2; }
  .cjl-archive-grid { columns: 2; }
  .cjl-related__grid { grid-template-columns: repeat(2, 1fr); }
  .cjl-latest-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .cjl-hero { margin: 32px auto 28px; }
  .cjl-hero__img img { height: 220px; }

  .cjl-grid { columns: 1; }
  .cjl-archive-grid { columns: 1; }
  .cjl-related__grid { grid-template-columns: 1fr; }
  .cjl-latest-strip { grid-template-columns: 1fr 1fr; }

  .cjl-single { margin: 32px auto 56px; }
  .cjl-single__title { font-size: 1.65rem; }

  .cjl-nav { gap: 4px 14px; }
  .cjl-nav a { font-size: .75rem; }
}

@media (max-width: 420px) {
  .cjl-latest-strip { grid-template-columns: 1fr; }
}
