/*
Theme Name: Ближе Noir
Author: icl.org.ua
Version: 2.0
*/

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

/* ===== TOKENS ===== */
:root {
  --bg:       #12100f;
  --surface:  #1b1917;
  --surface2: #231f1d;
  --accent:   #c8a45c;
  --accent-d: #a8843c;
  --text:     #ece7df;
  --muted:    #9a9088;
  --hair:     rgba(200,164,92,.22);
  --hair-s:   rgba(200,164,92,.40);

  --serif:  'Cormorant Garamond', Georgia, serif;
  --sans:   'Manrope', system-ui, sans-serif;

  --r:  0px;          /* border-radius: intentionally sharp / luxury sharp */
  --tr: .22s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute; left: -999px; top: 4px; z-index: 9999;
  background: var(--accent); color: #0d0b09; padding: 8px 14px;
  font-family: var(--sans); font-size: .8rem;
}
.skip-link:focus { left: 8px; }

/* ===== LAYOUT WRAPPER ===== */
.noir-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* ===== HEADER ===== */
.noir-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(18,16,15,.92);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  border-bottom: 1px solid var(--hair);
}
.noir-header__inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex; align-items: center; gap: 2.5rem;
}

/* logo */
.nlogo {
  display: flex; align-items: center; gap: .7rem;
  flex-shrink: 0; text-decoration: none;
}
.nlogo .logo-mark svg { display: block; }
.nlogo .logo-word {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--text);
}
/* .wm-accent removed — wordmark is now single-colour */

/* main nav */
.noir-nav {
  display: flex; gap: 1.8rem; align-items: center;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.noir-nav a {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--tr);
}
.noir-nav a:hover, .noir-nav a:focus { color: var(--accent); }

/* burger (mobile) */
.noir-burger {
  display: none;
  margin-left: auto;
  background: none; border: none; cursor: pointer;
  color: var(--text); padding: 6px;
}
.noir-burger svg { display: block; }

/* mobile nav drawer */
.noir-drawer {
  display: none;
  position: fixed; inset: 68px 0 0 0; z-index: 199;
  background: rgba(18,16,15,.98);
  flex-direction: column;
  padding: 2rem;
  gap: 1.4rem;
}
.noir-drawer.is-open { display: flex; }
.noir-drawer a {
  font-size: 1.2rem; font-family: var(--serif); color: var(--muted);
  border-bottom: 1px solid var(--hair); padding-bottom: .9rem;
  transition: color var(--tr);
}
.noir-drawer a:hover { color: var(--accent); }

/* push content below fixed header */
.noir-content { padding-top: 68px; flex: 1; }

/* ===== INTRO — редакционный манифест (единственный H1 на главной) ===== */
.intro {
  padding: 5.5rem 2rem 4rem;
  text-align: center;
  background: var(--bg);
  border-bottom: 1px solid var(--hair);
}
.intro__inner {
  max-width: 62ch;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* золотая линия-акцент над заголовком */
.intro__rule {
  display: block;
  width: 52px;
  height: 1px;
  background: var(--accent);
  margin-bottom: 2.2rem;
  flex-shrink: 0;
}
.intro__title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: 1.4rem;
}
.intro__desc {
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.75;
  letter-spacing: .03em;
}

@media (max-width: 768px) {
  .intro { padding: 3.5rem 1.4rem 2.8rem; }
  .intro__title { font-size: clamp(1.6rem, 7vw, 2.4rem); }
}

@media (max-width: 480px) {
  .intro { padding: 3rem 1.2rem 2.4rem; }
  .intro__rule { margin-bottom: 1.6rem; }
  .intro__desc { font-size: .82rem; }
}

/* ===== HERO (front page) ===== */
.noir-hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.noir-hero__bg {
  position: absolute; inset: 0;
  background: var(--bg);
  z-index: 0;
}
.noir-hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .42;
  filter: grayscale(25%);
}
/* dark gradient overlay on hero image */
.noir-hero__bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(18,16,15,.35) 0%,
    rgba(18,16,15,.55) 60%,
    rgba(18,16,15,.9) 100%
  );
}
.noir-hero__body {
  position: relative; z-index: 2;
  text-align: center;
  padding: 5rem 2rem;
  max-width: 900px;
}
/* thin gold rule above/below hero text */
.noir-hero__rule {
  width: 72px; height: 1px;
  background: var(--accent);
  margin: 0 auto 2rem;
}
.noir-hero__rule--b { margin: 2rem auto 0; }

