/* Лендинг «Бурение скважин» — Плюс Строй */

:root {
  --color-bg: #f7f8fa;
  --color-bg-dark: #1a2d4a;
  --color-bg-white: #fff;
  --color-text: #2c3e50;
  --color-text-muted: #5a6c7d;
  --color-accent: #1a5f4a;
  --color-accent-hover: #134a3a;
  --color-border: #e2e6ea;
  --color-error: #c0392b;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --container: min(1200px, 100% - 2rem);
  --radius: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-form: 0 8px 32px rgba(0, 0, 0, 0.12);
--ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

.container {
  width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Шапка */
.header {
  background: var(--color-bg-white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-bg-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.header__phone {
  font-weight: 600;
  color: var(--color-bg-dark);
  text-decoration: none;
}

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

/* Анимации появления */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-on-load {
  opacity: 0;
  animation: fadeUp 0.7s var(--ease-out) forwards;
}

.animate-on-load[style*="--i"] {
  animation-delay: calc(0.1s * var(--i, 0));
}

.header.animate-on-load {
  animation: fadeIn 0.5s var(--ease-out) forwards;
  animation-delay: 0s;
}

/* Секции при скролле */
.reveal-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  transition-delay: calc(0.08s * var(--i, 0));
}

.reveal-section.is-visible .reveal-item {
  opacity: 1;
  transform: translateY(0);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), background 0.25s ease, box-shadow 0.25s ease;
}

.btn_header {
  background: var(--color-accent);
  color: var(--color-bg-white);
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn_header:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 95, 74, 0.35);
}

.btn_form {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  background: var(--color-accent);
  color: var(--color-bg-white);
  transition: transform 0.25s var(--ease-out), background 0.25s ease, box-shadow 0.25s ease;
}

.btn_form:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26, 95, 74, 0.4);
}

.btn_form:active {
  transform: translateY(0);
}

/* Hero */
.hero {
  padding: 3rem 0 4rem;
}

.hero__inner {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr 400px;
    gap: 3rem;
  }
}

.hero__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.3;
  color: var(--color-bg-dark);
  margin: 0 0 1rem;
}

.hero__subtitle {
  color: var(--color-text-muted);
  margin: 0 0 1.25rem;
  max-width: 52ch;
}

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

.hero__list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.hero__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Факты в hero — заполняют левую колонку */
.hero__facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.75rem;
}

.hero__fact {
  padding: 1rem 1.25rem;
  background: var(--color-bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease-out);
}

.hero__fact:hover {
  border-color: rgba(26, 95, 74, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.hero__fact-value {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-bg-dark);
  margin-bottom: 0.25rem;
}

.hero__fact-label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

@media (min-width: 600px) {
  .hero__facts {
    max-width: 420px;
  }
}

@media (max-width: 600px) {
  .hero__facts {
    margin-top: 1.25rem;
    gap: 0.75rem;
  }

  .hero__fact {
    padding: 0.85rem 1rem;
  }

  .hero__fact-value {
    font-size: 1rem;
  }
}

/* Форма в hero */
.hero__form-wrap {
  background: var(--color-bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-form);
  padding: 1.75rem;
  transition: box-shadow 0.4s ease, transform 0.4s var(--ease-out);
}

.hero__form-wrap:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.form__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
  color: var(--color-bg-dark);
}

.form__hint {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0 0 1.25rem;
}

.form__privacy {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0 0 1rem;
}

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

.form__label {
  display: block;
  margin-bottom: 1rem;
}

.form__label-text {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-text);
}

.form__label-text em {
  color: var(--color-error);
  font-style: normal;
}

.form__input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-white);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(26, 95, 74, 0.12);
}

.form__input.error {
  border-color: var(--color-error);
}

.form__error {
  display: block;
  font-size: 0.8rem;
  color: var(--color-error);
  margin-top: 0.25rem;
  min-height: 1.2em;
}

.form__checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
}

.form__checkbox {
  margin-top: 0.35rem;
  flex-shrink: 0;
}

.form__checkbox-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.form__checkbox-text a {
  color: var(--color-accent);
  text-decoration: none;
}

.form__checkbox-text a:hover {
  text-decoration: underline;
}

.form-success {
  padding: 2rem;
  text-align: center;
}

.form-success__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
  color: var(--color-accent);
}

.form-success__text {
  margin: 0;
  color: var(--color-text-muted);
}

.form-success_compact .form-success__title {
  color: rgba(255, 255, 255, 0.95);
}

.form-success_compact .form-success__text {
  color: rgba(255, 255, 255, 0.8);
}

/* Модальное окно «Спасибо за заявку» — поверх всего, в начале body для Android */
.lead-thank-you-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: leadThankYouFadeIn 0.25s var(--ease-out);
  transform: translateZ(0);
  isolation: isolate;
}

