:root {
  --color-navy: #0f2f4f;
  --color-bg: #f3f6fa;
  --color-cta: #d9481c;
  --color-cta-hover: #c23f17;
  --color-white: #fff;
  --color-text: #1a2838;
  --color-muted: #5a6b7d;
  --color-border: #d8e1ea;
  --shadow-card: 0 4px 24px rgba(15, 47, 79, 0.08);
  --radius: 12px;
  --header-h: 4rem;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: min(72rem, 100% - 2rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-navy);
}

.anchor {
  display: block;
  position: relative;
  top: calc(-1 * var(--header-h) - 0.5rem);
  visibility: hidden;
  pointer-events: none;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.section {
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.section--hero {
  padding-block: clamp(1.25rem, 3vw, 2.25rem) clamp(2rem, 5vw, 3rem);
  background: var(--color-navy);
  color: var(--color-white);
}

.section--alt {
  background: var(--color-white);
}

.section__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--color-navy);
}

.section--hero .section__title {
  color: inherit;
}

.section__lead {
  margin: 0 0 1.75rem;
  max-width: 42rem;
  color: var(--color-muted);
}

.section--hero .section__lead {
  color: rgba(255, 255, 255, 0.88);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
}

.site-header.is-scrolled {
  box-shadow: 0 2px 12px rgba(15, 47, 79, 0.06);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
}

.brand__logo {
  display: block;
  width: auto;
  height: clamp(2rem, 6vw, 2.5rem);
  max-width: min(12.5rem, 52vw);
  object-fit: contain;
  object-position: left center;
}

.site-nav {
  display: none;
  gap: 1.25rem;
  margin-inline: auto;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text);
}

.site-nav a:hover {
  color: var(--color-cta);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}

.header__phone {
  display: none;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-navy);
  white-space: nowrap;
}

.header__phone--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-navy);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-white);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--color-navy);
  border-radius: 1px;
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }

  .header__phone {
    display: block;
  }

  .header__phone--icon {
    display: none;
  }

  .nav-toggle {
    display: none;
  }
}

.site-nav.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  inset-inline: 0;
  top: var(--header-h);
  padding: 1rem 1rem 1.5rem;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  box-sizing: border-box;
}

@media (min-width: 900px) {
  .site-nav.is-open {
    position: static;
    flex-direction: row;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .site-nav__cta {
    display: none !important;
  }
}

@media (max-width: 899px) {
  .header__cta {
    display: none !important;
  }

  .site-nav.is-open {
    position: fixed;
    left: 0;
    right: 0;
    width: 100%;
    top: var(--header-h);
    padding: 1rem 1rem 1.5rem;
  }

  .site-nav__cta {
    display: none;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    margin-top: 0.75rem;
    margin-bottom: 0;
    box-sizing: border-box;
    align-self: stretch;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    font-size: 0.85rem;
    padding: 0.55rem 0.85rem;
  }

  .site-nav.is-open .site-nav__cta {
    display: flex;
  }
}

@media (min-width: 900px) {
  .header__cta {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

.site-header {
  position: sticky;
}

.header__wrap {
  position: relative;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn--primary {
  background: var(--color-cta);
  color: var(--color-white);
  border-color: var(--color-cta);
}

.btn--primary:hover {
  background: var(--color-cta-hover);
  border-color: var(--color-cta-hover);
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.85);
}

.btn--outline-dark {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn--navy {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

.btn--navy:hover {
  background: #0a2540;
  border-color: #0a2540;
}

.btn--block {
  width: 100%;
}

.btn--sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

/* Hero */
.hero-grid {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(1.65rem, 4.5vw, 2.35rem);
  line-height: 1.15;
  font-weight: 800;
}

.hero__subtitle {
  margin: 0 0 1.5rem;
  font-size: clamp(1rem, 2vw, 1.1rem);
  opacity: 0.92;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero__stats strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.hero__visual img {
  width: min(100%, 28rem);
  margin-inline: auto;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.25));
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1.25rem;
}

.need-card,
.brand-card,
.product-card,
.why-card,
.cert-card {
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

.cert-card,
.step-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.15rem;
}

.cert-card img {
  aspect-ratio: 5 / 7;
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
  background: #fff;
}

.need-card__media,
.product-card__media,
.brand-card__media {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.85rem;
  background: var(--color-bg);
}

.need-card h3,
.brand-card h3,
.product-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.need-card ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.product-card__badge {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--color-bg);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-navy);
}

.product-card__params,
.product-card__price {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  color: var(--color-muted);
}

.product-card__price {
  font-weight: 700;
  color: var(--color-text);
}

/* Quiz */
.quiz-layout {
  display: grid;
  gap: 2rem;
}

.quiz-panel {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}

.quiz-panel .contact-form {
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

.quiz-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-muted);
}

.quiz-progress__item.is-active {
  color: var(--color-cta);
}

.quiz-progress__item.is-done {
  color: var(--color-navy);
}

.quiz-options {
  display: grid;
  gap: 0.65rem;
}

.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
}

