/* marketing-mag — custom Ghost theme for ihorkushnir.com.ua
   4-та унікальна палітра в сітці: off-white + black + electric coral.
   Type: Playfair Display (display) + Inter (UI). */

:root {
  --c-bg: #fbf8f3;
  --c-surface: #ffffff;
  --c-text: #1a1a1a;
  --c-text-soft: #4a4a4a;
  --c-text-mute: #8a8a8a;
  --c-accent: #ff5141;
  --c-line: #e6e1d8;
  --w-content: 1220px;
  --w-narrow: 760px;
  --f-display: 'Playfair Display', Georgia, serif;
  --f-ui: 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-ui);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.mg-container { max-width: var(--w-content); margin: 0 auto; padding: 0 24px; }
.mg-narrow { max-width: var(--w-narrow); margin: 0 auto; }

/* ===== HEADER ===== */
.mg-header {
  background: var(--c-bg);
  border-bottom: 3px solid var(--c-text);
  position: sticky; top: 0; z-index: 100;
}
.mg-header__row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.mg-brand {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
}
.mg-brand__pip {
  width: 14px; height: 14px;
  background: var(--c-accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.mg-brand__name {
  display: flex; flex-direction: column;
  line-height: 1.2;
}
.mg-brand__name > span:first-child {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--c-text);
  letter-spacing: -0.01em;
}
.mg-brand__sub {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-text-mute);
  margin-top: 1px;
  font-weight: 500;
}
.mg-nav { display: flex; gap: 24px; }
.mg-nav__link {
  font-size: 13px;
  color: var(--c-text-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.mg-nav__link:hover { color: var(--c-accent); text-decoration: none; }

@media (max-width: 760px) {
  .mg-header__row { flex-direction: column; gap: 12px; }
  .mg-nav { gap: 14px; flex-wrap: wrap; justify-content: center; }
}

/* ===== HERO ===== */
.mg-hero {
  position: relative;
  background: var(--c-text);
  color: var(--c-bg);
  padding: 100px 0;
  overflow: hidden;
}
.mg-hero--solid { background: var(--c-text); }
.mg-hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.35; z-index: 0;
}
.mg-hero__inner { position: relative; z-index: 1; max-width: 880px; }
.mg-hero__eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 22px;
  font-weight: 700;
}
.mg-hero__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  margin: 0 0 22px;
  color: var(--c-bg);
  letter-spacing: -0.02em;
}
.mg-hero__lede {
  font-size: 19px;
  color: rgba(251, 248, 243, 0.78);
  max-width: 640px;
  margin: 0;
  line-height: 1.55;
}

/* ===== SECTIONS ===== */
.mg-section { padding: 88px 0; }
.mg-section--alt {
  background: var(--c-surface);
  border-top: 1px solid var(--c-line);
}
.mg-section__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  margin: 0 0 48px;
  color: var(--c-text);
  letter-spacing: -0.01em;
}

/* ===== GRID ===== */
.mg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 36px;
}
.mg-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  display: flex; flex-direction: column;
  transition: all 0.25s;
  text-decoration: none;
}
.mg-card:hover {
  border-color: var(--c-text);
  transform: translateY(-4px);
  text-decoration: none;
}
.mg-card__img {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: var(--c-bg);
}
.mg-card__body { padding: 26px; flex: 1; display: flex; flex-direction: column; }
.mg-card__tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--c-text);
  color: var(--c-bg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  margin-bottom: 16px;
}
.mg-card__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.18;
  margin: 0 0 12px;
  color: var(--c-text);
  letter-spacing: -0.01em;
}
.mg-card__excerpt {
  font-size: 15px;
  color: var(--c-text-soft);
  margin: 0 0 18px;
  flex: 1;
}
.mg-card__meta {
  font-size: 12px;
  color: var(--c-text-mute);
  letter-spacing: 0.04em;
}

/* ===== POST ===== */
.mg-post { padding: 64px 0 96px; }
.mg-post__header { margin-bottom: 48px; }
.mg-post__tag {
  display: inline-block;
  background: var(--c-accent);
  color: var(--c-bg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 12px;
  margin-bottom: 22px;
}
.mg-post__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(36px, 5.5vw, 60px);
  line-height: 1.08;
  margin: 0 0 22px;
  color: var(--c-text);
  letter-spacing: -0.02em;
}
.mg-post__excerpt {
  font-size: 20px;
  font-family: var(--f-display);
  font-style: italic;
  color: var(--c-text-soft);
  margin: 0 0 28px;
  line-height: 1.45;
}
.mg-post__meta {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 13px;
  color: var(--c-text-mute);
  letter-spacing: 0.04em;
}
.mg-post__cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  margin: 0 0 48px;
  background-color: var(--c-bg);
}
.mg-post__tags { margin-top: 56px; }
.mg-post__tags a {
  font-size: 13px;
  margin-right: 14px;
  color: var(--c-text-soft);
  border-bottom: 1px dotted var(--c-text-mute);
}
.mg-post__tags a:hover { color: var(--c-accent); border-color: var(--c-accent); text-decoration: none; }
.mg-post__attribution {
  margin-top: 56px; padding-top: 32px;
  border-top: 2px solid var(--c-text);
  font-size: 14px; color: var(--c-text-mute);
}

.mg-prose { font-size: 18px; line-height: 1.75; color: var(--c-text-soft); }
.mg-prose p { margin: 0 0 24px; }
.mg-prose h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 30px;
  color: var(--c-text);
  margin: 56px 0 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.mg-prose h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 23px;
  color: var(--c-text);
  margin: 40px 0 14px;
}
.mg-prose ul, .mg-prose ol { padding-left: 22px; margin: 0 0 24px; }
.mg-prose li { margin-bottom: 6px; }
.mg-prose blockquote {
  border-left: 4px solid var(--c-accent);
  padding: 8px 0 8px 24px;
  margin: 32px 0;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 22px;
  color: var(--c-text);
  line-height: 1.4;
}
.mg-prose a { color: var(--c-accent); border-bottom: 1px solid currentColor; }
.mg-prose img { margin: 32px auto; }

/* ===== FOOTER ===== */
.mg-footer {
  background: var(--c-text);
  color: rgba(251, 248, 243, 0.65);
  padding: 56px 0;
}
.mg-footer__inner { text-align: center; }
.mg-footer__line { margin: 0 0 6px; font-size: 14px; }
.mg-footer__muted a { color: var(--c-bg); border-bottom: 1px solid rgba(251, 248, 243, 0.3); }
.mg-footer__muted a:hover { color: var(--c-accent); border-color: var(--c-accent); text-decoration: none; }
