/* ============================
   CSS Custom Properties
   ============================ */
:root {
  --color-bg: rgb(249, 239, 232);
  --color-accent: #e76962;
  --color-link: #ff8562;
  --color-text: #121212;
  --color-footer-bg: #111111;
  --color-white: #ffffff;
  --color-border: #121212;
  --font: 'Open Sans', Arial, sans-serif;
  --header-h: 68px;
  --container: 1200px;
  --radius: 20px;
}

/* ============================
   Reset & Base
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

fieldset { border: none; }

/* ============================
   Layout
   ============================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}

section { padding: 80px 0; }

/* ============================
   Typography helpers
   ============================ */
.section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 60px;
  color: var(--color-text);
}

.section-title--accent { color: var(--color-accent); text-align: left; }

.section-subtitle {
  text-align: center;
  margin-top: -40px;
  margin-bottom: 50px;
  color: var(--color-text);
}

/* ============================
   Buttons
   ============================ */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn--outline {
  background: var(--color-white);
  color: var(--color-text);
  border: 2px solid var(--color-border);
}
.btn--outline:hover { background: var(--color-text); color: var(--color-white); }

.btn--outline-bold {
  background: var(--color-white);
  color: var(--color-text);
  border: 3px solid var(--color-border);
}
.btn--outline-bold:hover { background: var(--color-text); color: var(--color-white); }

.btn--outline-sm {
  background: var(--color-white);
  color: var(--color-text);
  border: 3px solid var(--color-border);
  border-radius: 15px;
  padding: 8px 24px;
  font-size: 14px;
}
.btn--outline-sm:hover { background: var(--color-text); color: var(--color-white); }

.btn--accent {
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
}
.btn--accent:hover { background: #c9524a; }

.btn--submit {
  background: var(--color-white);
  color: var(--color-text);
  border: 3px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  font-weight: 700;
  padding: 14px 40px;
}
.btn--submit:hover { background: var(--color-text); color: var(--color-white); }
.btn--submit:disabled { opacity: 0.6; cursor: not-allowed; }

.contact__success {
  text-align: center;
  font-size: 18px;
  padding: 48px 0;
  color: var(--color-text);
}

/* ============================
   Header
   ============================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--color-white);
  height: var(--header-h);
  transition: box-shadow 0.2s;
}

.header.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,0.1); }

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

.header__logo img { height: 50px; width: auto; }

.nav__list {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.2s;
  white-space: nowrap;
}

.nav__link:hover,
.nav__link.active { color: var(--color-accent); }

/* Burger (mobile) */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* Mobile nav open */
.nav.open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Main content offset for fixed header */
main, .hero { padding-top: var(--header-h); }
.hero { padding-top: 0; }

/* ============================
   Hero
   ============================ */
.hero {
  margin-top: var(--header-h);
  padding: 60px 0 40px;
}

.hero__inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero__text { flex: 1; }

.hero__desc {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 36px;
  color: var(--color-text);
}

.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero__image img { max-width: 480px; width: 100%; }

/* ============================
   Benefits
   ============================ */
.benefits__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 60px;
  margin-bottom: 50px;
}

.benefits__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  line-height: 1.5;
}

.benefits__icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 2px;
}

.section-cta { text-align: center; margin-top: 10px; }

/* ============================
   Modules
   ============================ */
.modules { padding: 40px 0 80px; }

.module {
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 56px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.module:first-child { border-top: none; padding-top: 0; }

.module--text-left .module__text { order: 1; }
.module--text-left .module__image { order: 2; }
.module--text-right .module__image { order: 1; }
.module--text-right .module__text { order: 2; }

.module__text { flex: 1; min-width: 0; }

.module__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 16px;
}

.module__title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-accent);
  position: absolute;
  bottom: 0; left: 0;
}

.module__list { display: flex; flex-direction: column; gap: 10px; }

.module__list li {
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
}

.module__image {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.module__image img {
  max-width: 420px;
  width: 100%;
  object-fit: contain;
}

/* ============================
   Extra (Accordion)
   ============================ */
.extra { background: var(--color-bg); }

.extra__inner {
  display: flex;
  gap: 80px;
  align-items: flex-start;
}

.extra__intro { flex: 1; }
.extra__intro p { margin-bottom: 16px; font-size: 15px; line-height: 1.7; }
.extra__intro p:last-child { margin-bottom: 0; }

.extra__accordion { flex: 1; }

.accordion-item {
  border-bottom: 1px solid rgba(0,0,0,0.15);
}

.accordion-item:first-child { border-top: 1px solid rgba(0,0,0,0.15); }

.accordion-item__trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
  gap: 12px;
}

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

.accordion-item__icon {
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.25s;
}

.accordion-item.open .accordion-item__icon { transform: rotate(45deg); }

.accordion-item__body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}

.accordion-item__body > * {
  padding-bottom: 12px;
  font-size: 14px;
  line-height: 1.65;
}

.accordion-item__body ul {
  list-style: disc;
  padding-left: 20px;
  padding-bottom: 8px;
}
.accordion-item__body ul li { padding-bottom: 4px; }

.accordion-item__body-inner { padding-bottom: 20px; }

/* ============================
   Pricing
   ============================ */
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.pricing__card {
  background: var(--color-white);
  border: 3px solid var(--color-border);
  border-radius: 15px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pricing__name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-accent);
}

.pricing__price {
  font-size: 14px;
  color: var(--color-text);
  flex: 1;
}

/* ============================
   Contact Form
   ============================ */
.contact {
  border-top: 3px solid var(--color-text);
}