.quiz-option:has(input:checked) {
  border-color: var(--color-navy);
  background: var(--color-bg);
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .quiz-layout {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
  }
}

/* Brands compact */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
}

.brand-card--compact {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.15rem 1.25rem;
}

.brand-card__desc {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--color-muted);
  min-height: 2.75rem;
}

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
}

.why-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.15rem 1.25rem;
}

.why-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.why-card__num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-cta);
  line-height: 1;
  margin-bottom: 0.35rem;
}

/* Как заказать */
.section--order {
  padding: 0;
}

.order-bar {
  background: var(--color-navy);
  color: var(--color-white);
  padding: clamp(2rem, 5vw, 2.75rem) 0 clamp(2.25rem, 6vw, 3rem);
}

.order-bar__title {
  margin: 0 0 clamp(1.25rem, 3vw, 1.75rem);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--color-white);
}

.order-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
}

@media (min-width: 768px) and (max-width: 1023px) {
  .order-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .certs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .certs-grid .cert-card:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, calc(50% - 0.625rem));
  }
}

@media (min-width: 1024px) {
  .order-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .certs-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.order-step__num {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 0 0.85rem;
  border-radius: 50%;
  background: var(--color-cta);
  color: var(--color-white);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
}

.order-step__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.order-step__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.65rem;
  max-width: 48rem;
}

.faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.25rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding-block: 0.85rem;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item__body {
  padding-bottom: 1rem;
  color: var(--color-muted);
}

/* Contacts */
.contacts-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .contacts-layout {
    grid-template-columns: 1fr minmax(18rem, 22rem);
    gap: clamp(1.5rem, 4vw, 3rem);
  }
}

#form-contacts .section__lead {
  margin-bottom: 1rem;
  color: var(--color-muted);
}

.contacts-info address {
  font-style: normal;
  margin: 0.5rem 0 1rem;
}

.contacts-map {
  border: 0;
  width: 100%;
  min-height: 16rem;
  border-radius: var(--radius);
  background: var(--color-border);
}

.contact-form {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

/* Forms */
.form-field {
  margin-bottom: 0.85rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font: inherit;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-consent {
  font-size: 0.82rem;
  color: var(--color-muted);
}

.form-consent input {
  margin-right: 0.35rem;
}

.form-message {
  margin: 0.75rem 0 0;
  font-weight: 600;
}

.form-message--ok {
  color: #1a7f4b;
}

.form-message--error {
  color: #b42318;
}

/* Footer */
.site-footer {
  padding: 1.5rem 0 2rem;
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  text-align: center;
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
}

.site-footer p + p {
  margin-top: 0.35rem;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none !important;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 47, 79, 0.55);
}

.modal__dialog {
  position: relative;
  width: min(100%, 24rem);
  max-height: 90vh;
  overflow: auto;
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.modal__dialog--wide {
  width: min(100%, 36rem);
}

.modal__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: var(--color-bg);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.modal-open {
  overflow: hidden;
}

.modal__dialog--thanks {
  width: min(100%, 22.5rem);
  max-height: min(90vh, calc(100dvh - 2rem));
  text-align: center;
  padding: 1.75rem 1.25rem 1.5rem;
}

.modal--thanks .modal__close {
  background: var(--color-bg);
  color: var(--color-navy);
}

.thanks__icon {
  display: flex;
  justify-content: center;
  margin: 0.25rem 0 1rem;
}

.thanks__icon-svg circle {
  fill: #d9481c;
}

.thanks__icon-svg path {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thanks__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.15rem, 4.5vw, 1.35rem);
  font-weight: 700;
  color: #0f2f4f;
  line-height: 1.25;
}

.thanks__text {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #3d4f63;
}

.thanks__lead-id {
  display: inline-block;
  max-width: 100%;
  font-weight: 600;
  color: #0f2f4f;
  word-break: break-word;
}

.thanks__phone {
  margin: 1rem 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.thanks__phone a {
  color: #d9481c;
  text-decoration: none;
}

.thanks__phone a:hover {
  text-decoration: underline;
}

@media (max-width: 23.4375rem) {
  .modal__dialog--thanks {
    padding: 1.5rem 1rem 1.25rem;
  }
}

/* Lightbox */
#lightbox-certs-img {
  max-height: 85vh;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
}

/* Floating call — mobile only */
.float-call {
  position: fixed;
  z-index: 90;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--color-cta);
  color: var(--color-white);
  box-shadow: 0 8px 24px rgba(217, 72, 28, 0.45);
  text-decoration: none;
}

.float-call svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: currentColor;
}

@media (min-width: 768px) {
  .float-call {
    display: none;
  }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}
