:root {
  --mist: #dfe8e4;
  --mist-deep: #c9d6d0;
  --paper: #f4f7f5;
  --ink: #12201c;
  --soft: #4a5c55;
  --line: #b7c6bf;
  --accent: #0b6e4f;
  --accent-deep: #084c37;
  --signal: #e36414;
  --signal-ink: #fff8f1;
  --glow: rgba(11, 110, 79, 0.14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Sora, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 520px at 12% -8%, rgba(227, 100, 20, 0.12), transparent 55%),
    radial-gradient(900px 480px at 92% 8%, rgba(11, 110, 79, 0.16), transparent 50%),
    linear-gradient(180deg, #eaf1ed 0%, var(--mist) 38%, var(--paper) 100%);
  background-attachment: fixed;
  line-height: 1.55;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(18, 32, 28, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 32, 28, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  z-index: 0;
}

body > * { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }
a { color: var(--accent-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
::selection { background: rgba(227, 100, 20, 0.22); color: var(--ink); }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 10;
}
.skip:focus { top: 12px; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

.site-head {
  padding: 18px 0;
  border-bottom: 1px solid rgba(18, 32, 28, 0.08);
  backdrop-filter: blur(10px);
  background: rgba(244, 247, 245, 0.72);
}
.head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.wordmark {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.wordmark small {
  display: block;
  margin-top: 2px;
  font-family: Sora, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
  font-weight: 600;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 16px;
}
.nav > a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav > a:not(.btn):hover { color: var(--accent); }

/* Рубрики: одна горизонтальная полоса со скроллом (как в Angular) */
.site-rubrics {
  border-top: 1px solid rgba(18, 32, 28, 0.06);
}
.site-rubrics-track {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0.4rem 0 0.55rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.site-rubrics-track a {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  color: #24352f;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}
.site-rubrics-track a:hover,
.site-rubrics-track a:focus-visible,
.site-rubrics-track a.active {
  color: #0b6e4f;
  background: rgba(11, 110, 79, 0.08);
}
.site-rubrics-track a.active {
  font-weight: 700;
  background: rgba(11, 110, 79, 0.14);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--signal);
  color: var(--signal-ink);
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font: 600 0.95rem/1 Sora, sans-serif;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}
.btn:hover {
  background: #c9550f;
  color: var(--signal-ink);
  transform: translateY(-1px);
}
.btn.ghost {
  background: transparent;
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1.5px rgba(11, 110, 79, 0.45);
}
.btn.ghost:hover {
  background: rgba(11, 110, 79, 0.08);
  color: var(--accent-deep);
  transform: none;
}

/* —— Hero: в ширину контейнера сайта —— */
.hero-bleed {
  min-height: 0;
  display: grid;
  overflow: hidden;
  padding-left: 0;
  padding-right: 0;
}
.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: stretch;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 40px);
  background:
    linear-gradient(160deg, rgba(244, 247, 245, 0.92), rgba(223, 232, 228, 0.88));
}
.brand-seal {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.brand-hero {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  max-width: 9ch;
}
.hero-copy .lede {
  font-size: 1.05rem;
  color: var(--soft);
  margin: 0 0 22px;
  max-width: 34rem;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-visual {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: var(--mist-deep);
  height: 100%;
  min-height: 280px;
}
.hero-visual img,
.hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.hero-feature {
  position: absolute;
  inset: 0;
  display: block;
  color: #fff;
  text-decoration: none;
}
.hero-feature img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-feature-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  margin: 0;
  padding: 2.5rem 1.1rem 1rem;
  background: linear-gradient(180deg, transparent 0%, rgba(12, 28, 24, 0.72) 55%, rgba(12, 28, 24, 0.88) 100%);
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.hero-feature:hover .hero-feature-title,
.hero-feature:focus-visible .hero-feature-title {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.hero-fallback {
  background:
    radial-gradient(circle at 30% 40%, rgba(227, 100, 20, 0.35), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(11, 110, 79, 0.45), transparent 45%),
    linear-gradient(145deg, #1a3a32, #0b6e4f 45%, #234b42);
}

/* —— Sections —— */
.section { padding: 56px 0 24px; }
.section-quiet { padding-bottom: 72px; }
.section h2,
.section > h1,
.wrap.section > h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  line-height: 1.1;
}
.intro {
  color: var(--soft);
  margin: 0 0 28px;
  max-width: 40rem;
  font-size: 1.05rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin: 0 0 16px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(11, 110, 79, 0.12);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.88rem;
  line-height: 1.3;
}
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { color: var(--signal); }
.kicker-date {
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #4a6359;
}

h1, h2, h3 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.03em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.05; margin: 0 0 16px; }
.lede { font-size: 1.2rem; color: var(--soft); margin: 0 0 24px; max-width: 42rem; }

/* Story list — картинка слева, текст справа (flex, без вылезания img) */
.story-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid rgba(18, 32, 28, 0.12);
}
.story {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(18, 32, 28, 0.12);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.25s ease;
  overflow: hidden;
}
.story:hover,
.story:focus-visible {
  background: rgba(255, 255, 255, 0.35);
  color: var(--ink);
}
.story-media {
  position: relative;
  flex: 0 0 200px;
  width: 200px;
  max-width: 36%;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--mist-deep);
  align-self: flex-start;
}
.story-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.story:hover .story-media img { transform: scale(1.04); }
.story-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.story-title {
  display: block;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.story-excerpt {
  display: block;
  color: var(--soft);
  font-size: 0.98rem;
  line-height: 1.5;
}
.story-go {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 4px;
  transition: color 0.2s ease;
}
.story:hover .story-go,
.story:focus-visible .story-go { color: var(--signal); }
.story-list-compact .story {
  gap: 14px;
  padding: 14px 0;
}
.story-list-compact .story-media {
  flex-basis: 96px;
  width: 96px;
  max-width: 96px;
}
.story-list-compact .story-title { font-size: 1.25rem; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.section-more:hover { color: var(--signal); }

.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 12px;
}
.zodiac-grid-home {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.zodiac-grid-home .zodiac-card {
  padding: 16px 8px 14px;
}
.zodiac-grid-home .zodiac-glyph {
  width: 56px;
  height: 56px;
  font-size: 1.7rem;
}
.zodiac-grid-home .zodiac-name {
  font-size: 1.05rem;
}
.zodiac-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 12px 18px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(18, 32, 28, 0.08);
  border-radius: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.zodiac-card:hover,
.zodiac-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(11, 110, 79, 0.35);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}
.zodiac-glyph {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(11, 110, 79, 0.12), rgba(201, 214, 208, 0.55));
  color: var(--accent);
  font-size: 2.2rem;
  line-height: 1;
}
.zodiac-name {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.zodiac-dates {
  color: var(--soft);
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.35;
}
.zodiac-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 18px;
  margin: 0 auto 8px;
  scrollbar-width: thin;
}
.zodiac-chip {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 64px;
  padding: 8px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid transparent;
}
.zodiac-chip .zodiac-glyph {
  width: 44px;
  height: 44px;
  font-size: 1.35rem;
}
.zodiac-chip-name {
  font-size: 0.72rem;
  font-weight: 600;
}
.zodiac-chip.active,
.zodiac-chip:hover,
.zodiac-chip:focus-visible {
  border-color: rgba(11, 110, 79, 0.35);
  background: rgba(11, 110, 79, 0.08);
  color: var(--accent);
}
@media (max-width: 900px) {
  .zodiac-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .zodiac-grid-home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .zodiac-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .zodiac-grid-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .zodiac-glyph { width: 60px; height: 60px; font-size: 1.85rem; }
}

.rubric-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 40px;
}
.rubric-list li {
  break-inside: avoid;
  border-bottom: 1px solid rgba(18, 32, 28, 0.1);
}
.rubric-list a {
  display: block;
  padding: 14px 0;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  transition: color 0.2s ease, padding-left 0.25s ease;
}
.rubric-list a:hover {
  color: var(--accent);
  padding-left: 8px;
}
.rubric-list-tight { margin-bottom: 36px; }

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0;
}
.inline-links a {
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-deep);
}
.inline-links a:hover { color: var(--signal); }

/* Article */
.article { padding-bottom: 72px; }
.article-head { padding: 28px 0 20px; }
.article-head h1 { max-width: none; }
.article-head .lede { max-width: none; }
.article-body.prose,
.article-body.prose p,
.article-body.prose li {
  max-width: none;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
  white-space: normal;
}
.cover-bleed {
  margin: 0 auto 28px;
  width: min(960px, calc(100% - 40px));
  overflow: hidden;
  background: var(--mist-deep);
  border-radius: 4px;
}
.cover-bleed img {
  width: 100%;
  height: auto;
  max-height: min(75vh, 720px);
  object-fit: contain;
  object-position: center;
  display: block;
}
.article-body { padding-bottom: 24px; }
.prose h2 { margin: 1.4em 0 0.35em; font-size: 1.65rem; }
.prose p, .prose li { font-size: 1.12rem; line-height: 1.75; }
.prose p + p { margin-top: 1.1em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose blockquote {
  margin: 1.2em 0;
  padding-left: 1em;
  border-left: 3px solid var(--signal);
  color: var(--soft);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.3rem;
  font-style: italic;
}
.source-line { margin: 0 0 1.4rem; font-size: 0.95rem; }

/* Фото в теле статьи — вдвое уже контейнера */
.prose .article-photo {
  margin: 1.25rem auto;
  max-width: 50%;
}
.prose .article-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: rgba(18, 32, 28, 0.06);
}
@media (max-width: 767.98px) {
  .prose .article-photo {
    max-width: 75%;
  }
}
.quiet { color: var(--soft); }
.about-text { white-space: pre-line; max-width: 42rem; line-height: 1.7; }
.contacts-block { max-width: 36rem; }

/* Footer */
.site-foot {
  margin-top: 24px;
  padding: 28px 0 40px;
  border-top: 1px solid rgba(18, 32, 28, 0.12);
  color: var(--soft);
  font-size: 0.95rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 10px;
}
.foot-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.foot-links a:hover { color: var(--accent); }
.foot-note { margin: 0; max-width: 36rem; }
.foot-contacts p { margin: 0 0 6px; }
.foot-social { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Motion */
@keyframes animotion-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes animotion-fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-copy > * {
  animation: animotion-fadeInUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.14s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.24s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.34s; }

.hero-visual img,
.hero-fallback {
  animation: animotion-fadeIn 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
  transform-origin: center;
}

.cover-bleed img {
  animation: animotion-fadeIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Стек героя — только на узком экране */
@media (max-width: 767.98px) {
  .hero-stage { grid-template-columns: 1fr; }
  .hero-bleed { min-height: auto; }
  .hero-visual { min-height: min(52vw, 360px); max-height: none; }
  .hero-visual img,
  .hero-fallback {
    position: absolute;
    inset: 0;
    min-height: 0;
    max-height: none;
  }
  .brand-hero { max-width: none; }
  .story { gap: 14px; }
  .story-media { flex-basis: 110px; width: 110px; max-width: 110px; }
  .rubric-list { columns: 1; }
  .head-row { align-items: flex-start; flex-direction: column; }
  .nav { justify-content: flex-start; }
  .foot-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy > *,
  .hero-visual img,
  .hero-fallback,
  .cover-bleed img,
  .story-media img {
    animation: none !important;
    transition: none !important;
  }
  .btn:hover { transform: none; }
}
