/* ==========================================================================
   ЛПХ «Слободское» — катумская порода овец
   Дизайн-проект v1. Автор: дизайн-студия (DSH)
   ========================================================================== */

/* --- Tokens --------------------------------------------------------------- */
:root {
  --paper: #f7f2e8;
  --paper-2: #efe6d5;
  --sand: #e7dcc6;
  --cream: #fbf7ee;

  --ink: #241f1a;
  --ink-2: #4d463a;
  --muted: #7c7364;
  --line: rgba(36, 31, 26, 0.14);
  --line-strong: rgba(36, 31, 26, 0.26);

  --forest: #2b4433;
  --forest-2: #1e3126;
  --forest-3: #16241c;
  --accent: #a9542c;
  --accent-soft: #c9793f;

  --wrap: 1240px;
  --pad: clamp(20px, 4vw, 40px);
  --radius: 4px;
  --shadow: 0 30px 70px -40px rgba(20, 30, 24, 0.55);

  --font-display: "Prata", "Times New Roman", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* --- Reset ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--forest); color: var(--cream); }

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

/* subtle paper grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

/* --- Typography ----------------------------------------------------------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.012em;
}

h1 { font-size: clamp(38px, 6vw, 74px); }
h2 { font-size: clamp(30px, 3.9vw, 52px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); }

strong, b { font-weight: 600; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.eyebrow--light { color: rgba(251, 247, 238, 0.82); }
.eyebrow--plain::before { display: none; }

/* --- Layout --------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(64px, 8vw, 118px); }
.section--tight { padding-block: clamp(48px, 5vw, 76px); }
.section--sand { background: var(--sand); }
.section--paper2 { background: var(--paper-2); }
.section--forest { background: var(--forest); color: var(--cream); }
.section--forest .sec-head p { color: rgba(251, 247, 238, 0.78); }

[id] { scroll-margin-top: 96px; }

.sec-head {
  display: grid;
  gap: 18px;
  max-width: 780px;
  margin-bottom: clamp(32px, 4vw, 58px);
}
.sec-head p {
  font-size: clamp(16px, 1.45vw, 18.5px);
  color: var(--ink-2);
  max-width: 64ch;
}
.sec-head--row {
  grid-template-columns: 1fr auto;
  align-items: end;
  max-width: none;
  gap: 28px;
}
.sec-head--row > div { display: grid; gap: 18px; max-width: 780px; }

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 0;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }

.btn--solid { background: var(--forest); color: var(--cream); }
.btn--solid:hover { background: var(--forest-2); }

.btn--light {
  background: var(--cream);
  color: var(--ink);
  border-color: rgba(36, 31, 26, 0.08);
}
.btn--light:hover { background: #fff; }

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--ink); }

.btn--ghost-light {
  border-color: rgba(251, 247, 238, 0.38);
  color: var(--cream);
  background: transparent;
}
.btn--ghost-light:hover {
  border-color: var(--cream);
  background: rgba(251, 247, 238, 0.08);
}

.btn--sm { padding: 11px 18px; font-size: 13px; }
.btn .icon { width: 16px; height: 16px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--forest);
}
.link-arrow .icon { width: 18px; height: 18px; transition: transform 0.3s; }
.link-arrow:hover .icon { transform: translateX(4px); }
.section--forest .link-arrow { color: var(--cream); }

/* --- Icons ---------------------------------------------------------------- */
.icon {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* --- Header --------------------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--cream);
  padding-block: 18px;
  transition: background 0.35s, color 0.35s, padding 0.35s, box-shadow 0.35s;
}
.header__in {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: space-between;
}
.header.is-scrolled {
  background: rgba(247, 242, 232, 0.94);
  backdrop-filter: blur(12px);
  color: var(--ink);
  padding-block: 10px;
  box-shadow: 0 1px 0 var(--line);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.9;
}
.brand__mark svg { width: 27px; height: 27px; }
.brand__text { display: grid; line-height: 1.05; }
.brand__name {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.brand__sub {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.66;
  margin-top: 4px;
}

.nav { display: flex; align-items: center; gap: 26px; }
.nav__link {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.86;
  transition: opacity 0.2s;
  position: relative;
  padding-block: 4px;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s;
}
.nav__link:hover { opacity: 1; }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__link.is-active { opacity: 1; }

.header__actions { display: flex; align-items: center; gap: 18px; }
.header__phone {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.header__phone .icon { width: 15px; height: 15px; opacity: 0.75; }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  position: relative;
}
.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s, top 0.3s;
}
.burger span::before { top: -5px; }
.burger span::after { top: 5px; }
.nav-open .burger span { background: transparent; }
.nav-open .burger span::before { top: 0; transform: rotate(45deg); }
.nav-open .burger span::after { top: 0; transform: rotate(-45deg); }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(92svh, 880px);
  display: flex;
  align-items: center;
  padding-top: 132px;
  color: var(--cream);
  isolation: isolate;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
  transform: scale(1.02);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(18, 28, 22, 0.9) 0%, rgba(18, 28, 22, 0.62) 42%, rgba(18, 28, 22, 0.12) 100%),
    linear-gradient(0deg, rgba(18, 28, 22, 0.92) 0%, rgba(18, 28, 22, 0.1) 55%, rgba(18, 28, 22, 0.35) 100%);
}
.hero__inner {
  position: relative;
  padding-bottom: clamp(40px, 6vw, 76px);
  display: grid;
  gap: 26px;
  justify-items: start;
  animation: hero-in 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
.hero h1 { max-width: 16ch; text-wrap: balance; }
.hero__lead {
  max-width: 54ch;
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.6;
  color: rgba(251, 247, 238, 0.88);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero__marks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 8px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(251, 247, 238, 0.72);
}
.hero__marks li { display: inline-flex; align-items: center; gap: 8px; }
.hero__marks li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-soft);
}

