/* ============================================================
   MAREFORGE — Журнал (изолирани стилове, не пипат main.css)
   navy #060B16 · champagne #C9A96A · foam #F1ECE2 · sea #5E8B99
   ============================================================ */

:root {
  --navy: #060b16;
  --navy-2: #0a1322;
  --gold: #c9a96a;
  --gold-soft: #d8be8b;
  --foam: #f1ece2;
  --foam-dim: rgba(241, 236, 226, 0.66);
  --sea: #5e8b99;
  --line: rgba(201, 169, 106, 0.28);
  --line-soft: rgba(241, 236, 226, 0.12);
  --serif: "Prata", Georgia, serif;
  --sans: "Golos Text", -apple-system, sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --pad: clamp(20px, 5vw, 72px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--navy);
  color: var(--foam);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection {
  background: var(--gold);
  color: var(--navy);
}

a {
  color: inherit;
}

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

.mono {
  font-family: var(--mono);
  font-size: clamp(10px, 1.05vw, 12px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ---------- header ---------- */

.jr-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px) var(--pad);
  border-bottom: 1px solid var(--line-soft);
}

.jr-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.3em;
}

.jr-brand svg {
  width: 30px;
  height: 30px;
  color: var(--gold);
}

.jr-hdr-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 28px);
}

.jr-hdr-nav a {
  text-decoration: none;
  color: var(--foam-dim);
  transition: color 0.25s ease;
}

.jr-hdr-nav a:hover,
.jr-hdr-nav a[aria-current="page"] {
  color: var(--gold);
}

/* ---------- layout ---------- */

.jr-main {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 84px) var(--pad) clamp(56px, 8vw, 96px);
}

.jr-main--index {
  max-width: 1180px;
}

.jr-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--foam-dim);
  margin-bottom: clamp(22px, 4vw, 34px);
}

.jr-crumbs a {
  color: var(--foam-dim);
  text-decoration: none;
  transition: color 0.25s ease;
}

.jr-crumbs a:hover {
  color: var(--gold);
}

.jr-crumbs .sep {
  color: var(--sea);
}

.jr-crumbs [aria-current="page"] {
  color: var(--gold);
}

/* ---------- typography ---------- */

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 5.4vw, 50px);
  line-height: 1.14;
  letter-spacing: 0.01em;
  margin-bottom: 18px;
  text-wrap: balance;
}

h1 em,
h2 em {
  font-style: italic;
  color: var(--gold);
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(21px, 3vw, 28px);
  line-height: 1.25;
  margin: clamp(36px, 5vw, 52px) 0 14px;
}

h3 {
  font-size: clamp(17px, 1.4vw, 19px);
  font-weight: 600;
  margin: 28px 0 10px;
}

p {
  margin-bottom: 16px;
}

p a,
li a {
  color: var(--gold-soft);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.25s ease;
}

p a:hover,
li a:hover {
  text-decoration-color: var(--gold);
}

.jr-meta {
  color: var(--foam-dim);
  margin-bottom: clamp(26px, 4vw, 38px);
  padding-bottom: clamp(20px, 3vw, 28px);
  border-bottom: 1px solid var(--line-soft);
}

.jr-lede {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.6;
  color: var(--foam);
}

.jr-hero,
.jr-figure {
  width: min(980px, calc(100vw - (2 * var(--pad))));
  margin: clamp(28px, 5vw, 44px) 50%;
  transform: translateX(-50%);
}

.jr-hero img,
.jr-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: clamp(10px, 1.5vw, 18px);
  border: 1px solid var(--line-soft);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.jr-hero figcaption,
.jr-figure figcaption {
  margin-top: 10px;
  color: var(--foam-dim);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.jr-pullquote {
  margin: clamp(30px, 5vw, 46px) 0;
  padding: 6px 0 6px clamp(20px, 3vw, 30px);
  border-left: 1px solid var(--gold);
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: clamp(20px, 2.8vw, 27px);
  line-height: 1.45;
}

article ul,
article ol {
  margin: 0 0 18px;
  padding-left: 4px;
  list-style: none;
}

article ul li,
article ol li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
}

article ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.68em;
  width: 10px;
  height: 1px;
  background: var(--gold);
}

article ol {
  counter-reset: jr-ol;
}

article ol li {
  counter-increment: jr-ol;
  padding-left: 34px;
}

article ol li::before {
  content: counter(jr-ol, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.22em;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--gold);
}

