/* =========================================================
   АТЛАС БОЛЬШИХ ПОРОД СОБАК — главная страница
   Широкая раскладка, полноэкранный hero, секция-змейка
   Использует переменные из styles.css
   ========================================================= */

/* Широкие отступы по краям, как на премиальных сайтах */
:root{ --edge: clamp(20px, 5vw, 72px); }

.home main{overflow-x:hidden}

/* =========================================================
   HERO — полноэкранная фото-карусель
   ========================================================= */
.hero-full{
  position:relative;
  height:100svh;
  min-height:560px;
  width:100%;
  overflow:hidden;
  display:flex;
  align-items:flex-end;
}
.hero-slides{position:absolute;inset:0;z-index:0}
.hero-slide{
  position:absolute;inset:0;
  opacity:0;
  transition:opacity 1.1s var(--ease);
  background-size:cover;
  background-position:center;
}
.hero-slide.active{opacity:1}
/* затемнение снизу для читаемости текста */
.hero-full::after{
  content:"";position:absolute;inset:0;z-index:1;
  background:linear-gradient(180deg, rgba(20,28,22,.10) 0%, rgba(20,28,22,.06) 45%, rgba(20,28,22,.72) 100%);
}
.hero-content{
  position:relative;z-index:2;
  width:100%;
  padding:0 var(--edge) clamp(3rem,7vh,6rem);
  color:#fff;
}
.hero-content h1{
  font-family:'Fraunces',serif;
  color:#fff;
  font-size:clamp(2.6rem,7vw,6rem);
  line-height:1.02;
  font-weight:500;
  max-width:16ch;
  margin-bottom:1.4rem;
  text-shadow:0 2px 30px rgba(0,0,0,.25);
}
.hero-content h1 em{font-style:italic;color:#F2C9A0}
.hero-lead-full{
  font-size:clamp(1rem,1.5vw,1.3rem);
  line-height:1.55;
  max-width:52ch;
  color:rgba(255,255,255,.92);
  margin-bottom:2rem;
}
.hero-cta{
  display:inline-flex;align-items:center;gap:.6rem;
  background:#fff;color:var(--ink);
  padding:1rem 1.8rem;border-radius:999px;
  font-weight:600;font-size:1.02rem;
  transition:transform .2s var(--ease),box-shadow .2s var(--ease);
}
.hero-cta:hover{transform:translateY(-3px);box-shadow:0 14px 40px rgba(0,0,0,.3)}

/* стрелки-индикаторы карусели */
.hero-dots{
  position:absolute;z-index:3;
  bottom:clamp(1.4rem,3vh,2.4rem);right:var(--edge);
  display:flex;gap:.6rem;
}
.hero-dot{width:36px;height:4px;border-radius:2px;background:rgba(255,255,255,.4);border:none;cursor:pointer;padding:0;transition:background .3s var(--ease)}
.hero-dot.active{background:#fff}

/* =========================================================
   ОБЩИЕ ШИРОКИЕ СЕКЦИИ
   ========================================================= */
.home-section{padding:clamp(4rem,9vh,8rem) var(--edge)}
.home-narrow{max-width:1320px;margin-inline:auto}

/* Вступление */
.intro{text-align:center}
.intro p{
  font-family:'Fraunces',serif;
  font-size:clamp(1.5rem,3.2vw,2.6rem);
  line-height:1.32;
  font-weight:400;
  color:var(--ink);
  max-width:24ch;
  margin-inline:auto;
}

/* =========================================================
   ПОРОДЫ — широкие карточки с фото
   ========================================================= */
.home-breeds .home-h2{
  font-family:'Fraunces',serif;
  font-size:clamp(2rem,4vw,3.2rem);
  margin-bottom:2.5rem;
}
.breed-cards{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:clamp(1rem,1.6vw,1.4rem);
}
.breed-photo-card{
  position:relative;
  border-radius:22px;
  overflow:hidden;
  aspect-ratio:4/5;
  box-shadow:var(--shadow);
  transition:transform .35s var(--ease),box-shadow .35s var(--ease);
}
.breed-photo-card img{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  transition:transform .6s var(--ease);
}
.breed-photo-card::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(20,28,22,0) 40%,rgba(20,28,22,.78) 100%);
}
.breed-photo-card:hover{transform:translateY(-6px);box-shadow:var(--shadow-lg)}
.breed-photo-card:hover img{transform:scale(1.05)}
.breed-card-body{
  position:absolute;z-index:2;left:0;right:0;bottom:0;
  padding:1.6rem;color:#fff;
}
.breed-card-body h3{
  font-family:'Fraunces',serif;color:#fff;
  font-size:clamp(1.4rem,2vw,1.8rem);margin-bottom:.3rem;
}
.breed-card-body span{font-size:.95rem;color:rgba(255,255,255,.85)}

