/* FLIPFLAT · блок акции [ff_promo] */
.ff-pb {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin: 48px 0;
  padding: 56px 52px;
  border-left: 4px solid var(--ff-accent, #ffd000);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(0,0,0,.8) 0%, rgba(0,0,0,.35) 100%),
    var(--ff-pb-bg, var(--ff-img-1)) center / cover no-repeat;
  background-color: #1a1a1a;          /* если фото не загрузилось */
}

.ff-pb__badge {
  color: var(--ff-accent, #ffd000);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.ff-pb__title {
  max-width: 720px;
  margin: 14px 0 16px;
  color: #fff;
  /* font: 600 clamp(26px, 3vw, 40px) / 1.12 var(--ff-font-display, inherit); */
  letter-spacing: -.02em;
}

.ff-pb__sum {
  display: inline-block;
  padding: 0 .15em;
  /* background: var(--ff-accent, #ffd000); */
  /* color: #111; */
  background: #f00;
  color: #fff;
  white-space: nowrap;
}

.ff-pb__text {
  max-width: 520px;
  margin: 0;
  color: rgba(255,255,255,.85);
  font-size: 17px;
  line-height: 1.55;
}

.ff-pb__btn {
  min-width: 200px;
  padding: 16px 28px;
  border: 0;
  background: var(--ff-accent, #ffd000);
  color: #111;
  font: 600 16px var(--ff-font-body, inherit);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}

.ff-pb__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

@media (max-width: 860px) {
  .ff-pb {
    grid-template-columns: 1fr;
    padding: 32px 20px;
    border-left: 0;
    border-top: 4px solid var(--ff-accent, #ffd000);
  }
  .ff-pb__btn { width: 100%; }
}



/* 10. Hero: правая колонка с акцией
   -------------------------------------------------------------------------- */
.ff-hero__promo {
  position: relative !important;   /* фон не выходит за колонку */
  isolation: isolate;
  display: flex;
  align-self: stretch;
  min-height: 560px;
  overflow: hidden;
  background: none !important;     /* убираем фон, если он прописан у колонки */
}

/* Фото и затемнение: только внутри колонки */
/* Фон правой колонки: слои с фото + затемнение */
.ff-hero__promo-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.ff-promo-slide {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  opacity: 0;
  transition: opacity .5s;
}

.ff-promo-slide.is-active { opacity: 1; }

.ff-promo-slide--1 { background-image: var(--ff-img-1); }
.ff-promo-slide--2 { background-image: var(--ff-img-2); }
.ff-promo-slide--3 { background-image: var(--ff-img-3); }
.ff-promo-slide--4 { background-image: var(--ff-img-4); }
.ff-promo-slide--5 { background-image: var(--ff-img-5); }

/* Затемнение поверх фото, чтобы текст читался */
.ff-hero__promo-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.15) 100%);
}

.ff-promo {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  padding: 48px 44px;
  border-left: 4px solid var(--ff-accent);
  color: #fff;
}

.ff-promo__badge {
  color: var(--ff-accent);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.ff-promo__title {
  margin: 14px 0 18px;
  color: #fff;
  font: 600 clamp(28px, 3.2vw, 44px) / 1.1 var(--ff-font-display);
  letter-spacing: -.02em;
}

.ff-promo__sum {
  display: inline-block;
  padding: 0 .15em;
  /* background: var(--ff-accent); */
  /* color: var(--ff-ink); */
  background: #F00; */
  color: #fff; */
  white-space: nowrap;
}

.ff-promo__text {
  max-width: 440px;
  margin: 0 0 28px;
  color: rgba(255,255,255,.85);
  font-size: 17px;
  line-height: 1.55;
}

.ff-promo__btn { align-self: flex-start; min-width: 200px; }


/* 11. Модальное окно
   -------------------------------------------------------------------------- */
.ff-modal {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--ff-rule);
  background: var(--ff-bg);
  color: var(--ff-ink);
}

.ff-modal::backdrop { background: rgba(0, 0, 0, .6); }

.ff-modal__form {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 36px 32px 28px;
}

.ff-modal__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ff-ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ff-modal__title {
  margin: 0;
  padding-right: 32px;
  color: var(--ff-title);
  font: 600 28px / 1.1 var(--ff-font-display);
}

.ff-modal__text {
  margin: 0;
  color: var(--ff-muted);
  font-size: 15px;
  line-height: 1.5;
}

.ff-field {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.ff-field input {
  padding: 12px 14px;
  border: 1px solid var(--ff-line);
  background: var(--ff-bg);
  color: var(--ff-ink);
  font: 16px var(--ff-font-body);
}

.ff-field input:focus { outline: none; border-color: var(--ff-ink); }

.ff-file {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  cursor: pointer;
}

.ff-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.ff-file__btn {
  flex: none;
  padding: 10px 16px;
  border: 1px solid var(--ff-ink);
  font-size: 14px;
  font-weight: 600;
  transition: background-color .2s, color .2s;
}

.ff-file:hover .ff-file__btn { background: var(--ff-ink); color: var(--ff-ink-contrast); }
.ff-file:focus-within .ff-file__btn { outline: 2px solid var(--ff-ink); outline-offset: 2px; }

.ff-file__name {
  min-width: 0;
  overflow: hidden;
  color: var(--ff-muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-hint { margin-top: -8px; color: var(--ff-muted); font-size: 12px; }

.ff-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ff-muted);
  font-size: 13px;
  line-height: 1.4;
}

.ff-modal__submit { width: 100%; }
.ff-modal__submit:disabled { opacity: .6; cursor: wait; }

.ff-modal__status { min-height: 1.3em; margin: 0; font-size: 14px; }
.ff-modal__status.is-error { color: #D33A2C; }
.ff-modal__status.is-ok    { color: #2A9D4B; }

.ff-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* Окно подтверждения */
.ff-ok {
  justify-items: center;
  text-align: center;
}

.ff-ok .ff-modal__title { padding-right: 0; }

.ff-ok__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ff-accent, #ffd000);
  color: var(--ff-ink, #111);
  font-size: 32px;
  font-weight: 800;
  animation: ff-ok-pop .35s ease-out;
}

@keyframes ff-ok-pop {
  from { transform: scale(.5); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ff-ok__icon { animation: none; }
}

/* 12. Адаптив для акции и окна
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .ff-hero__promo { min-height: 380px; }
  .ff-promo {
    padding: 32px 18px;
    border-left: 0;
    border-top: 4px solid var(--ff-accent);
  }
  .ff-modal__form { padding: 32px 20px 22px; }
  .ff-modal__title { font-size: 24px; }
	.ff-hero__promo-bg::after {background: #1a1a1a;opacity: 1;}
	.ff-promo__title {font: 600 clamp(32px, 3.4vw, 48px) / 1.1 var(--ff-font-display);}
	.ff-slider-fade {opacity: 1 !important; transition: unset;}
}









/* ==========================================================================
   FLIPFLAT · Шапка с меню + Hero (вариант А «Индекс»)
   Шапка прилипает к верхнему краю. Есть светлая и ночная версии.

   Содержание
   1. Токены (цвета, шрифты, отступы)
   2. Базовые правила
   3. Кнопки                  .ff-btn
   4. Шапка и меню            .ff-header, .ff-nav
   5. Hero                    .ff-hero
   6. Полоса с цифрами        .ff-facts
   7. Адаптив
   8. Hero внутренних страниц   .ff-crumbs, .ff-page-hero, .ff-subnav
   9. Ночная версия
   ========================================================================== */


/* 1. Токены
   -------------------------------------------------------------------------- */
.ff {
  /* Цвета */
  --ff-accent:        #ffd000;   /* оранжевый: кнопки, акценты */
  --ff-accent-hover:  #E85A1C;
  --ff-ink:           #333333;   /* заголовки и основной текст */
  --ff-muted:         #6B6B6B;
  --ff-line:          #D9D9D9;
  --ff-surface:       #F5F5F5;
  --ff-bg:            #FFFFFF;
  --ff-title:         #333333;   /* заголовки */
  --ff-rule:          #333333;   /* жирные линии: под шапкой, над цифрами */
  --ff-sep:           #D9D9D9;   /* разделитель в хлебных крошках */
  --ff-media-bg:      #DDDDDD;   /* фон под фото, пока оно грузится */
  --ff-ink-contrast:  #FFFFFF;   /* текст на тёмной кнопке при наведении */

  /* Шрифты: берутся из темы сайта, если переменные там заданы */
  --ff-font-display:  var(--font-display, "Golos Text", "Manrope", system-ui, sans-serif);
  --ff-font-body:     var(--font-body, "Manrope", system-ui, sans-serif);

  /* Боковой отступ: выравнивает блок по контейнеру темы (--container, --gutter) */
  --ff-pad: max(
    var(--gutter, 20px),
    calc((100% - var(--container, 1280px)) / 2 + var(--gutter, 20px))
  );
}

/* Высота шапки и отступ сверху для прилипания.
   --ff-sticky-top нужен, если вверху сайта есть своя панель (например, админ-панель WP). */
:root {
  --ff-header-h:    76px;
  --ff-sticky-top:  0px;
}

body.admin-bar { --ff-sticky-top: 32px; }

/* Якорные ссылки не прячутся под прилипшей шапкой */
html { scroll-padding-top: calc(var(--ff-header-h) + var(--ff-sticky-top) + 70px); }

/* Фотографии Hero. Меняйте адреса здесь */
.ff-hero {
  --ff-img-1: url("https://flip77.ru/wp-content/uploads/main/newh-remont.jpg");
  --ff-img-2: url("https://flip77.ru/wp-content/uploads/main/newh-furn.jpg");
  --ff-img-3: url("https://flip77.ru/wp-content/uploads/main/newh-invest.jpg");
  --ff-img-4: url("https://flip77.ru/wp-content/uploads/main/newh-property.jpg");
  --ff-img-5: url("https://flip77.ru/wp-content/uploads/main/newh-legal.jpg");
}


/* 2. Базовые правила
   -------------------------------------------------------------------------- */
.ff,
.ff *,
.ff *::before,
.ff *::after {
  box-sizing: border-box;
  border-radius: 0;               /* без скруглений */
}

.ff {
  background: var(--ff-bg);
  color: var(--ff-ink);
  font-family: var(--ff-font-body);
}

.ff a {
  color: inherit;
  text-decoration: none;
}


/* Слайдер плавное появление */

.ff-slider-fade {
  opacity: 0;
  transition: opacity 2.8s ease;
}
.ff-slider-fade.is-ready { opacity: 1; }

/* Если JS отключён, слайдер не должен остаться невидимым */
@media (scripting: none) {
  .ff-slider-fade { opacity: 1; }
}


/* 3. Кнопки
   -------------------------------------------------------------------------- */
.ff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border: 1px solid var(--ff-accent);
  background: var(--ff-accent);
  color: #fff;
  font: 600 15px var(--ff-font-body);
  letter-spacing: .02em;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}

.ff-btn:hover {
  background: var(--ff-ink);
  border-color: var(--ff-ink);
  color: var(--ff-ink-contrast);
}

.ff-btn--outline {
  background: transparent;
  border-color: var(--ff-ink);
  color: var(--ff-ink);
}

.ff-btn--outline:hover {
  background: var(--ff-ink);
  border-color: var(--ff-ink);
  color: var(--ff-ink-contrast);
}


/* 4. Шапка и меню
   -------------------------------------------------------------------------- */
.ff-header {
  position: sticky;                /* прилипает к верхнему краю при прокрутке */
  top: var(--ff-sticky-top);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  height: calc(var(--ff-header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--ff-pad) 0;
  border-bottom: 1px solid var(--ff-rule);
}

.ff-header__logo {
  font: 300 22px var(--ff-font-display);
  letter-spacing: .04em;
}

.ff-header__logo b {
  color: var(--ff-accent);
}

.ff-nav {
  display: flex;
  gap: 30px;
  margin: 0 28px 0 auto;
  font-size: 15px;
  font-weight: 600;
}

/* Подчёркивание сделано псевдоэлементом, а не border: его не сбрасывают стили темы.
   Текущий пункт: класс .is-current, атрибут aria-current="page" (ставит js/header.js)
   или классы меню WordPress. */
.ff-nav__link {
  position: relative;
  padding: 6px 0;
  transition: color .2s;
}

.ff-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--ff-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}

.ff-nav__link:hover {
  color: var(--ff-accent);
}

.ff-nav__link:hover::after,
.ff-nav__link.is-current::after,
.ff-nav__link[aria-current="page"]::after,
.current-menu-item > .ff-nav__link::after,
.current_page_item > .ff-nav__link::after {
  transform: scaleX(1);
}

/* Кнопка-«бургер»: видна только на телефоне */
.ff-header__burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--ff-ink);
  background: var(--ff-bg);
  cursor: pointer;
}

.ff-header__burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ff-ink);
}