/* ---------- callout / CTA ---------- */

.jr-cta {
  margin: clamp(36px, 5vw, 52px) 0 0;
  padding: clamp(22px, 3.5vw, 32px);
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.jr-cta p {
  margin-bottom: 10px;
}

.jr-cta p:last-child {
  margin-bottom: 0;
}

.jr-cta .mono {
  color: var(--gold);
  display: block;
  margin-bottom: 10px;
}

.jr-cta__action {
  display: inline-flex;
  align-items: center;
  margin-top: 12px;
  padding: 11px 16px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--navy);
  background: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease;
}

.jr-cta__action:hover {
  background: transparent;
  color: var(--gold);
}

/* ---------- related ---------- */

.jr-related {
  margin-top: clamp(40px, 6vw, 60px);
  padding-top: clamp(24px, 4vw, 36px);
  border-top: 1px solid var(--line-soft);
}

.jr-related .mono {
  color: var(--foam-dim);
  display: block;
  margin-bottom: 16px;
}

.jr-related ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

.jr-related a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  text-decoration: none;
  color: var(--foam);
  transition:
    border-color 0.25s ease,
    transform 0.25s ease;
}

.jr-related a:hover {
  border-color: var(--line);
  transform: translateX(4px);
}

.jr-related a span {
  display: block;
  color: var(--foam-dim);
  font-size: 14px;
  margin-top: 4px;
}

/* ---------- index cards ---------- */

.jr-index-head {
  margin-bottom: clamp(34px, 5vw, 50px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: end;
  gap: clamp(26px, 6vw, 80px);
}

.jr-index-head .kicker {
  color: var(--gold);
  display: block;
  margin-bottom: 14px;
}

.jr-index-head p {
  color: var(--foam-dim);
  max-width: 56ch;
}

.jr-index-head h1 {
  max-width: 12ch;
  margin-bottom: 0;
}

.jr-index-intro {
  padding-bottom: 4px;
}

.jr-index-intro p:last-child {
  margin-bottom: 0;
}

.jr-section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(38px, 6vw, 64px) 0 18px;
  color: var(--gold);
}

.jr-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}

.jr-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 24px);
}

.jr-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--navy-2);
  overflow: hidden;
  text-decoration: none;
  color: var(--foam);
  transition:
    border-color 0.25s ease,
    transform 0.25s ease;
}

.jr-card a:hover {
  border-color: var(--line);
  transform: translateY(-2px);
}

.jr-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b1627;
}

.jr-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 11, 22, 0.58));
}

.jr-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(.2,.8,.2,1);
}

.jr-card a:hover .jr-card__media img {
  transform: scale(1.035);
}

.jr-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(20px, 3.2vw, 30px);
}

.jr-card .mono {
  color: var(--foam-dim);
  display: block;
  margin-bottom: 10px;
}

.jr-card h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.6vw, 26px);
}

.jr-card p {
  color: var(--foam-dim);
  margin: 0;
  font-size: 15.5px;
}

.jr-card--feature {
  grid-column: 1 / -1;
}

.jr-card--feature a {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.jr-card--feature .jr-card__media {
  aspect-ratio: auto;
  min-height: 420px;
}

.jr-card--feature .jr-card__body {
  justify-content: center;
}

.jr-card--feature h2 {
  font-size: clamp(25px, 3.6vw, 38px);
}

.jr-card__tag {
  display: inline-flex;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 20px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- footer ---------- */

.jr-foot {
  border-top: 1px solid var(--line-soft);
  padding: clamp(28px, 4vw, 40px) var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--foam-dim);
}

.jr-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2.5vw, 24px);
}

.jr-foot a {
  color: var(--foam-dim);
  text-decoration: none;
  transition: color 0.25s ease;
}

.jr-foot a:hover {
  color: var(--gold);
}

@media (max-width: 560px) {
  .jr-hdr {
    flex-wrap: wrap;
  }
}

@media (max-width: 820px) {
  .jr-index-head,
  .jr-card--feature a {
    grid-template-columns: 1fr;
  }

  .jr-index-head h1 {
    margin-bottom: 18px;
  }

  .jr-card--feature .jr-card__media {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 680px) {
  .jr-cards {
    grid-template-columns: 1fr;
  }

  .jr-card--feature {
    grid-column: auto;
  }

  .jr-hero,
  .jr-figure {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    transform: none;
  }

  .jr-hero img,
  .jr-figure img {
    border-radius: 10px;
  }
}
