/* ============================================================
   NOWELLA - ворота, автоматика и солнцезащита
   Тёмный графит + янтарный акцент. Mobile-first.
   ============================================================ */

:root {
  --bg: #15181c;
  --bg-2: #1c2127;
  --bg-3: #232a32;
  --light: #f4f5f7;
  --light-2: #ffffff;
  --text: #e8eaed;
  --text-dim: #9aa3ad;
  --text-dark: #1c2127;
  --text-dark-dim: #5b6672;
  --accent: #F28A1E;
  --accent-hover: #ffa03c;
  --accent-soft: rgba(242, 138, 30, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --header-h: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  min-width: 0;
}

.accent { color: var(--accent); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn--accent {
  background: var(--accent);
  color: #15181c;
  box-shadow: 0 8px 24px rgba(242, 138, 30, 0.35);
}
.btn--accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(242, 138, 30, 0.45);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--lg { padding: 16px 32px; font-size: 16px; }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.header.is-scrolled {
  background: rgba(21, 24, 28, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.header__logo { color: #fff; flex-shrink: 0; display: inline-flex; align-items: center; gap: 11px; }
.header__logo .brand__icon { height: 34px; width: auto; }
.footer__logo { display: inline-flex; align-items: center; gap: 10px; }
.footer__logo .brand__icon { height: 30px; width: auto; }
.brand__word { font-family: var(--font-body); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; color: #fff; line-height: 1; white-space: nowrap; }
.footer__logo .brand__word { font-size: 20px; }

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav__link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  position: relative;
  transition: color 0.2s ease;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.nav__link:hover { color: #fff; }
.nav__link:hover::after { width: 100%; }

.nav__phone {
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  transition: color 0.2s ease;
}
.nav__phone:hover { color: var(--accent); }

.nav__cta { padding: 11px 22px; font-size: 14px; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 110;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(21, 24, 28, 0.55) 0%, rgba(21, 24, 28, 0.35) 40%, rgba(21, 24, 28, 0.92) 100%),
    linear-gradient(100deg, rgba(21, 24, 28, 0.85) 0%, rgba(21, 24, 28, 0.35) 60%, rgba(21, 24, 28, 0.15) 100%);
}

.hero__content {
  position: relative;
  max-width: 1200px;
}

.hero__kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 8px 16px;
  border: 1px solid rgba(242, 138, 30, 0.4);
  border-radius: 999px;
  background: rgba(21, 24, 28, 0.5);
  backdrop-filter: blur(4px);
  margin-bottom: 22px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 6.4vw, 62px);
  line-height: 1.12;
  color: #fff;
  max-width: 850px;
  margin-bottom: 20px;
  text-wrap: balance;
}

.hero__subtitle {
  font-size: clamp(16px, 2.2vw, 19px);
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.hero__badges li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}
.hero__badges svg {
  width: 21px;
  height: 21px;
  color: var(--accent);
  flex-shrink: 0;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
}
.hero__scroll span {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 3px;
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Секции общее ---------- */
.section { padding: 80px 0; }

.section--light {
  background: var(--light);
  color: var(--text-dark);
}

.section__head {
  max-width: 720px;
  margin-bottom: 44px;
}

.section__kicker {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 4.4vw, 40px);
  color: inherit;
}

.section__lead {
  margin-top: 16px;
  font-size: 17px;
  color: var(--text-dim);
}
.section--light .section__lead { color: var(--text-dark-dim); }

/* ---------- Услуги ---------- */
.services { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }

.services__group { margin-bottom: 24px; }
.services__group--second { margin-top: 56px; }

.services__cat {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 3vw, 24px);
  color: #fff;
}
.services__cat-num {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(242, 138, 30, 0.35);
  border-radius: 8px;
  padding: 5px 10px;
  flex-shrink: 0;
}

.services__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

/* --- Карточка услуги --- */
.card {
  position: relative;
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-3);
  box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--header-h) + 16px);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.card:hover .card__media img { transform: scale(1.07); }

.card__body {
  position: relative;
  padding: 20px 22px 22px;
}
.card__body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 42px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
  transition: width 0.35s ease;
}
.card:hover .card__body::before { width: 72px; }

.card__title {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.card__desc {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  transition: color 0.25s ease, gap 0.25s ease;
}
.card__cta svg { width: 18px; height: 18px; transition: transform 0.25s ease; }
.card__cta:hover { color: var(--accent-hover); }
.card__cta:hover svg { transform: translateX(4px); }

/* ---------- Почему мы ---------- */
.why__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.why__item {
  background: var(--light-2);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: 0 6px 24px rgba(28, 33, 39, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.why__item:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(28, 33, 39, 0.13);
}

.why__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.why__icon svg { width: 28px; height: 28px; }

.why__item h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}
.why__item p {
  font-size: 15px;
  color: var(--text-dark-dim);
}

/* ---------- Этапы ---------- */
.steps { background: var(--bg); }

.steps__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  counter-reset: step;
}