/* --- Stats ---------------------------------------------------------------- */
.stats {
  background: var(--forest);
  color: var(--cream);
  padding-block: 34px;
  border-top: 1px solid rgba(251, 247, 238, 0.12);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat { display: grid; gap: 4px; padding-left: 22px; border-left: 1px solid rgba(251, 247, 238, 0.18); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1;
  color: var(--cream);
}
.stat__value small {
  font-family: var(--font-body);
  font-size: 0.44em;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-left: 2px;
  color: rgba(251, 247, 238, 0.7);
}
.stat__label {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(251, 247, 238, 0.66);
}

/* --- Advantage grid ------------------------------------------------------- */
.adv {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.adv__item {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(24px, 2.8vw, 38px);
  display: grid;
  gap: 12px;
  align-content: start;
  background: var(--paper);
  transition: background 0.35s;
}
.adv__item:hover { background: var(--paper-2); }
.adv__n {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.adv__item h3 {
  font-family: var(--font-body);
  font-size: 18.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
}
.adv__item p { font-size: 15px; color: var(--ink-2); line-height: 1.62; }

/* --- Split ---------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
}
.split--reverse .split__media { order: 2; }
.split__media { position: relative; }
.split__media img {
  width: 100%;
  aspect-ratio: 4 / 4.6;
  object-fit: cover;
  border-radius: var(--radius);
}
.split--landscape .split__media img { aspect-ratio: 4 / 3.2; }
.split__cap {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.split__cap::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--line-strong);
  flex: none;
  transform: translateY(-3px);
}
.split__body { display: grid; gap: 18px; justify-items: start; }
.split__body > p { color: var(--ink-2); max-width: 56ch; }
.split__body .btn { margin-top: 8px; }

.spec { width: 100%; margin-top: 6px; border-top: 1px solid var(--line); }
.spec__row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.spec__row span { color: var(--ink-2); }
.spec__row b { font-weight: 600; white-space: nowrap; }

/* --- Cards (animals) ------------------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s, box-shadow 0.4s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.card:hover .card__img img { transform: scale(1.045); }
.card__body { padding: 22px 24px 20px; display: grid; gap: 10px; flex: 1; align-content: start; }
.card__title { font-family: var(--font-display); font-size: 23px; line-height: 1.2; }
.card__meta {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.card__text { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.card__spec {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 5px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.card__spec div { display: flex; justify-content: space-between; gap: 14px; }
.card__spec b { font-weight: 600; color: var(--ink); white-space: nowrap; }
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 24px;
  border-top: 1px solid var(--line);
  background: rgba(231, 220, 198, 0.28);
}
.price { font-size: 14px; font-weight: 600; }
.price small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; }

/* --- Steps ---------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(22px, 3vw, 36px);
}
.step {
  display: grid;
  gap: 10px;
  align-content: start;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.section--forest .step { border-top-color: rgba(251, 247, 238, 0.22); }
.step__n {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.section--forest .step__n { color: var(--accent-soft); }
.step h3 { font-family: var(--font-body); font-size: 17px; font-weight: 600; line-height: 1.35; }
.step p { font-size: 14.5px; color: var(--ink-2); }
.section--forest .step p { color: rgba(251, 247, 238, 0.72); }

/* --- Quote band ----------------------------------------------------------- */
.band {
  position: relative;
  isolation: isolate;
  color: var(--cream);
  padding-block: clamp(80px, 9vw, 130px);
  overflow: hidden;
}
.band__media { position: absolute; inset: 0; z-index: -2; }
.band__media img { width: 100%; height: 100%; object-fit: cover; }
.band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(18, 28, 22, 0.9), rgba(18, 28, 22, 0.58));
}
.band blockquote {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.1vw, 40px);
  line-height: 1.25;
  max-width: 26ch;
}
.band cite {
  display: block;
  margin-top: 26px;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251, 247, 238, 0.66);
}
.band--left .wrap { display: grid; justify-items: start; gap: 22px; }

