/* ============================================
   WEBMIT — Design System
   Світлий мінімалізм + неон #FF4800
   ============================================ */

:root {
  /* Backgrounds */
  --bg-main: #FFFFFF;
  --bg-section: #F9FAFB;
  --bg-accent: #FFF5F2;

  /* Text */
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;

  /* Accent */
  --accent: #FF4800;
  --accent-hover: #E65C00;
  --accent-light: #FF6B35;

  /* Buttons */
  --btn-radius: 50px;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 30px rgba(255, 72, 0, 0.15);

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --h1-size: 56px;
  --h1-size-mobile: 36px;
  --h2-size: 42px;
  --h2-size-mobile: 28px;
  --h3-size: 32px;
  --h3-size-mobile: 24px;
  --body-size: 18px;
  --body-size-mobile: 16px;

  --header-height: 80px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-main);
}
@media (max-width: 767px) {
  body { font-size: var(--body-size-mobile); }
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--accent-hover); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 1440px) { .container { max-width: 1320px; } }
@media (max-width: 767px) { .container { padding: 0 16px; } }

/* Typography */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin: 0 0 0.5em;
  color: var(--text-primary);
}
h1 { font-size: var(--h1-size); line-height: 1.15; }
h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }
@media (max-width: 767px) {
  h1 { font-size: var(--h1-size-mobile); }
  h2 { font-size: var(--h2-size-mobile); }
  h3 { font-size: var(--h3-size-mobile); }
}

.section__title {
  text-align: center;
  margin-bottom: 48px;
}
@media (max-width: 767px) { .section__title { margin-bottom: 32px; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  border: none;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  will-change: transform;
}
.btn--primary {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: var(--shadow-soft);
}
.btn--primary:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
}
.btn--lg { padding: 18px 36px; font-size: 18px; }

/* ========== HEADER ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 24px;
  color: var(--text-primary);
}
.logo:hover { color: var(--accent); }

.nav__list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px 32px;
}
.nav__list a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 15px;
}
.nav__list a:hover { color: var(--accent); }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  aria-label: "Меню";
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: transform 0.3s, opacity 0.3s;
}
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-main);
  padding: 24px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.nav-mobile.is-open { opacity: 1; visibility: visible; }
.nav-mobile__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-mobile__list li { margin-bottom: 16px; }
.nav-mobile__list a {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}
.nav-mobile__cta {
  display: none;
  margin-top: 24px;
  width: 100%;
  max-width: 280px;
  text-align: center;
}

@media (max-width: 1023px) {
  .nav { display: none; }
  .header__cta { display: none !important; }
  .burger { display: flex; }
  .nav-mobile { display: block; }
  .nav-mobile__cta { display: inline-flex; }
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 40px) 0 80px;
  background: linear-gradient(135deg, var(--bg-main) 0%, var(--bg-section) 100%);
  position: relative;
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero__content { position: relative; z-index: 2; }
.hero__title {
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}
.hero__subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin: 0 0 32px;
  max-width: 520px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease 0.15s forwards;
}
.hero__cta {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease 0.3s forwards;
}
.hero__visual {
  position: relative;
  opacity: 0;
  transform: translateX(30px);
  animation: fadeRight 0.6s ease 0.2s forwards;
}
.hero__visual-inner {
  aspect-ratio: 4/3;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  background: var(--bg-section);
}
.hero__visual-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeRight {
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1023px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__subtitle { margin-left: auto; margin-right: auto; }
  .hero__visual { order: -1; max-width: 400px; margin: 0 auto; }
}
@media (max-width: 767px) {
  .hero { min-height: auto; padding: calc(var(--header-height) + 24px) 0 48px; }
  .hero__subtitle { font-size: var(--body-size-mobile); }
}

/* ========== CALCULATOR (in hero or separate) ========== */
.calculator {
  margin-top: 48px;
  padding: 32px;
  background: var(--bg-main);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}