.contact__form {
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.form-group { width: 100%; }

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text);
}

.form-input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  background: var(--color-white);
  font-family: var(--font);
  font-size: 15px;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s;
}

.form-input::placeholder { color: rgba(18,18,18,0.5); }
.form-input:focus { border-color: var(--color-accent); }

.form-fieldset { display: flex; flex-direction: column; gap: 8px; }

.form-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  cursor: pointer;
}

.form-radio input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

/* ============================
   Documents
   ============================ */
.documents__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.doc-card {
  background: var(--color-white);
  border-radius: 15px;
  padding: 32px 28px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.doc-card:hover {
  box-shadow: 0 10px 10px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.doc-card__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-accent);
  line-height: 1.4;
}

.doc-card__desc {
  font-size: 14px;
  color: var(--color-text);
  flex: 1;
}

.doc-card__link {
  font-size: 14px;
  color: var(--color-link);
  font-weight: 400;
  transition: opacity 0.2s;
}

.doc-card__link:hover { opacity: 0.75; }

/* ============================
   About
   ============================ */
.about { border-top: 1px solid rgba(0,0,0,0.1); }

.about__inner {
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about__inner p { font-size: 14px; line-height: 1.75; }

.about__inner a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* ============================
   Footer
   ============================ */
.footer {
  background: var(--color-footer-bg);
  color: var(--color-white);
}

.footer__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__copy {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: center;
}

.footer__nav a {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  transition: color 0.2s;
}

.footer__nav a:hover { color: var(--color-white); }

.footer__top {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  transition: color 0.2s;
}
.footer__top:hover { color: var(--color-white); }

.footer__badges {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer__badges-inner {
  display: flex;
  gap: 60px;
  align-items: flex-start;
  padding-top: 20px;
  padding-bottom: 20px;
}

.footer__badge {
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(128,128,128,0.9);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.55;
  transition: opacity 0.2s;
}

.footer__badge:hover { opacity: 0.8; }

.footer__badge img {
  flex-shrink: 0;
  width: 52px;
  height: auto;
}

/* ============================
   Responsive — Large tablet / small laptop (≤1150px)
   Nav переходит в бургер до того, как переполняется
   ============================ */
@media (max-width: 1150px) {
  .nav__list { display: none; flex-direction: column; gap: 0; }
  .nav__burger { display: flex; }

  .nav.open .nav__list {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--color-white);
    padding: 16px 0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    z-index: 99;
  }

  .nav.open .nav__list li { width: 100%; }

  .nav.open .nav__link {
    display: block;
    padding: 13px 28px;
    font-size: 16px;
  }

  /* Pricing: 4 → 2 колонки */
  .pricing__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================
   Responsive — Tablet (≤900px)
   Раскладки переходят в одну колонку
   ============================ */
@media (max-width: 900px) {
  .container { padding: 0 24px; }

  section { padding: 32px 0; }

  /* Hero */
  .hero__inner {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }

  .hero__actions { justify-content: center; }

  .hero__image { width: 100%; }
  .hero__image img { max-width: 380px; margin: 0 auto; }

  /* Benefits: 3 → 2 колонки */
  .benefits__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 36px;
  }

  /* Modules: side-by-side → stack */
  .modules { padding: 24px 0 40px; }

  .module {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 24px;
    padding: 36px 0;
  }

  .module:first-child { padding-top: 0; }

  /* Текст всегда первым, картинка под ним */
  .module__text { order: 1 !important; }
  .module__image { order: 2 !important; }

  .module__image img { max-width: 320px; margin: 0 auto; }

  /* Extra: 2 → 1 колонка */
  .extra__inner { flex-direction: column; gap: 40px; }

  /* Documents: 3 → 2 колонки */
  .documents__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* Footer */
  .footer__badges-inner { flex-direction: column; gap: 24px; }
}

/* ============================
   Responsive — Tablet small (≤768px)
   ============================ */
@media (max-width: 768px) {
  .hero { margin-top: 0; }
}

/* ============================
   Responsive — Mobile (≤600px)
   ============================ */
@media (max-width: 600px) {
  .container { padding: 0 18px; }

  section { padding: 48px 0; }

  .section-title { font-size: 26px; margin-bottom: 36px; }

  /* Hero */
  .hero { padding: 32px 0 16px; }
  .hero__desc { font-size: 16px; }
  .hero__image img { max-width: 100%; }

  /* Modules */
  .module { padding: 28px 0; gap: 20px; }
  .module:first-child { padding-top: 0; }
  .module__title { font-size: 20px; }
  .module__image img { max-width: 280px; }
  .modules { padding: 28px 0 48px; }

  /* Benefits: 2 → 1 колонка */
  .benefits__grid { grid-template-columns: 1fr; gap: 20px; }

  /* Pricing: 2 → 1 колонка */
  .pricing__grid { grid-template-columns: 1fr; }

  /* Documents: 2 → 1 колонка */
  .documents__grid { grid-template-columns: 1fr; }

  /* About: убираем ограничение ширины на мобайле */
  .about__inner { max-width: 100%; }

  /* Footer */
  .footer__main { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer__nav { gap: 8px 14px; }
  .footer__top { align-self: flex-end; }
  .footer__badge { flex-direction: column; gap: 10px; }
  .footer__badge img { width: 40px; }
}

/* ============================
   Responsive — Very small (≤400px)
   ============================ */
@media (max-width: 400px) {
  .container { padding: 0 14px; }
  .btn { padding: 10px 22px; font-size: 14px; }
  .pricing__card { padding: 24px 18px; }
}