.noir-hero__kicker {
  display: inline-block;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}
.noir-hero__title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -.01em;
}
.noir-hero__title a { color: inherit; }
.noir-hero__title a:hover { color: var(--accent); transition: color var(--tr); }

.noir-hero__meta {
  margin-top: 1.8rem;
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .08em;
  font-weight: 400;
}
.noir-hero__cta {
  display: inline-block;
  margin-top: 2.2rem;
  padding: .75rem 2.2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background var(--tr), color var(--tr);
}
.noir-hero__cta:hover {
  background: var(--accent); color: #0d0b09;
}

/* ===== SECTION (category blocks) ===== */
.noir-section {
  max-width: 1240px; margin: 0 auto;
  padding: 5rem 2rem;
  border-top: 1px solid var(--hair);
}
.noir-section__head {
  text-align: center;
  margin-bottom: 3.5rem;
}
.noir-section__head h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text);
}
.noir-section__head a {
  display: inline-block;
  margin-top: .9rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  transition: opacity var(--tr);
}
.noir-section__head a:hover { opacity: .7; }

/* card grid — airy, lots of whitespace */
.noir-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.8rem 2.4rem;
}

/* card */
.noir-card { display: flex; flex-direction: column; }
.noir-card__thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--surface);
  margin-bottom: 1.4rem;
}
.noir-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease, opacity .5s ease;
  opacity: .85;
}
.noir-card:hover .noir-card__thumb img {
  transform: scale(1.04); opacity: 1;
}
.noir-card__cat {
  font-size: .62rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .6rem;
}
.noir-card__title {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  font-weight: 500; line-height: 1.3;
  margin-bottom: .8rem;
}
.noir-card__title a { color: var(--text); transition: color var(--tr); }
.noir-card__title a:hover { color: var(--accent); }
.noir-card__excerpt {
  font-size: .82rem; color: var(--muted);
  line-height: 1.65; margin-bottom: 1rem;
  flex: 1;
}
.noir-card__meta {
  font-size: .68rem; color: var(--muted);
  letter-spacing: .06em;
}

/* card divider line */
.noir-card + .noir-card {
  border: none; /* spacing via gap */
}

/* ===== SINGLE POST ===== */
.noir-single {
  max-width: 680px; margin: 0 auto;
  padding: 4rem 2rem 6rem;
}
.noir-single__kicker {
  display: block; text-align: center;
  font-size: .65rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.4rem;
}
.noir-single__kicker a { color: var(--accent); }
.noir-single__kicker a:hover { opacity: .72; }

.noir-single__title {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 500; line-height: 1.15;
  text-align: center;
  letter-spacing: -.01em;
  margin-bottom: 1.6rem;
}
.noir-single__divider {
  width: 56px; height: 1px;
  background: var(--accent);
  margin: 0 auto 1.6rem;
}
.noir-single__meta {
  display: flex; align-items: center; justify-content: center;
  gap: .6rem; flex-wrap: wrap;
  font-size: .72rem; color: var(--muted);
  margin-bottom: 3rem;
}
.noir-single__meta .av { flex-shrink: 0; }

.noir-single__thumb {
  width: 100%; margin-bottom: 3rem;
  overflow: hidden;
}
.noir-single__thumb img {
  width: 100%; height: auto;
  display: block; opacity: .88;
}

/* prose */
.noir-prose {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.82;
  color: var(--text);
}
/* drop cap */
.noir-prose > p:first-of-type::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 4.2rem;
  font-weight: 600;
  line-height: .78;
  color: var(--accent);
  margin-right: .12em;
  margin-top: .1em;
}
.noir-prose p { margin-bottom: 1.5rem; }
.noir-prose h2, .noir-prose h3 {
  font-family: var(--serif);
  color: var(--text);
  margin: 2.4rem 0 .9rem;
}
.noir-prose h2 { font-size: 1.9rem; font-weight: 500; }
.noir-prose h3 { font-size: 1.45rem; font-weight: 500; }
.noir-prose a { color: var(--accent); border-bottom: 1px solid var(--hair-s); transition: border-color var(--tr); }
.noir-prose a:hover { border-color: var(--accent); }
.noir-prose ul, .noir-prose ol {
  padding-left: 1.5rem; margin-bottom: 1.5rem;
  list-style: disc;
}
.noir-prose ol { list-style: decimal; }
.noir-prose li { margin-bottom: .4rem; }

