/* Блок бесплатного аудита. Только #audit, чужие секции не трогает. */

#audit {
  --audit-ink: #0a0a0a;
  --audit-muted: #4a5560;
  --audit-orange: #ff6200;
  position: relative;
  z-index: 3;
  margin: 0;
  padding: 80px 0 72px;
  color: var(--audit-ink);
  background: #f4f1e9;
  font-family: "Commissioner", sans-serif;
  scroll-margin-top: 88px;
  overflow-x: clip;
}

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

.audit__wrap {
  width: min(1200px, calc(100% - 64px));
  margin-inline: auto;
}

.audit__eyebrow {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--audit-orange);
}

.audit__title {
  margin: 0;
  font: 300 clamp(34px, 3.7vw, 54px) / 1.12 "Geologica", sans-serif;
  letter-spacing: -0.045em;
  color: var(--audit-ink);
}

.audit__brush {
  position: relative;
  display: inline-block;
  isolation: isolate;
  padding: 0 0.045em 0.045em;
  color: var(--audit-ink);
  background: transparent;
  white-space: nowrap;
}

.audit__brush::before {
  position: absolute;
  z-index: -1;
  right: -0.13em;
  bottom: -0.015em;
  left: -0.13em;
  height: 1.06em;
  content: "";
  background: url("../assets/prototype/accent-brush-orange.svg") center / 100% 100% no-repeat;
}

.audit__lead {
  max-width: 40em;
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.55;
  color: var(--audit-muted);
}

.audit__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
  margin-top: 40px;
  align-items: start;
}

.audit__copy,
.audit-form {
  min-width: 0;
}

.audit__points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit__points li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid rgb(255 98 0 / 0.45);
}

.audit__points li:last-child {
  border-bottom: 1px solid rgb(255 98 0 / 0.45);
}

.audit__n {
  font: 300 54px/0.9 "Geologica", sans-serif;
  letter-spacing: -0.055em;
  color: var(--audit-orange);
}

.audit__points p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--audit-ink);
}

.audit__close {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  width: 100%;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgb(255 98 0 / 0.45);
}

.audit__exclaim {
  display: block;
  width: 25px;
  height: 70px;
  margin-top: 5px;
  justify-self: center;
  fill: var(--audit-orange);
  overflow: hidden;
}

.audit__exclaim-stem {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: audit-exclaim-loop 3.6s linear infinite;
}

.audit__close p {
  margin: 0;
  max-width: none;
  font-family: "Commissioner", sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--audit-muted);
}

@keyframes audit-exclaim-loop {
  0%, 14% { transform: scaleY(0); }
  32%, 78% { transform: scaleY(1); }
  88%, 100% { transform: scaleY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .audit__exclaim-stem {
    animation: none;
    transform: none;
  }
}

.audit-form {
  padding: 24px;
  border: 1px solid rgb(10 10 10 / 0.08);
  border-radius: 16px;
  background: #fff;
}

.audit-form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
}

.audit-form__field label,
.audit-form__consent {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--audit-ink);
}

.audit-form__optional {
  font-weight: 500;
  color: var(--audit-muted);
}

.audit-form__field input,
.audit-form__field textarea {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgb(10 10 10 / 0.12);
  border-radius: 16px;
  background: #fff;
  color: var(--audit-ink);
  font: 400 16px/1.4 "Commissioner", sans-serif;
}

.audit-form__field textarea {
  min-height: 96px;
  resize: vertical;
}

.audit-form__field input:hover,
.audit-form__field textarea:hover,
.audit-form__field input:focus,
.audit-form__field textarea:focus {
  border-color: var(--audit-orange);
  outline: none;
}

.audit-form__field input:focus-visible,
.audit-form__field textarea:focus-visible,
.audit-form__consent a:focus-visible,
.audit__faq summary:focus-visible {
  outline: 2px solid var(--audit-orange);
  outline-offset: 3px;
}

.audit-form__field input[aria-invalid="true"],
.audit-form__consent:has(input[aria-invalid="true"]) {
  border-color: #dc2626;
}

.audit-form__honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.audit-form__error {
  display: none;
  color: #dc2626;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.audit-form__error.is-visible {
  display: block;
}

.audit-form__consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 44px;
  margin: 4px 0 16px;
  font-weight: 500;
  cursor: pointer;
}

.audit-form__consent input {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 1px;
  accent-color: var(--audit-orange);
}

.audit-form__consent a {
  color: var(--audit-ink);
  text-underline-offset: 0.15em;
}

.audit-form__consent a:hover {
  color: var(--audit-orange);
}

#audit-form .btn-exclaim--block {
  margin: 0;
  max-width: 100%;
}

.audit-form__note {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--audit-muted);
}

.audit-form__status {
  display: none;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}

.audit-form__status.is-visible {
  display: block;
}

.audit-form__status--success {
  background: rgb(22 163 74 / 0.12);
  color: #166534;
}

.audit-form__status--error {
  background: rgb(220 38 38 / 0.1);
  color: #991b1b;
}

@media (min-width: 1024px) {
  .audit__body {
    grid-template-columns: minmax(0, 1fr) minmax(440px, 480px);
    gap: 48px 40px;
    align-items: stretch;
  }

  .audit__copy {
    display: flex;
    flex-direction: column;
  }

  .audit__points {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  .audit__points li {
    flex: 1 1 0;
    align-items: center;
    padding: 22px 0;
  }

  .audit-form {
    position: sticky;
    top: 88px;
  }
}

@media (max-width: 1100px) {
  #audit {
    padding: 64px 0 56px;
  }

  .audit__wrap {
    width: calc(100% - 48px);
  }

  .audit__n {
    font-size: 42px;
  }

  .audit__points li {
    grid-template-columns: 68px minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  #audit {
    padding: 48px 0 40px;
    scroll-margin-top: 72px;
  }

  .audit__wrap {
    width: calc(100% - 40px);
  }

  .audit__title {
    font-size: clamp(30px, 8vw, 42px);
    line-height: 1.14;
  }

  .audit__lead {
    font-size: 16px;
  }

  .audit__close {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 16px;
    margin-top: 28px;
    padding-top: 28px;
  }

  .audit__exclaim {
    width: 22px;
    height: 61px;
    margin-top: 0;
  }

  .audit__close p {
    font-size: 16px;
    line-height: 1.55;
  }

  .audit-form {
    padding: 16px;
  }

  .audit__points li {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
  }

  .audit__n {
    font-size: 30px;
  }
}

@media (max-width: 359px) {
  .audit__wrap {
    width: calc(100% - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .audit-form {
    position: static;
  }
}
