/* ════════════════════════════════════════════
   THE YARD — блог «Новини» · editorial
   палітра і базові стилі — у style.css
   ════════════════════════════════════════════ */

/* motion-guard (anti-FOUC): blog.js знімає .motion у fallback-гілці */
html.motion .nhero .sec-head,
html.motion .nhero__title,
html.motion .nhero__sub,
html.motion .art__heroinner > * { opacity: 0; }
html.no-motion .nhero .sec-head,
html.no-motion .nhero__title,
html.no-motion .nhero__sub,
html.no-motion .art__heroinner > * { opacity: 1; }

/* ════════ /novyny/ — індекс ════════ */
.nhero {
  padding: clamp(120px, 16vh, 180px) 0 clamp(36px, 5vw, 64px);
  background: var(--bg);
  overflow: clip;
}
.nhero__title {
  padding: 0 var(--pad);
  display: inline-block; /* JS fit-to-width, як «14 резиденцій» на лендингу */
  white-space: nowrap;
  font-size: clamp(64px, 18vw, 300px);
  line-height: 0.9;
  margin-bottom: 0;
}
.nhero__sub {
  display: flex;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  padding: 0 var(--pad);
  margin-top: clamp(20px, 3vw, 36px);
  color: var(--cream-dim);
}

.nlist { background: var(--bg); padding-bottom: clamp(80px, 10vw, 140px); }
.nrow { border-top: 1px solid var(--cream-faint); }
.nrow:last-child { border-bottom: 1px solid var(--cream-faint); }
.nrow__in {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 5vw, 88px);
  padding: clamp(40px, 5.5vw, 84px) var(--pad);
  align-items: center;
  transition: background-color 0.35s ease;
}
.nrow__in:hover { background: rgba(212, 175, 55, 0.03); }
/* asymmetric: парні рядки дзеркалять розкладку */
.nrow:nth-child(even) .nrow__in { grid-template-columns: 1fr 1.15fr; }
.nrow:nth-child(even) .nrow__media { order: 2; }
.nrow:nth-child(even) .nrow__body { order: 1; }

.nrow__media { position: relative; }
.nrow__frame { overflow: clip; aspect-ratio: 16 / 10; }
.nrow__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}
.nrow__in:hover .nrow__frame img { transform: scale(1.05); }
/* гігантський контурний ординал, що звисає з кута обкладинки */
.nrow__no {
  position: absolute;
  top: -0.36em;
  left: -0.12em;
  z-index: 2;
  font-size: clamp(72px, 9vw, 150px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold-dim);
  pointer-events: none;
  transition: color 0.45s ease, -webkit-text-stroke-color 0.45s ease;
}
.nrow:nth-child(even) .nrow__no { left: auto; right: -0.12em; }
.nrow__in:hover .nrow__no { color: var(--gold); -webkit-text-stroke-color: var(--gold); }

.nrow__body { display: flex; flex-direction: column; gap: 18px; }
.nrow__meta { color: var(--gold); }
.nrow__meta time { color: var(--cream-dim); }
.nrow__title {
  font-size: clamp(30px, 3.4vw, 54px);
  line-height: 1.08;
  transition: color 0.35s ease;
  text-wrap: balance;
}
.nrow__in:hover .nrow__title { color: var(--gold); }
.nrow__desc { color: var(--cream-dim); font-size: 15.5px; max-width: 48ch; }
.nrow__more {
  color: var(--cream);
  margin-top: 6px;
  align-self: flex-start;
  transition: color 0.25s ease, transform 0.3s ease;
}
.nrow__in:hover .nrow__more { color: var(--gold); transform: translateX(6px); }

/* ════════ стаття ════════ */
.art__hero {
  position: relative;
  height: 82svh;
  min-height: 460px;
  overflow: clip;
  display: flex;
  align-items: flex-end;
}
.art__hero picture { position: absolute; inset: 0; }
.art__hero picture img {
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: transform;
}
.art__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13,13,11,0.6) 0%, rgba(13,13,11,0.15) 36%, rgba(13,13,11,0.28) 62%, rgba(13,13,11,0.92) 100%);
}
.art__heroinner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 var(--pad) clamp(40px, 7vh, 72px);
}
.art__meta { color: var(--gold); margin-bottom: 20px; }
.art__meta time { color: var(--cream-dim); }
.art__title {
  font-size: clamp(38px, 6.2vw, 92px);
  line-height: 1.0;
  max-width: 14ch;
  text-wrap: balance;
}