.calculator__title { font-size: var(--h3-size); margin-bottom: 24px; }
.calculator__form .calculator__row { margin-bottom: 20px; }
.calculator__label { display: block; font-weight: 500; margin-bottom: 8px; color: var(--text-primary); }
.calculator__select {
  width: 100%;
  max-width: 320px;
  padding: 12px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  font-size: 16px;
  background: var(--bg-main);
}
.calculator__options { display: flex; flex-wrap: wrap; gap: 12px; }
.calculator__radio { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.calculator__radio input { accent-color: var(--accent); }
.calculator__submit { margin-top: 8px; }
.calculator__result { text-align: center; }
.calculator__result-label { color: var(--text-secondary); margin-bottom: 8px; }
.calculator__result-price { font-family: var(--font-heading); font-size: 32px; font-weight: 700; color: var(--accent); margin: 0 0 16px; }

/* ========== SECTIONS ========== */
.section {
  padding: 80px 0;
}
.section--alt { background: var(--bg-section); }
.section--accent { background: var(--bg-accent); }
@media (max-width: 767px) { .section { padding: 48px 0; } }

/* ========== ABOUT ========== */
.about__content {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.about__content p { color: var(--text-secondary); margin: 0 0 16px; }
.about__tagline { font-weight: 500; color: var(--text-primary) !important; }
.about__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.about-card {
  background: var(--bg-main);
  padding: 32px;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}
.about-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.about-card__icon { font-size: 48px; margin-bottom: 16px; }
.about-card__title { font-size: 18px; margin-bottom: 8px; }
.about-card__text { font-size: 15px; color: var(--text-secondary); margin: 0; }
@media (max-width: 767px) { .about__grid { grid-template-columns: 1fr; } }

/* ========== NUMBERS ========== */
.numbers { background: var(--bg-section); }
.numbers__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.numbers__item {
  text-align: center;
  padding: 24px 16px;
}
.numbers__value {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 48px;
  color: var(--accent);
  margin-bottom: 8px;
  line-height: 1.1;
}
.numbers__label {
  font-size: 16px;
  color: var(--text-secondary);
}
@media (max-width: 767px) {
  .numbers__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .numbers__value { font-size: 36px; }
}

/* ========== FORM BLOCK ========== */
.form-block { background: var(--bg-accent); }
.form-block__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}
.form-block__info h3 { margin-bottom: 16px; }
.form-block__info p { color: var(--text-secondary); margin: 0 0 12px; }
.form-block__bonuses { margin-top: 24px; padding-left: 20px; }
.form-block__bonuses li { margin-bottom: 8px; color: var(--text-secondary); }
.form-card {
  background: var(--bg-main);
  padding: 40px;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}
.form__row { margin-bottom: 20px; }
.form__label { display: block; font-weight: 500; margin-bottom: 8px; color: var(--text-primary); }
.form__input, .form__select, .form__textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  font-size: 16px;
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form__input:focus, .form__select:focus, .form__textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 72, 0, 0.1);
}
.form__input--error { border-color: #EF4444; }
.form__error { font-size: 13px; color: #EF4444; margin-top: 4px; display: block; }
.form__textarea { min-height: 100px; resize: vertical; }
.form__messenger {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.form__messenger label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 2px solid #E5E7EB;
  border-radius: var(--btn-radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.form__messenger input { display: none; }
.form__messenger label:has(input:checked) { border-color: var(--accent); background: var(--bg-accent); }
.form__submit { margin-top: 8px; }
@media (max-width: 767px) {
  .form-block__inner { grid-template-columns: 1fr; }
  .form-card { padding: 24px; }
}

/* ========== SERVICES ========== */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1023px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}
.service-card {
  background: var(--bg-main);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.service-card__img {
  aspect-ratio: 16/10;
  background: var(--bg-section);
  overflow: hidden;
}
.service-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.service-card__body { padding: 28px; }
.service-card__title { margin-bottom: 12px; }
.service-card__desc { color: var(--text-secondary); margin: 0 0 16px; font-size: 16px; }
.service-card__prices { margin-bottom: 20px; font-size: 15px; color: var(--text-secondary); }
.service-card__prices p { margin: 0 0 4px; }
.service-card__prices strong { color: var(--text-primary); }
@media (max-width: 767px) { .services__grid { grid-template-columns: 1fr; } }

/* ========== PORTFOLIO ========== */
.portfolio__scroll-wrapper {
  position: relative;
  overflow: hidden;
  margin: 0 -24px;
  padding: 0 24px;
}
.portfolio__scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-section);
  padding-bottom: 16px;
}
.portfolio__scroll::-webkit-scrollbar {
  height: 8px;
}
.portfolio__scroll::-webkit-scrollbar-track {
  background: var(--bg-section);
  border-radius: 10px;
}
.portfolio__scroll::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}
.portfolio__scroll::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}
.portfolio-card {
  flex: 0 0 400px;
  background: var(--bg-main);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}
.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.portfolio-card__img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-section);
}
.portfolio-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portfolio-card__content {
  padding: 24px;
}
.portfolio-card__title {
  font-size: 22px;
  margin-bottom: 8px;
}
.portfolio-card__type {
  color: var(--text-secondary);
  margin: 0 0 16px;
  font-size: 15px;
}
@media (max-width: 767px) {
  .portfolio-card { flex: 0 0 300px; }
  .portfolio__scroll-wrapper { margin: 0 -16px; padding: 0 16px; }
}