/* --- FAQ ------------------------------------------------------------------ */
.faq {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.faq__list { display: grid; }
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  list-style: none;
  cursor: pointer;
  padding: 21px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.45;
}
summary::-webkit-details-marker { display: none; }
summary .icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  transition: transform 0.3s;
  flex: none;
}
details[open] summary .icon { transform: rotate(45deg); }
details .answer {
  padding: 0 40px 24px 0;
  font-size: 15.5px;
  color: var(--ink-2);
  max-width: 62ch;
}

/* --- CTA ------------------------------------------------------------------ */
.cta { position: relative; isolation: isolate; color: var(--cream); padding-block: clamp(64px, 8vw, 112px); overflow: hidden; }
.cta__media { position: absolute; inset: 0; z-index: -2; }
.cta__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(18, 28, 22, 0.92) 0%, rgba(18, 28, 22, 0.7) 46%, rgba(18, 28, 22, 0.28) 100%),
    linear-gradient(0deg, rgba(18, 28, 22, 0.55) 0%, rgba(18, 28, 22, 0) 60%);
}
.cta__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: end; }
.cta h2 { max-width: 18ch; }
.cta__lead { margin-top: 16px; color: rgba(251, 247, 238, 0.82); max-width: 46ch; }
.cta__phone {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.1vw, 40px);
  line-height: 1.1;
  margin-top: 10px;
}
.cta__aside { display: grid; gap: 16px; justify-items: start; }
.cta__aside .eyebrow { color: rgba(251, 247, 238, 0.7); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* --- Contacts ------------------------------------------------------------- */
.contacts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.contact {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(20px, 2.4vw, 30px);
  display: grid;
  gap: 6px;
  align-content: start;
}
.contact__label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact__label .icon { width: 14px; height: 14px; color: var(--accent); }
.contact__value { font-size: 15.5px; line-height: 1.5; }
.contact__value a { border-bottom: 1px solid var(--line-strong); }
.contact__value a:hover { border-color: var(--accent); color: var(--accent); }
.contact__note { font-size: 12.5px; color: var(--muted); }

.map {
  margin-top: 26px;
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper-2);
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.map::before {
  content: "";
  position: absolute;
  inset: -20%;
  opacity: 0.55;
  background:
    repeating-radial-gradient(ellipse at 30% 120%, transparent 0 38px, var(--line) 38px 39px),
    repeating-radial-gradient(ellipse at 82% -10%, transparent 0 30px, var(--line) 30px 31px);
}
.map__inner { position: relative; display: grid; gap: 10px; justify-items: center; text-align: center; padding: 24px; }
.map__inner .icon { width: 26px; height: 26px; color: var(--accent); }
.map__inner b { font-family: var(--font-display); font-size: 21px; font-weight: 400; }
.map__inner span { font-size: 13px; color: var(--muted); max-width: 42ch; }
.map__inner .btn { margin-top: 6px; }

/* --- Gallery -------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(140px, 14.5vw, 196px);
  gap: 12px;
}
.gallery a {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
}
.gallery img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gallery a:hover img { transform: scale(1.05); }
/* mosaic: big | tall | small / small | wide | wide */
.gallery > a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery > a:nth-child(2) { grid-column: span 1; grid-row: span 2; }
.gallery > a:nth-child(5) { grid-column: span 2; }
.gallery > a:nth-child(6) { grid-column: span 2; }

/* --- Page head ------------------------------------------------------------ */
.page-head {
  position: relative;
  isolation: isolate;
  color: var(--cream);
  padding-block: clamp(120px, 15vw, 176px) clamp(44px, 6vw, 72px);
  background: var(--forest);
  overflow: hidden;
}
.page-head__media { position: absolute; inset: 0; z-index: -2; }
.page-head__media img { width: 100%; height: 100%; object-fit: cover; }
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(18, 28, 22, 0.88), rgba(18, 28, 22, 0.45));
}
.page-head h1 { max-width: 20ch; }
.page-head__lead { margin-top: 18px; max-width: 56ch; color: rgba(251, 247, 238, 0.84); font-size: 18px; }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(251, 247, 238, 0.6);
  margin-bottom: 22px;
}
.crumbs a { border-bottom: 1px solid transparent; }
.crumbs a:hover { color: var(--cream); }
.crumbs span { opacity: 0.5; }