/* blockquote — gold left rule */
.noir-prose blockquote {
  border-left: 2px solid var(--accent);
  margin: 2.5rem 0; padding: 1rem 1.6rem;
  background: var(--surface);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--text);
  line-height: 1.6;
}
.noir-prose blockquote p { margin: 0; }

.noir-prose img {
  max-width: 100%; height: auto;
  margin: 2rem auto;
  opacity: .85;
}

/* ===== RELATED POSTS ===== */
.noir-related {
  border-top: 1px solid var(--hair);
  margin-top: 4rem;
  padding-top: 3rem;
  max-width: 680px; margin-left: auto; margin-right: auto;
  padding-left: 2rem; padding-right: 2rem; padding-bottom: 4rem;
}
.noir-related__label {
  font-family: var(--sans);
  font-size: .65rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); text-align: center;
  margin-bottom: 2.2rem;
}
.noir-related__grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1.6rem;
}
.noir-rel-item { display: flex; flex-direction: column; }
.noir-rel-item__thumb {
  display: block; overflow: hidden;
  aspect-ratio: 3/2; background: var(--surface);
  margin-bottom: .9rem;
}
.noir-rel-item__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: .78; transition: opacity .3s ease, transform .4s ease;
}
.noir-rel-item:hover .noir-rel-item__thumb img { opacity: 1; transform: scale(1.04); }
.noir-rel-item__title {
  font-family: var(--serif); font-size: 1rem; font-weight: 500;
  color: var(--text); line-height: 1.35;
  transition: color var(--tr);
}
.noir-rel-item:hover .noir-rel-item__title { color: var(--accent); }

/* ===== ARCHIVE ===== */
.noir-archive {
  max-width: 1240px; margin: 0 auto;
  padding: 4.5rem 2rem 6rem;
}
.noir-archive__lead {
  text-align: center; margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--hair);
}
.noir-archive__lead .kicker {
  display: inline-block;
  font-size: .65rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.noir-archive__lead h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 500; color: var(--text);
  margin-bottom: .8rem;
}
.noir-archive__lead .desc {
  color: var(--muted); font-size: .9rem; max-width: 520px; margin: 0 auto;
}

/* reuse noir-grid for archive post list */
.noir-pager {
  text-align: center; margin-top: 4rem;
  padding-top: 2.5rem; border-top: 1px solid var(--hair);
}
.noir-pager .page-numbers {
  display: inline-flex; gap: .5rem; flex-wrap: wrap;
  justify-content: center;
}
.noir-pager .page-numbers a,
.noir-pager .page-numbers span {
  display: inline-block; padding: .5rem .95rem;
  font-family: var(--sans); font-size: .78rem; font-weight: 500;
  border: 1px solid var(--hair);
  color: var(--muted); transition: background var(--tr), color var(--tr), border-color var(--tr);
}
.noir-pager .page-numbers a:hover,
.noir-pager .page-numbers .current {
  background: var(--accent); border-color: var(--accent); color: #0d0b09;
}

/* ===== FOOTER ===== */
.noir-footer {
  border-top: 1px solid var(--hair);
  background: var(--surface);
  padding: 2.8rem 2rem;
  text-align: center;
}
.noir-footer__inner {
  max-width: 900px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.noir-footer__logo { margin-bottom: .5rem; }
.noir-footer__copy {
  font-size: .72rem; color: var(--muted);
  line-height: 1.6;
}
.noir-footer__copy strong { color: var(--text); font-weight: 500; }

/* ===== UTILITIES ===== */
.dot { display: inline-block; width: 3px; height: 3px; border-radius: 50%; background: var(--muted); vertical-align: middle; margin: 0 .35rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .noir-grid { grid-template-columns: repeat(2,1fr); gap: 2rem 1.8rem; }
  .noir-related__grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  .noir-header__inner { gap: 1rem; }
  .noir-nav { display: none; }
  .noir-burger { display: flex; align-items: center; justify-content: center; margin-left: auto; }
  .noir-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .noir-related__grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .noir-section { padding: 3rem 1.2rem; }
  .noir-single { padding: 2.5rem 1.2rem 4rem; }
  .noir-archive { padding: 3rem 1.2rem 4rem; }
  .noir-single__title { font-size: clamp(1.9rem,7vw,2.8rem); }
}

@media (max-width: 480px) {
  .noir-hero__body { padding: 3rem 1.2rem; }
  .noir-hero__title { font-size: clamp(1.8rem,8vw,2.8rem); }
  .noir-section__head h2 { font-size: 1.7rem; }
}