/* 5. Hero
   -------------------------------------------------------------------------- */
.ff-hero__layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  padding: 0 var(--ff-pad);
}

.ff-hero__layout_page {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  padding: 0 var(--ff-pad);
}

/* Левая колонка: фотографии */
.ff-hero__media {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  /* background: var(--ff-media-bg); */
  height: 100% !important;
  width: auto;
}

.ff-hero__slide {
  position: absolute;
  inset: 0;
  background: center / cover no-repeat;
  opacity: 0;
  transition: opacity .5s;
}

.ff-hero__slide.is-active        { opacity: 1; }
.ff-hero__slide--0               {  }
.ff-hero__slide--1               { background-image: var(--ff-img-1); }
.ff-hero__slide--2               { background-image: var(--ff-img-2); }
.ff-hero__slide--3               { background-image: var(--ff-img-3); }
.ff-hero__slide--4               { background-image: var(--ff-img-4); }
.ff-hero__slide--5               { background-image: var(--ff-img-5); }



.ff-hero__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 80%;
  padding: 14px 24px;
  /* border-top: 4px solid var(--ff-accent); */
  /* background: var(--ff-bg); */
  background: transparent;
  width:30ch;
}

.ff-hero__caption strong {
  display: block;
  font-weight: 800;
}

.ff-hero__caption span {
  /* color: var(--ff-muted); */
  font-weight: 300;
  color: #FFF;
}