/* --- Prose ---------------------------------------------------------------- */
.prose { max-width: 760px; }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: clamp(40px, 5vw, 64px); }
.prose h3 {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  margin-top: 36px;
  letter-spacing: -0.01em;
}
.prose p, .prose li { color: var(--ink-2); font-size: 17px; line-height: 1.72; }
.prose .lead { font-size: 21px; line-height: 1.6; color: var(--ink); }
.prose ul { display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 26px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}
.prose blockquote {
  margin: 30px 0;
  padding: 24px 28px;
  border-left: 2px solid var(--accent);
  background: var(--paper-2);
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15.5px;
}
.prose th, .prose td {
  text-align: left;
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose th {
  font-family: var(--font-body);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.prose td:first-child { color: var(--ink-2); }
.prose td:last-child { font-weight: 600; text-align: right; white-space: nowrap; }

.aside-note {
  margin-top: 32px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  background: var(--paper-2);
  font-size: 14.5px;
  color: var(--ink-2);
  display: grid;
  gap: 6px;
}
.aside-note b { color: var(--ink); }

/* framed callout with an accent rule */
.note {
  margin-top: clamp(28px, 3.4vw, 44px);
  max-width: 82ch;
  padding: clamp(20px, 2.4vw, 28px) clamp(20px, 2.6vw, 32px);
  border-left: 2px solid var(--accent);
  background: var(--paper-2);
  display: grid;
  gap: 8px;
}
.note__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.note p { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }

/* --- Article layout (breed page) ------------------------------------------ */
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.toc {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--paper-2);
}
.toc__title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc a:not(.btn) {
  font-size: 14px;
  color: var(--ink-2);
  padding-left: 14px;
  border-left: 1px solid var(--line);
  line-height: 1.4;
}
.toc a:not(.btn):hover { color: var(--accent); border-color: var(--accent); }
.toc .btn { margin-top: 8px; justify-self: start; }

/* --- Filter chips --------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.chip {
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--forest); border-color: var(--forest); color: var(--cream); }
.cards--filtered .is-hidden { display: none; }

/* --- Footer --------------------------------------------------------------- */
.footer {
  background: var(--forest-3);
  color: rgba(251, 247, 238, 0.72);
  padding-block: clamp(48px, 6vw, 76px) 26px;
  font-size: 14px;
}
.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(251, 247, 238, 0.14);
}
.footer .brand { color: var(--cream); margin-bottom: 18px; }
.footer__about { max-width: 38ch; font-size: 14px; line-height: 1.6; }
.footer__title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(251, 247, 238, 0.5);
  margin-bottom: 16px;
}
.footer__links { display: grid; gap: 9px; }
.footer__links a:hover { color: var(--cream); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 12px;
  color: rgba(251, 247, 238, 0.5);
}
.footer__bottom a { border-bottom: 1px solid rgba(251, 247, 238, 0.24); }