.steps__item {
  position: relative;
  background: var(--bg-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 26px 24px;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.steps__item:hover {
  border-color: rgba(242, 138, 30, 0.45);
  transform: translateY(-4px);
}

.steps__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(242, 138, 30, 0.7);
  margin-bottom: 16px;
}

.steps__item h3 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}
.steps__item p {
  font-size: 15px;
  color: var(--text-dim);
}

/* ---------- Форма ---------- */
.request__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.request__text {
  margin-top: 16px;
  font-size: 16px;
  color: var(--text-dark-dim);
  max-width: 480px;
}

.request__list {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}
.request__list li {
  position: relative;
  padding-left: 28px;
  font-size: 15px;
  font-weight: 600;
}
.request__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  clip-path: none;
}
.request__list li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 7px;
  height: 4px;
  border-left: 2px solid #15181c;
  border-bottom: 2px solid #15181c;
  transform: rotate(-45deg);
}

.request__wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  font-size: 15px;
  font-weight: 800;
  color: #1faa59;
  transition: opacity 0.2s ease;
}
.request__wa:hover { opacity: 0.75; }
.request__wa svg { width: 24px; height: 24px; flex-shrink: 0; }

.form {
  background: var(--light-2);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: 0 14px 44px rgba(28, 33, 39, 0.12);
  display: grid;
  gap: 18px;
  position: relative;
  min-width: 0;
}

.form__field { display: grid; gap: 7px; min-width: 0; }

.form__field label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dark-dim);
}

.form__field input,
.form__field select,
.form__field textarea {
  width: 100%;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-dark);
  background: var(--light);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}
.form__field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%235b6672' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
  cursor: pointer;
}
.form__field textarea { resize: vertical; min-height: 88px; }

.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
  border-color: var(--accent);
  background: #fff;
}
.form__field input.is-error {
  border-color: #e05252;
}

.form__submit { width: 100%; }

.form__note {
  font-size: 13px;
  color: var(--text-dark-dim);
  text-align: center;
}

.form__success {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(31, 170, 89, 0.1);
  border: 1px solid rgba(31, 170, 89, 0.35);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: #157a41;
  font-weight: 700;
  font-size: 15px;
}
.form__success svg { width: 22px; height: 22px; flex-shrink: 0; }
.form__success[hidden] { display: none; }

/* ---------- Контакты ---------- */
.contacts { background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%); }

.contacts__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.contacts__item {
  display: grid;
  gap: 4px;
  background: var(--bg-3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
a.contacts__item:hover {
  border-color: rgba(242, 138, 30, 0.5);
  transform: translateY(-4px);
}

.contacts__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 12px;
}
.contacts__icon svg { width: 24px; height: 24px; }
.contacts__icon--wa {
  background: rgba(31, 170, 89, 0.14);
  color: #2bc06a;
}

.contacts__label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.contacts__value {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.footer {
  background: #101317;
  padding: 44px 0 30px;
}

.footer__inner {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.footer__logo { color: #fff; }
.footer__logo img { height: 30px; width: auto; }

.footer__tag {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 420px;
}

.footer__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.footer__contacts a {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  transition: color 0.2s ease;
}
.footer__contacts a:hover { color: var(--accent); }

.footer__copy {
  font-size: 13px;
  color: #5b6672;
  margin-top: 8px;
}

/* ---------- Плавающий WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 58px;
  height: 58px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.45);
  transition: transform 0.25s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

/* ============================================================
   Адаптив
   ============================================================ */

/* --- Мобильное меню (до 899px) --- */
@media (max-width: 899px) {
  .burger { display: flex; }

  .header { background: rgba(21, 24, 28, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(21, 24, 28, 0.98);
    padding: 12px 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-16px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  }
  .nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav__link {
    padding: 14px 4px;
    font-size: 17px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  .nav__link::after { display: none; }

  .nav__phone {
    padding: 16px 4px 6px;
    font-size: 18px;
  }

  .nav__cta {
    margin-top: 14px;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
  }

  .wa-float { display: grid; }
}

/* --- Планшет --- */
@media (min-width: 600px) {
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contacts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Десктоп --- */
@media (min-width: 900px) {
  .section { padding: 110px 0; }

  .services__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .services__group--second { margin-top: 72px; }

  .why__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .contacts__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .request__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 60px;
    align-items: start;
  }
  .form { padding: 38px 36px; }

  .footer__inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }
  .footer__tag { justify-self: center; text-align: center; }
  .footer__copy { grid-column: 1 / -1; text-align: center; margin-top: 18px; }
}

@media (min-width: 1100px) {
  .hero__title { letter-spacing: -0.01em; }
}