/* Правая колонка: текст и список направлений */
.ff-hero__body {
  padding: 48px 0 40px 52px;
}

.ff-hero__body_page {
  padding: 48px 52px 40px 0;
}

.ff-hero__eyebrow {
  color: var(--ff-accent);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.ff-hero__title {
  margin: 14px 0 18px;
  color: var(--ff-title);
  font: 600 clamp(36px, 4.4vw, 60px) / 1.04 var(--ff-font-display);
  letter-spacing: -.02em;
}

.ff-hero__lead {
  max-width: 520px;
  margin: 0 0 26px;
  color: var(--ff-muted);
  font-size: 18px;
  line-height: 1.55;
}

/* Список направлений */
.ff-hero__list {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--ff-line);
}

.ff-hero__row {
  display: grid;
  grid-template-columns: 44px 1fr auto 23px;
  align-items: baseline;
  gap: 10px;
  padding: 16px 0 16px 14px;
  border-top: 1px solid var(--ff-line);
  border-left: 4px solid transparent;
  transition: background-color .25s, border-color .25s;
}

.ff-hero__row.is-active {
  border-left-color: var(--ff-accent);
  background: var(--ff-surface);
}

.ff-hero__row-num   { color: var(--ff-muted); font-weight: 700; }
.ff-hero__row-name  { font: 600 20px var(--ff-font-display); }
.ff-hero__row-price { color: var(--ff-muted); font-weight: 300; }