/* --- Lightbox ------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  background: rgba(12, 18, 14, 0.92);
  padding: 4vw;
}
.lightbox.is-open { display: grid; }
.lightbox img { max-width: 100%; max-height: 86vh; object-fit: contain; }
.lightbox__close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(251, 247, 238, 0.3);
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* --- Reveal --------------------------------------------------------------- */
/* Прячем блоки только когда JS точно работает (html.js ставится inline-скриптом
   в <head>): без JS, в print и при reduced-motion весь контент остаётся видимым. */
.reveal { transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1); }
html.js .reveal:not(.is-in) { opacity: 0; transform: translateY(20px); }
html.js .reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, html.js .reveal:not(.is-in) { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero__inner { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .reveal, html.js .reveal:not(.is-in) { opacity: 1 !important; transform: none !important; }
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1100px) {
  .nav { gap: 18px; }
  .header__phone { display: none; }
  .adv { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .nav {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: var(--forest-3);
    color: var(--cream);
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
    padding: 80px var(--pad);
  }
  .nav.is-open { transform: none; }
  .nav__link { font-family: var(--font-display); font-size: 30px; opacity: 0.9; }
  .nav__link::after { display: none; }
  .header { color: var(--ink); background: rgba(247, 242, 232, 0.94); padding-block: 10px; }
  .header .brand__mark { border-color: var(--line-strong); }
  .burger { display: grid; }
  .nav-open .header { color: var(--cream); background: transparent; }
  .nav-open .header .brand__mark { border-color: rgba(251, 247, 238, 0.4); }
  .nav-open .header .btn { display: none; }

  .split { grid-template-columns: 1fr; gap: 32px; }
  .split--reverse .split__media { order: 0; }
  .split__media img { aspect-ratio: 4 / 3; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .faq { grid-template-columns: 1fr; }
  .contacts { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
  .cta__grid { grid-template-columns: 1fr; gap: 32px; align-items: start; }
  .sec-head--row { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(130px, 18vw, 180px); }
  .gallery > a:nth-child(n) { grid-column: auto; grid-row: auto; }
  .gallery > a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .gallery > a:nth-child(6) { grid-column: span 2; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__top > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { min-height: 92svh; }
  .hero h1 { font-size: clamp(34px, 9vw, 46px); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .stat { padding-left: 16px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .adv { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .contacts { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 132px; }
  .brand__sub { display: none; }
  .btn { width: 100%; }
  .hero__actions .btn, .cta__actions .btn { width: 100%; }
  .header__actions .btn { display: none; }
  .header__actions { gap: 10px; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; }
  .prose table { font-size: 14px; }
  .prose th, .prose td { padding-right: 8px; }
  .prose td:last-child { text-align: left; white-space: normal; }
}

/* --- WordPress: skip link ------------------------------------------------ */
.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 200;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  border-radius: 0 0 8px 0;
  transform: translateY(-120%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* --- WordPress: базовые стили редактора ---------------------------------- */
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose a { color: var(--accent); border-bottom: 1px solid rgba(169, 84, 44, 0.35); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 18px; }
/* --- WordPress: админ-панель не перекрывает фиксированную шапку ----------- */
body.admin-bar .header { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .header { top: 46px; }
}