/* колонка ~65ch, ідеальна типографіка */
.art__bodywrap { background: var(--bg); padding: clamp(56px, 8vw, 110px) var(--pad) clamp(72px, 9vw, 130px); }
.art__body {
  max-width: 65ch;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.85;
  color: rgba(237, 232, 217, 0.87);
}
.art__body p { margin: 0 0 1.55em; }
.art__body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(27px, 3vw, 40px);
  line-height: 1.12;
  color: var(--cream);
  margin: 2em 0 0.75em;
}
.art__body h2:first-child { margin-top: 0; }
/* буквиця на першому абзаці */
.art__body > p:first-child::first-letter {
  font-family: var(--serif);
  float: left;
  font-size: 4.7em;
  line-height: 0.78;
  padding: 0.09em 0.14em 0 0;
  color: var(--gold);
}
/* pull-quote — золотий курсив із тонкими рисками */
.art__body blockquote { margin: 2.3em 0; }
.art__body blockquote::before,
.art__body blockquote::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  background: var(--gold-dim);
  margin: 0 auto;
}
.art__body blockquote::before { margin-bottom: 1.4em; }
.art__body blockquote::after { margin-top: 1.4em; }
.art__body blockquote p {
  font-family: var(--serif-i);
  font-style: italic;
  font-size: clamp(22px, 2.3vw, 31px);
  line-height: 1.45;
  color: var(--gold);
  text-align: center;
  margin: 0;
  text-wrap: balance;
}
.art__body a {
  color: var(--cream);
  border-bottom: 1px solid var(--gold-dim);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.art__body a:hover { color: var(--gold); border-color: var(--gold); }
.art__body figcaption, .art__body em.cap {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-dim);
  font-style: normal;
}

/* низ статті: наступна стаття + всі новини */
.art__foot {
  background: var(--bg);
  border-top: 1px solid var(--cream-faint);
  padding: clamp(48px, 7vw, 90px) var(--pad);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px clamp(40px, 6vw, 100px);
  align-items: end;
}
.art__allnews {
  color: var(--cream-dim);
  position: relative;
  transition: color 0.25s ease, transform 0.3s ease;
}
.art__allnews::after { content: ""; position: absolute; inset: -14px -8px; }
.art__allnews:hover { color: var(--gold); transform: translateX(-6px); }
.art__next { display: flex; flex-direction: column; gap: 14px; justify-self: end; text-align: right; }
.art__nextlabel { color: var(--gold); }
.art__nextlink {
  font-family: var(--serif);
  font-size: clamp(28px, 3.8vw, 58px);
  line-height: 1.05;
  transition: color 0.35s ease;
  text-wrap: balance;
}
.art__nextlink:hover { color: var(--gold); }

/* ════════ responsive ════════ */
@media (max-width: 900px) {
  .nrow__in,
  .nrow:nth-child(even) .nrow__in { grid-template-columns: 1fr; gap: 22px; }
  .nrow:nth-child(even) .nrow__media { order: 0; }
  .nrow:nth-child(even) .nrow__body { order: 1; }
  .nrow:nth-child(even) .nrow__no { right: auto; left: -0.08em; }
  .nrow__no { font-size: clamp(56px, 14vw, 92px); top: -0.3em; }
  .art__foot { grid-template-columns: 1fr; }
  .art__next { justify-self: start; text-align: left; }
  .art__allnews { order: 2; justify-self: start; }
}

@media (max-width: 560px) {
  .nhero__title { display: block; white-space: normal; font-size: clamp(72px, 24vw, 110px); }
  .nrow__title { font-size: clamp(27px, 7.6vw, 38px); }
  .art__hero { height: 74svh; }
  .art__title { font-size: clamp(34px, 10vw, 46px); }
  .art__body { font-size: 16.5px; }
}