.ff-hero__row-arrow {
  color: var(--ff-accent);
  font-weight: 800;
  transition: transform .25s;
}

.ff-hero__row:hover .ff-hero__row-arrow {
  transform: translateX(4px);
}

.ff-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


/* 6. Полоса с цифрами
   -------------------------------------------------------------------------- */
.ff-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 var(--ff-pad);
  border-top: 3px solid var(--ff-rule);
}

.ff-facts__item {
  padding: 22px 24px 28px 0;
}

.ff-facts__value {
  display: block;
  font: 800 clamp(34px, 4vw, 52px) / 1 var(--ff-font-display);
}

.ff-facts__value em {
  color: var(--ff-accent);
  font-style: normal;
}

.ff-facts__text {
  display: block;
  max-width: 260px;
  margin-top: 6px;
  color: var(--ff-muted);
  font-size: 15px;
}


/* 7. Адаптив
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .ff-nav { gap: 20px; font-size: 14px; }
}

@media (max-width: 860px) {
  :root { --ff-header-h: 64px; }
  body.admin-bar { --ff-sticky-top: 46px; }

  /* Шапка: меню прячется за «бургер» */
  .ff-header { padding-left: 18px; padding-right: 18px; }
  .ff-header .ff-btn { padding: 11px 14px; font-size: 14px; }
  .ff-header__burger { display: flex; }

  .ff-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    background: var(--ff-bg);
    border-bottom: 1px solid var(--ff-rule);
  }

  .ff-nav.is-open { display: flex; }

  .ff-nav__link {
    padding: 15px 18px;
    border-top: 1px solid var(--ff-line);
  }

  /* На телефоне текущий пункт отмечен вертикальной полосой слева */
  .ff-nav__link::after {
    right: auto;
    top: 0;
    width: 4px;
    height: auto;
    transform: scaleY(0);
    transform-origin: top;
  }

  .ff-nav__link:hover::after,
  .ff-nav__link.is-current::after,
  .ff-nav__link[aria-current="page"]::after,
  .current-menu-item > .ff-nav__link::after,
  .current_page_item > .ff-nav__link::after {
    transform: scaleY(1);
  }

  /* Hero: фото сверху, текст ниже */
  .ff-hero__layout { grid-template-columns: 1fr; padding: 0; }
  .ff-hero__layout_page { grid-template-columns: 1fr; padding: 0;display: flex;flex-direction: column-reverse; }
  .ff-hero__media  { min-height: 350px;max-height:400px;display: flex;align-items: center; }
  .ff-hero__body   { padding: 28px 18px; }
  .ff-hero__body_page { padding: 28px 18px; }

	
  .ff-hero__row { grid-template-columns: 40px 1fr 23px; }
  .ff-hero__row-price { grid-column: 2; display:none; }

  .ff-facts { grid-template-columns: 1fr; margin: 0 18px; }
}