.lead-thank-you-modal[hidden] {
  display: none;
}

@keyframes leadThankYouFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lead-thank-you-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.lead-thank-you-modal__box {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--color-bg-white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 1.75rem 1.5rem;
  text-align: center;
  animation: leadThankYouSlideIn 0.3s var(--ease-out);
}

@keyframes leadThankYouSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.lead-thank-you-modal__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin: 0 0 1rem;
  color: var(--color-accent);
}

.lead-thank-you-modal__text {
  margin: 0 0 0.75rem;
  color: var(--color-text);
  line-height: 1.5;
}

.lead-thank-you-modal__text_sub {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.lead-thank-you-modal__btn {
  display: inline-block;
  width: 100%;
  max-width: 200px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease;
}

.lead-thank-you-modal__btn:hover {
  background: var(--color-accent-hover);
}

.lead-thank-you-modal__btn:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Модальное окно с формой заявки. В начале body + высокий слой — на Android не уходит под футер */
.lead-form-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: leadThankYouFadeIn 0.25s var(--ease-out);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  isolation: isolate;
  -webkit-overflow-scrolling: touch;
  overflow: auto;
}

.lead-form-modal[aria-hidden="true"] {
  display: none;
}

.lead-form-modal__backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: -1;
}

.lead-form-modal__box {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-bg-white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 1.75rem 1.5rem;
  animation: leadThankYouSlideIn 0.3s var(--ease-out);
}

.lead-form-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: color 0.2s ease, background 0.2s ease;
}

.lead-form-modal__close:hover {
  color: var(--color-text);
  background: var(--color-border);
}

.lead-form-modal__close:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.form_modal .form__title {
  margin-top: 0;
  padding-right: 2rem;
}

/* Почему мы */
.why {
  padding: 3rem 0;
  background: var(--color-bg-white);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin: 0 0 2rem;
  text-align: center;
  color: var(--color-bg-dark);
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.why__item {
  padding: 1.5rem;
  background: var(--color-bg);
  border-radius: var(--radius);
  text-align: center;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, background 0.3s ease;
}

.why__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  background: var(--color-bg-white);
}

.why__icon {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.why__heading {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: var(--color-bg-dark);
}

.why__item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Как это работает */
.steps {
  padding: 3rem 0;
}

.steps__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.steps__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: transform 0.3s var(--ease-out);
}

.steps__item:hover {
  transform: translateX(6px);
}

.steps__num {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: var(--color-bg-white);
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: 50%;
}

.steps__item p {
  margin: 0;
  padding-top: 0.35rem;
  color: var(--color-text);
}

.steps__cta {
  text-align: center;
  margin: 2rem 0 0;
}

.steps__btn {
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Блок формы внизу */
.form-section {
  padding: 3rem 0 4rem;
}

.form-section__box {
  background: var(--color-bg-dark);
  color: var(--color-bg-white);
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  gap: 2rem;
  transition: box-shadow 0.4s ease;
}

.reveal-section.is-visible .form-section__box {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}

@media (min-width: 700px) {
  .form-section__box {
    grid-template-columns: 1fr 340px;
    align-items: start;
    padding: 2.5rem;
  }
}

.form-section__title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
}

.form-section__content p {
  margin: 0 0 1rem;
  opacity: 0.9;
  font-size: 0.95rem;
}

.form-section__includes {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  opacity: 0.9;
}

.form-section__includes li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.35rem;
}

.form-section__includes li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

.form_compact .form__input {
  background: var(--color-bg-white);
}

.form_compact .form__label-text,
.form_compact .form__checkbox-text {
  color: rgba(255, 255, 255, 0.95);
}

.form_compact .form__checkbox-text a {
  color: #7eb8a8;
}

/* Доверие */
.trust {
  padding: 3rem 0;
  background: var(--color-bg-dark);
  color: var(--color-bg-white);
}

.section-title_light {
  color: var(--color-bg-white);
}

.trust__list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  max-width: 500px;
}

.trust__list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.95;
}

.trust__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #7eb8a8;
}

.trust__contact {
  margin: 0;
  font-weight: 600;
}

.trust__contact a {
  color: #7eb8a8;
  text-decoration: none;
}

.trust__contact a:hover {
  text-decoration: underline;
}

/* Подвал */
.footer {
  padding: 1.5rem 0;
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer__copy {
  margin: 0;
}

.footer__links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.footer__links a:hover {
  text-decoration: underline;
}

/* Адаптив: мобильные */
@media (max-width: 600px) {
  .header__inner {
    flex-wrap: wrap;
  }

  .btn_header {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: 2rem 0 3rem;
  }

  .hero__form-wrap {
    padding: 1.25rem;
  }

  .form-section__box {
    padding: 1.5rem;
  }
}
