

/* Цвет активного пункта меню */
.t-active { 
  color:#FF6A00 !important; /* фирменный оранжевый */
  font-weight:600;
  transition:color .2s ease;
}



/* --- Шрифты --- */
body {
  font-family: 'Montserrat', 'Inter', sans-serif;
  color: #ffffff;
  background-color: #0A0A0A;
}

/* --- Заголовки --- */
h1, h2, h3 {
  color: #ffffff;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }

/* --- Меню --- */
.t-menu__link-item {
  color: #ffffff !important;
  transition: color 0.2s ease;
}
.t-menu__link-item:hover {
  color: #FF6A00 !important;
}
.t-menu__link-item.t-active {
  color: #FF6A00 !important;
  font-weight: 600;
}
.t-menu__link-item::after {
  border-color: rgba(255,255,255,0.3) !important;
}

/* --- Кнопки --- */
.t-btn {
  background: #FF6A00 !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  padding: 14px 32px !important;
  font-size: 16px !important;
  font-weight: 600;
  transition: all 0.25s ease;
}
.t-btn:hover {
  background: #E53935 !important;
  transform: translateY(-2px);
}

/* --- Подзаголовки и мелкий текст --- */
small, .secondary-text {
  color: #CCCCCC;


document.addEventListener('DOMContentLoaded', function () {
  // ID секций (нужно задать якоря в настройках блоков!)
  const ids = ['home','about','service','projects','gallery','contacts'];

  // Собираем секции по ID
  const sections = ids.map(id => document.getElementById(id)).filter(Boolean);

  // Сопоставляем ссылки href="#..." с меню
  const links = {};
  document.querySelectorAll('a[href^="#"]').forEach(a=>{
    const key = a.getAttribute('href').slice(1);
    if (ids.includes(key)) links[key] = a;
  });

  const setActive = key => {
    Object.values(links).forEach(l => l.classList.remove('t-active'));
    if (links[key]) links[key].classList.add('t-active');
  };

  // Подсветка при скролле
  const io = new IntersectionObserver(entries=>{
    entries.forEach(e=>{
      if (e.isIntersecting) setActive(e.target.id);
    });
  }, { rootMargin:'-40% 0px -50% 0px', threshold:[0.1] });

  sections.forEach(s => io.observe(s));
});

    
}