/* 8. Hero внутренних страниц
   Компактный блок: крошки, текст, фото с ценником, 3–4 факта и подменю.
   -------------------------------------------------------------------------- */
.ff-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px var(--ff-pad) 0;
  color: var(--ff-muted);
  font-size: 13px;
  font-weight: 600;
}

.ff-crumbs a:hover { color: var(--ff-accent); }
.ff-crumbs a::after { content: "/"; margin-left: 8px; color: var(--ff-sep); }
.ff-crumbs [aria-current] { color: var(--ff-ink); }

.ff-page-hero__layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  margin-top: 18px;
  padding: 0 var(--ff-pad);
}

.ff-page-hero__body {
  padding: 36px 48px 40px 0;
}

.ff-page-hero__eyebrow {
  color: var(--ff-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.ff-page-hero__title {
  margin: 14px 0 18px;
  color: var(--ff-title);
  font: 600 clamp(30px, 3.8vw, 52px) / 1.06 var(--ff-font-display);
  letter-spacing: -.02em;
}

.ff-page-hero__lead {
  max-width: 540px;
  margin: 0 0 28px;
  color: var(--ff-muted);
  font-size: 18px;
  line-height: 1.55;
}

.ff-page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ff-page-hero__note {
  max-width: 540px;
  margin: 22px 0 0;
  color: var(--ff-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Фото задаётся в HTML: style="--ff-page-img: url('…')" */
.ff-page-hero__media {
  position: relative;
  min-height: 400px;
  background: var(--ff-media-bg) var(--ff-page-img) center / cover no-repeat;
}

.ff-page-hero__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 90%;
  padding: 18px 28px;
  background: var(--ff-accent);
  color: #fff;
}

.ff-page-hero__tag strong {
  display: block;
  font: 600 clamp(26px, 3vw, 36px) / 1.1 var(--ff-font-display);
}

.ff-page-hero__tag span {
  font-size: 14px;
  font-weight: 600;
}

.ff-facts--4 { grid-template-columns: repeat(4, 1fr); }

/* Подменю страницы: прилипает к верху при прокрутке */
.ff-subnav {
  position: sticky;
  top: calc(var(--ff-sticky-top) + var(--ff-header-h) + env(safe-area-inset-top, 0px));
  z-index: 90;
  display: flex;
  gap: 30px;
  padding: 0 var(--ff-pad);
  overflow-x: auto;
  border-bottom: 1px solid var(--ff-line);
  background: var(--ff-bg);
}

.ff-subnav__link {
  flex: none;
  padding: 16px 0 13px;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  font-weight: 700;
  transition: color .2s, border-color .2s;
}

.ff-subnav__link:hover {
  border-bottom-color: var(--ff-accent);
  color: var(--ff-accent);
}

@media (max-width: 1000px) {
  .ff-facts--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .ff-crumbs { padding: 14px 18px 0; }
  .ff-page-hero__layout { grid-template-columns: 1fr; padding: 0; }
  .ff-page-hero__body { padding: 24px 18px 28px; }
  .ff-page-hero__media { min-height: 220px; }
  .ff-facts--4 { grid-template-columns: 1fr; }
  .ff-subnav { gap: 22px; padding: 0 18px; }
}


/* 9. Ночная версия
   Включается автоматически (тёмная тема устройства) или атрибутом на <html>:
   data-theme="dark" — ночная, data-theme="light" — светлая.
   Все компоненты берут цвета из токенов, поэтому здесь только значения.
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ff {
    color-scheme: dark;
    --ff-bg:           #0D0D0D;
    --ff-surface:      #1F1F1F;
    --ff-ink:          #FFFFFF;
    --ff-muted:        #9A9A9A;
    --ff-line:         #2F2F2F;
    --ff-title:        #FFFFFF;
    --ff-rule:         #4A4A4A;
    --ff-sep:          #6B6B6B;
    --ff-media-bg:     #1A1A1A;
    --ff-ink-contrast: #0D0D0D;
	--ff-accent:	   #2a2a2a;
  }
}

:root[data-theme="dark"] .ff {
  color-scheme: dark;
  --ff-bg:           #0D0D0D;
  --ff-surface:      #1F1F1F;
  --ff-ink:          #FFFFFF;
  --ff-muted:        #9A9A9A;
  --ff-line:         #2F2F2F;
  --ff-title:        #FFFFFF;
  --ff-rule:         #4A4A4A;
  --ff-sep:          #6B6B6B;
  --ff-media-bg:     #1A1A1A;
  --ff-ink-contrast: #0D0D0D;
  --ff-accent:	     #2a2a2a;
}

@media (prefers-reduced-motion: reduce) {
  .ff * { transition: none !important; }
}
</style></head><body><!-- ============================================================
     FLIPFLAT · Шапка с меню
     Нужно: css/flipflat-hero.css (разделы 1–4, 7) + js/header.js
     ============================================================ -->
<header class="ff ff-header">

  <a class="ff-header__logo" href="/">FLIP<b>FLAT</b></a>

  <!-- Текущий пункт подсвечивается автоматически (js/header.js сравнивает адрес страницы с href).
       Вручную: добавьте класс is-current нужной ссылке. -->
  <nav class="ff-nav" id="ff-nav" aria-label="Главное меню">
    <a class="ff-nav__link is-current" href="/">Главная</a>
    <a class="ff-nav__link" href="/remont/">Ремонт квартир</a>
    <a class="ff-nav__link" href="/furnish/">Меблировка</a>
    <a class="ff-nav__link" href="/invest/">Инвесторам</a>
    <a class="ff-nav__link" href="/property/">Квартиры</a>
    <a class="ff-nav__link" href="/contacts/">Контакты</a>
  </nav>

  <a class="ff-btn" href="#calc-home">Рассчитать смету</a>

  <button class="ff-header__burger" type="button"
          aria-label="Меню" aria-expanded="false" aria-controls="ff-nav"
          data-ff-burger>
    <span></span><span></span><span></span>
  </button>

</header>
<!-- ============================================================
     FLIPFLAT · Hero (вариант А «Индекс»)
     Нужно: css/flipflat-hero.css (разделы 1–3, 5–7) + js/hero.js
     Фото меняются в разделе 1 CSS (--ff-img-1 … --ff-img-4)
     ============================================================ -->
<section class="ff ff-hero" aria-label="Главный экран" data-ff-hero>

  <div class="ff-hero__layout">

    <!-- Фото: переключаются при наведении на строки списка (работает и без JS) -->
    <div class="ff-hero__media" aria-hidden="true">
      <div class="ff-hero__slide ff-hero__slide--1 is-active" data-ff-slide>
        <div class="ff-hero__caption"><strong>Капитальный ремонт</strong><span>Поэтапная сдача с фотоотчётом</span></div>
      </div>
      <div class="ff-hero__slide ff-hero__slide--2" data-ff-slide>
        <div class="ff-hero__caption"><strong>Меблировка</strong><span>Кухня, техника, хранение, свет</span></div>
      </div>
      <div class="ff-hero__slide ff-hero__slide--3" data-ff-slide>
        <div class="ff-hero__caption"><strong>Флиппинг под ключ</strong><span>Порог входа от 5 млн ₽</span></div>
      </div>
      <div class="ff-hero__slide ff-hero__slide--4" data-ff-slide>
        <div class="ff-hero__caption"><strong>Квартиры в продаже</strong><span>Ремонт, мебель и хоумстейджинг</span></div>
      </div>
    </div>

    <!-- Текст и направления -->
    <div class="ff-hero__body">
      <span class="ff-hero__eyebrow">Москва · полный цикл работ</span>

      <h1 class="ff-hero__title">Ремонт и меблировка квартир без сюрпризов</h1>

      <p class="ff-hero__lead">
        Стоимость работ и материалов фиксируется в договоре и не меняется
        до окончания работ. Поэтапная сдача и оплата.
      </p>

      <div class="ff-hero__list">
        <a class="ff-hero__row ff-hero__row--1 is-active" href="/remont/" data-ff-row>
          <span class="ff-hero__row-num">01</span>
          <b class="ff-hero__row-name">Капитальный ремонт</b>
          <span class="ff-hero__row-price">от 50 000 ₽/м²</span>
          <span class="ff-hero__row-arrow">→</span>
        </a>

        <a class="ff-hero__row ff-hero__row--2" href="/furnish/" data-ff-row>
          <span class="ff-hero__row-num">02</span>
          <b class="ff-hero__row-name">Меблировка</b>
          <span class="ff-hero__row-price">от 920 000 ₽</span>
          <span class="ff-hero__row-arrow">→</span>
        </a>

        <a class="ff-hero__row ff-hero__row--3" href="/invest/" data-ff-row>
          <span class="ff-hero__row-num">03</span>
          <b class="ff-hero__row-name">Инвесторам</b>
          <span class="ff-hero__row-price">до 30% годовых*</span>
          <span class="ff-hero__row-arrow">→</span>
        </a>

        <a class="ff-hero__row ff-hero__row--4" href="/property/" data-ff-row>
          <span class="ff-hero__row-num">04</span>
          <b class="ff-hero__row-name">Готовые квартиры</b>
          <span class="ff-hero__row-price">от 22,9 млн ₽</span>
          <span class="ff-hero__row-arrow">→</span>
        </a>
      </div>

      <div class="ff-hero__actions">
        <a class="ff-btn" href="#calc-home">Рассчитать за 30 секунд</a>
        <a class="ff-btn ff-btn--outline" href="#showroom">Записаться в шоурум</a>
      </div>
    </div>

  </div>

  <!-- Полоса с цифрами (можно использовать отдельно) -->
  <div class="ff-facts">
    <div class="ff-facts__item">
      <span class="ff-facts__value">15<em>+</em></span>
      <span class="ff-facts__text">недель на капремонт квартиры 55–60 м² во вторичке</span>
    </div>
    <div class="ff-facts__item">
      <span class="ff-facts__value">15<em>+</em></span>
      <span class="ff-facts__text">дней на меблировку квартиры 55–60 м² с готовой отделкой</span>
    </div>
    <div class="ff-facts__item">
      <span class="ff-facts__value">75<em>+</em></span>
      <span class="ff-facts__text">проектов по ремонту и меблировке выполнено</span>
    </div>
  </div>

</section>
<div class="ff" style="padding:60px var(--ff-pad);min-height:520px"><h2 style="font:800 32px var(--ff-font-display)">Далее содержимое страницы</h2><p style="color:var(--ff-muted);max-width:560px">Прокрутите страницу: шапка остаётся наверху.</p></div><script>/* FLIPFLAT · шапка: подсветка текущего пункта меню и «бургер» на телефоне */
(function () {
  'use strict';

  var nav = document.getElementById('ff-nav');
  var burger = document.querySelector('[data-ff-burger]');
  if (!nav) return;

  /* 1. Текущий пункт меню: сравниваем адрес страницы с href ссылок.
        «/» совпадает только с главной, «/remont/» — и с «/remont/», и с «/remont/что-то/». */
  function clean(path) {
    return path.replace(/\/+$/, '') || '/';
  }

  function markCurrent() {
    var path = clean(location.pathname);
    var found = null;

    nav.querySelectorAll('.ff-nav__link').forEach(function (link) {
      var href = clean(new URL(link.getAttribute('href'), location.origin).pathname);
      var match = href === '/' ? path === '/' : path === href || path.indexOf(href + '/') === 0;
      if (match) found = link;
    });

    if (!found) return;   // ничего не нашли: оставляем то, что задано вручную

    nav.querySelectorAll('.ff-nav__link').forEach(function (link) {
      var on = link === found;
      link.classList.toggle('is-current', on);
      if (on) link.setAttribute('aria-current', 'page');
      else link.removeAttribute('aria-current');
    });
  }

  markCurrent();

  /* 2. Меню на телефоне */
  if (!burger) return;

  function setOpen(open) {
    nav.classList.toggle('is-open', open);
    burger.setAttribute('aria-expanded', String(open));
  }

  burger.addEventListener('click', function () {
    setOpen(!nav.classList.contains('is-open'));
  });

  nav.addEventListener('click', function (e) {
    if (e.target.closest('a')) setOpen(false);
  });

  document.addEventListener('keydown', function (e) {
    if (e.key === 'Escape') setOpen(false);
  });

  document.addEventListener('click', function (e) {
    if (!e.target.closest('.ff-header')) setOpen(false);
  });

  window.addEventListener('resize', function () {
    if (window.innerWidth > 860) setOpen(false);
  });
})();
/* FLIPFLAT · Hero: запоминает выбранную строку списка и показывает её фото.
   Само переключение при наведении работает и в CSS (см. раздел 5). */
(function () {
  'use strict';

  function init(hero) {
    var rows = hero.querySelectorAll('[data-ff-row]');
    var slides = hero.querySelectorAll('[data-ff-slide]');

    function show(index) {
      rows.forEach(function (row, i) {
        row.classList.toggle('is-active', i === index);
      });
      slides.forEach(function (slide, i) {
        slide.classList.toggle('is-active', i === index);
      });
    }

    rows.forEach(function (row, index) {
      row.addEventListener('mouseenter', function () { show(index); });
      row.addEventListener('focus', function () { show(index); });
    });
  }

  function run() {
    document.querySelectorAll('[data-ff-hero]').forEach(init);
  }

  if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', run);
  } else {
    run();
  }
})();
</script><button id="th" style="position:fixed;right:16px;bottom:16px;z-index:300;padding:12px 16px;border:2px solid #FF6B2C;background:#FF6B2C;color:#fff;font:800 14px Manrope,sans-serif;cursor:pointer">🌓 День / ночь</button><script>(function(){var d=document.documentElement,b=document.getElementById("th");b.onclick=function(){var dark=d.dataset.theme?d.dataset.theme==="dark":matchMedia("(prefers-color-scheme: dark)").matches;d.dataset.theme=dark?"light":"dark"}})();</script></body></html>