/* Кнопка "Смотреть все" с лапкой */
.see-all-wrap{display:flex;justify-content:center;margin-top:clamp(2.5rem,5vh,4rem)}
.see-all{
  display:inline-flex;align-items:center;gap:1.2rem;
  background:var(--accent);color:#fff;
  padding:.7rem .7rem .7rem 2.2rem;
  border-radius:999px;font-weight:600;font-size:1.1rem;
  transition:background .2s var(--ease),transform .2s var(--ease);
}
.see-all:hover{background:var(--accent-dk);transform:translateY(-2px)}
.see-all .paw{
  width:48px;height:48px;border-radius:50%;background:#fff;
  display:grid;place-items:center;flex:0 0 auto;
}
.see-all .paw svg{width:26px;height:26px;fill:var(--accent)}

/* =========================================================
   ЗМЕЙКА — путь по карточке породы
   ========================================================= */
.snake-section .home-h2{
  font-family:'Fraunces',serif;
  font-size:clamp(2rem,4vw,3.2rem);
  text-align:center;margin-bottom:clamp(3rem,6vh,5rem);
}
.snake{position:relative;max-width:900px;margin-inline:auto}
.snake-path{position:absolute;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}
.snake-steps{position:relative;z-index:1;display:flex;flex-direction:column;gap:clamp(2rem,5vh,4rem)}
.snake-step{display:flex;align-items:center;gap:1.6rem;max-width:440px}
.snake-step:nth-child(odd){align-self:flex-start;flex-direction:row}
.snake-step:nth-child(even){align-self:flex-end;flex-direction:row-reverse;text-align:right}
.snake-num{
  flex:0 0 auto;width:64px;height:64px;border-radius:50%;
  background:var(--accent);color:#fff;
  display:grid;place-items:center;
  font-family:'Fraunces',serif;font-size:1.5rem;font-weight:600;
  box-shadow:var(--shadow);
}
.snake-step:nth-child(even) .snake-num{background:var(--ink)}
.snake-text h3{font-family:'Fraunces',serif;font-size:1.4rem;margin-bottom:.2rem}
.snake-text p{color:var(--ink-soft);font-size:.96rem}

/* =========================================================
   ОТ АВТОРА
   ========================================================= */