/* ========== STEPS (Cards) ========== */
.steps__intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
  color: var(--text-secondary);
  font-size: 18px;
}
.steps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.steps__card {
  background: var(--bg-main);
  padding: 32px;
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}
.steps__card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.steps__card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
.steps__card-icon {
  font-size: 56px;
  margin-bottom: 20px;
  display: inline-block;
}
.steps__card-title {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.steps__card-text {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}
@media (max-width: 1023px) {
  .steps__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .steps__grid { grid-template-columns: 1fr; }
  .steps__intro { font-size: 16px; margin-bottom: 32px; }
}

/* ========== REVIEWS (Carousel) ========== */
.reviews { background: var(--bg-section); }
.reviews__wrap {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
}
.reviews__track {
  display: flex;
  gap: 24px;
  transition: transform 0.4s ease;
  will-change: transform;
}
.reviews__slide {
  flex: 0 0 calc(50% - 12px);
  min-width: 0;
}
@media (max-width: 767px) {
  .reviews__slide { flex: 0 0 100%; }
}
.review-card {
  background: var(--bg-main);
  padding: 32px;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  height: 100%;
  transition: box-shadow 0.3s;
}
.review-card:hover { box-shadow: var(--shadow-hover); }
.review-card__stars { color: #FBBF24; font-size: 18px; margin-bottom: 16px; letter-spacing: 2px; }
.review-card__text { color: var(--text-secondary); margin: 0 0 20px; font-style: italic; }
.review-card__name { font-weight: 600; margin: 0 0 4px; }
.review-card__company { font-size: 14px; color: var(--text-muted); margin: 0; }
.reviews__nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}
.reviews__nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #E5E7EB;
  background: var(--bg-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.reviews__nav-btn:hover { border-color: var(--accent); background: var(--bg-accent); }
.reviews__nav-btn svg { width: 24px; height: 24px; }

/* ========== FAQ ========== */
.faq { max-width: 720px; margin: 0 auto; }
.faq__item {
  background: var(--text-primary);
  color: #fff;
  border-radius: 16px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.faq__question:hover { background: rgba(255,255,255,0.05); }
.faq__question::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform 0.3s;
}
.faq__item.is-open .faq__question::after { transform: rotate(45deg); }
.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq__item.is-open .faq__answer { max-height: 400px; }
.faq__answer-inner { padding: 0 24px 20px; }
.faq__answer p { margin: 0; color: rgba(255,255,255,0.85); font-size: 16px; line-height: 1.6; }
.faq__cta { text-align: center; margin-top: 32px; }

/* ========== FOOTER ========== */
.footer {
  background: var(--text-primary);
  color: #fff;
  padding: 64px 0 24px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 48px;
  align-items: start;
  margin-bottom: 40px;
}
.footer__brand .logo { color: #fff; }
.footer__brand .logo:hover { color: var(--accent); }
.footer__desc { color: rgba(255,255,255,0.7); font-size: 15px; margin: 12px 0 0; max-width: 280px; }
.footer__nav ul, .footer__links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__nav li, .footer__links li { margin-bottom: 10px; }
.footer__nav a, .footer__links a {
  color: rgba(255,255,255,0.8);
  font-size: 15px;
}
.footer__nav a:hover, .footer__links a:hover { color: #fff; }
.footer__title { font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.5); margin: 0 0 16px; }
.footer__social { display: flex; gap: 16px; }
.footer__social a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.8);
  font-size: 15px;
}
.footer__social a:hover { color: #fff; }
.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer__copy { color: rgba(255,255,255,0.5); font-size: 14px; margin: 0; }
.footer__link { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer__link:hover { color: #fff; }
@media (max-width: 767px) {
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ========== SCROLL ANIMATIONS ========== */
.animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .animate, .animate-stagger > *, .steps__item,
  .hero__title, .hero__subtitle, .hero__cta, .hero__visual {
    transition: none;
    animation: none;
    opacity: 1;
    transform: none;
  }
  .btn:hover { transform: none; }
  .service-card:hover, .portfolio-card:hover, .about-card:hover { transform: none; }
}

/* Stagger children */
.animate-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.animate-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.animate-stagger.is-visible > *:nth-child(3) { transition-delay: 0.2s; }
.animate-stagger.is-visible > *:nth-child(4) { transition-delay: 0.3s; }
.animate-stagger.is-visible > *:nth-child(5) { transition-delay: 0.4s; }
.animate-stagger.is-visible > *:nth-child(6) { transition-delay: 0.5s; }
.animate-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