.author-section{background:#F0E9DC;text-align:center}
.author-section .eyebrow{display:block;margin-bottom:1rem}
.author-section .home-h2{font-family:'Fraunces',serif;font-size:clamp(1.8rem,3.5vw,2.6rem);margin-bottom:1.4rem}
.author-section p{
  font-size:clamp(1.05rem,1.6vw,1.25rem);
  line-height:1.65;color:var(--ink-soft);
  max-width:60ch;margin-inline:auto;
}

/* =========================================================
   АДАПТИВ
   ========================================================= */
@media (max-width:1024px) and (min-width:861px){
  .breed-cards{grid-template-columns:repeat(2,1fr);max-width:720px;margin-inline:auto}
}
@media (max-width:860px){
  .breed-cards{grid-template-columns:1fr;max-width:440px;margin-inline:auto}
  .snake-step,
  .snake-step:nth-child(odd),
  .snake-step:nth-child(even){align-self:center;flex-direction:row;text-align:left;max-width:100%}
  .snake-step:nth-child(even){flex-direction:row}
  .snake-path{display:none}
}

@media (prefers-reduced-motion:reduce){
  .hero-slide{transition:none}
}

/* =========================================================
   ПОЯВЛЕНИЕ БЛОКОВ ГЛАВНОЙ ПРИ ПРОКРУТКЕ
   Прячем ТОЛЬКО если JS пометил <html> классом js-reveal.
   Без JS всё видно сразу (прогрессивное улучшение).
   ========================================================= */
.js-reveal .intro [data-reveal],
.js-reveal .home-breeds [data-reveal],
.js-reveal .snake-section [data-reveal],
.js-reveal .author-section [data-reveal]{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .6s var(--ease),transform .6s var(--ease);
}
.js-reveal .intro [data-reveal].is-visible,
.js-reveal .home-breeds [data-reveal].is-visible,
.js-reveal .snake-section [data-reveal].is-visible,
.js-reveal .author-section [data-reveal].is-visible{
  opacity:1;
  transform:none;
}

/* Карточки пород появляются по очереди — лёгкая каскадная задержка */
.js-reveal .breed-cards [data-reveal]:nth-child(2){transition-delay:.08s}
.js-reveal .breed-cards [data-reveal]:nth-child(3){transition-delay:.16s}
.js-reveal .breed-cards [data-reveal]:nth-child(4){transition-delay:.24s}

@media (prefers-reduced-motion:reduce){
  .js-reveal .intro [data-reveal],
  .js-reveal .home-breeds [data-reveal],
  .js-reveal .snake-section [data-reveal],
  .js-reveal .author-section [data-reveal]{
    opacity:1;
    transform:none;
    transition:none;
  }
}

/* =========================================================
   ШАПКА ПОВЕРХ HERO (прозрачная)
   ========================================================= */
.home .site-header-overlay{
  position:absolute;top:0;left:0;right:0;z-index:10;
  background:transparent;border-bottom:none;
}
.home .site-header-overlay .brand-text,
.home .site-header-overlay .nav-links a{color:#fff}
.home .site-header-overlay .brand-mark{color:#fff}
.home .site-header-overlay .nav-links a:hover{color:#F2C9A0}
/* подложка под меню для читаемости на светлых фото */
.home .site-header-overlay::before{
  content:"";position:absolute;inset:0;z-index:-1;
  background:linear-gradient(180deg,rgba(20,28,22,.38),rgba(20,28,22,0));
  pointer-events:none;
}
.home .nav-toggle span{background:#fff}

/* =========================================================
   СТРАНИЦА КАТАЛОГА (breeds.html)
   ========================================================= */
.catalog-head{padding:clamp(2.5rem,6vw,4.5rem) var(--edge) 0}
.catalog-head .crumbs{font-size:.9rem;color:var(--ink-soft);margin-bottom:1.5rem;display:flex;gap:.6rem;align-items:center}
.catalog-head .crumbs a{color:var(--accent-dk)}
.catalog-head .crumbs span{color:var(--line)}
.catalog-head h1{font-family:'Fraunces',serif;font-size:clamp(2.6rem,6vw,4.4rem);line-height:1.02;margin-bottom:1.2rem}
.catalog-head p{font-size:clamp(1.05rem,1.5vw,1.25rem);color:var(--ink-soft);max-width:60ch;line-height:1.6}
.catalog-grid-section{padding-top:clamp(2.5rem,5vw,3.5rem)}
.catalog-cards{grid-template-columns:repeat(3,1fr)}
/* Сдвигаем фокус обрезки фото вверх, чтобы морды и уши собак
   не срезались верхним краем карточки (низ кадра обрезается вместо них) */
.catalog-cards .breed-photo-card img{object-position:center 28%}
@media (max-width:860px){
  .catalog-cards{grid-template-columns:1fr;max-width:440px;margin-inline:auto}
}

/* =========================================================
   ЛИПКАЯ ШАПКА НА ГЛАВНОЙ при прокрутке вниз
   ========================================================= */
.home .site-header-overlay{
  position:fixed;
  transition:background .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
/* Состояние «прокручено»: светлая закреплённая панель как на страницах пород */
.home .site-header-overlay.is-stuck{
  background:rgba(247,243,236,.92);
  backdrop-filter:saturate(140%) blur(10px);
  -webkit-backdrop-filter:saturate(140%) blur(10px);
  border-bottom:1px solid var(--line);
  box-shadow:0 6px 24px rgba(31,58,46,.06);
}
.home .site-header-overlay.is-stuck::before{opacity:0}
.home .site-header-overlay.is-stuck .brand-text,
.home .site-header-overlay.is-stuck .nav-links a{color:var(--ink)}
.home .site-header-overlay.is-stuck .brand-mark{color:var(--accent)}
.home .site-header-overlay.is-stuck .nav-links a:hover{color:var(--accent)}
.home .site-header-overlay.is-stuck .nav-toggle span{background:var(--ink)}
