:root {
  --ink: #24364b;
  --muted: #6b7685;
  --paper: #f5f6f8;
  --line: #dce1e7;
  --accent: #b64b52;
  --accent-dark: #963b42;
  --green: #355777;
  --shadow: 0 18px 60px rgba(36, 54, 75, .13);
}

.eyebrow--light {
  color: #fff;
}

.button:hover {
  box-shadow: 0 10px 26px rgba(182, 75, 82, .22);
}

.field input:focus,
.field textarea:focus {
  box-shadow: 0 0 0 3px rgba(182, 75, 82, .12);
}

/* Основной ритм секций: белый → синий → красный. */
.hero {
  background: linear-gradient(135deg, #f4f7fb 0%, #fff 72%);
}

#benefits {
  color: #fff;
  background: var(--green);
}

#benefits .eyebrow {
  color: #edbec1;
}

#benefits .card {
  color: var(--ink);
  background: #fff;
}

#benefits .card__icon {
  background: var(--paper);
}

.messenger-section__intro {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 70px;
  align-items: end;
  margin-bottom: 42px;
}

.messenger-section__intro h2 {
  margin-bottom: 0;
}

.messenger-section__intro > p {
  margin-bottom: 5px;
  color: #d9e1e9;
  font-size: 17px;
}

.messenger-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.messenger-card {
  min-height: 210px;
  display: grid;
  grid-template-columns: 68px 1fr 42px;
  gap: 22px;
  align-items: center;
  padding: 34px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(16, 35, 57, .12);
  transition: transform .2s ease, box-shadow .2s ease;
}

.messenger-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(16, 35, 57, .2);
}

.messenger-card__icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 18px;
}

.messenger-card--whatsapp .messenger-card__icon {
  background: var(--accent);
}

.messenger-card__icon svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

.messenger-card__body {
  display: flex;
  flex-direction: column;
}

.messenger-card__body small {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.messenger-card__body strong {
  font: 38px/1.05 Georgia, serif;
}

.messenger-card__body > span {
  margin-top: 13px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.messenger-card__arrow {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-size: 21px;
}

#conditions {
  background: var(--accent);
}

#conditions .eyebrow,
#conditions .check-list span {
  color: #fff;
}

#conditions .muted {
  color: #f4dfe1;
}

#conditions .check-list li {
  border-color: rgba(255, 255, 255, .28);
}

.stats {
  color: var(--ink);
  background: #fff;
}

#process {
  color: #fff;
  background: var(--green);
}

#process .eyebrow,
#process .steps span {
  color: #edbec1;
}

#process .steps li {
  border-top-color: #fff;
  border-right-color: rgba(255, 255, 255, .22);
}

#process .steps p {
  color: #d9e1e9;
}

#documents {
  color: #fff;
  background: var(--accent);
}

#documents .eyebrow {
  color: #fff;
}

#documents .card,
#documents .section-note {
  color: var(--ink);
  background: #fff;
}

#documents .section-note {
  border-left-color: var(--green);
}

#application {
  color: var(--ink);
  background: #fff;
}

#application .eyebrow {
  color: var(--accent);
}

#application .form-layout > div > p {
  color: var(--muted);
}

#application .lead-form {
  gap: 16px 18px;
  padding: 38px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

#application .field input,
#application .field textarea,
#application .contact-picker__options span {
  background: var(--paper);
}

#application .contact-picker__options input:checked + span {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

#application .field input,
#application .field textarea {
  border-color: transparent;
  background: var(--paper);
}

#application .field input:hover,
#application .field textarea:hover {
  border-color: #cbd4df;
}

.form-card-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 5px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.form-card-title span {
  font: 27px/1.1 Georgia, serif;
}

.form-card-title small {
  color: var(--muted);
  font-size: 12px;
}

#application .field--name,
#application .field--city {
  grid-column: span 1;
}

#application .field--comment {
  grid-column: 1 / -1;
}

#application .field label small {
  margin-left: 5px;
  color: #8b95a2;
  font-size: 10px;
  font-weight: 500;
}

#application .field textarea {
  min-height: 96px;
}

.form-consent,
.form-submit,
.optional-fields {
  grid-column: 1 / -1;
}

.optional-fields {
  margin: 0;
}

.optional-fields summary {
  display: none;
}

.optional-fields__grid {
  display: grid;
  grid-template-columns: 1fr;
}

.form-consent {
  padding: 15px 16px;
  background: var(--paper);
  border-radius: 10px;
}

.form-consent .field__error {
  display: block;
  margin-left: 32px;
}

.form-submit {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) 1fr;
  gap: 18px;
  align-items: center;
}

.form-submit .button,
.form-submit .form-note {
  grid-column: auto;
}

.form-submit .form-note {
  text-align: left;
}

.application-points {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.application-points li {
  margin: 10px 0;
  font-size: 14px;
  font-weight: 700;
}

.application-points li::before {
  content: "✓";
  margin-right: 10px;
  color: var(--accent);
}

#faq {
  color: #fff;
  background: var(--green);
}

#faq .eyebrow {
  color: #edbec1;
}

#faq .faq-list details {
  border-color: rgba(255, 255, 255, .24);
}

#faq .faq-list details p {
  color: #d9e1e9;
}

.final-cta {
  background: var(--accent);
}

.footer {
  background: #294761;
}

.button--ghost {
  color: var(--green);
  background: #fff;
  border-color: #b9c9dc;
}

.button--ghost:hover {
  color: #fff;
  background: var(--green);
}

.contact-picker__options input:checked + span {
  background: var(--green);
  border-color: var(--green);
}

.toast {
  background: var(--green);
}

.section--soft {
  background: var(--paper);
}

.section-note {
  max-width: 850px;
  margin: 28px 0 0;
  padding: 18px 22px;
  color: var(--muted);
  background: #fff;
  border-left: 3px solid var(--accent);
  font-size: 14px;
}

.cards--documents .card {
  background: #fff;
}

.lead-form--hero {
  align-self: center;
  grid-template-columns: 1fr;
  padding: 32px;
  box-shadow: var(--shadow);
}

.lead-form--hero .field,
.lead-form--hero .consent,
.lead-form--hero .button--full {
  grid-column: 1;
}

.contact-picker {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.contact-picker legend {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.contact-picker legend b {
  color: var(--accent);
}

.contact-picker__options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.contact-picker__options label {
  min-width: 0;
  cursor: pointer;
}

.contact-picker__options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.contact-picker__options span {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 9px;
  color: var(--muted);
  background: #f7f7f4;
  border: 1px solid #dfe3df;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.contact-picker__options input:checked + span {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.contact-picker__options input:focus-visible + span {
  outline: 3px solid rgba(182, 75, 82, .23);
  outline-offset: 2px;
}

.contact-field,
.contact-error {
  grid-column: 1 / -1;
}

.contact-field[hidden] {
  display: none;
}

.lead-form__heading {
  margin-bottom: 2px;
}

.lead-form__heading h2 {
  margin-bottom: 12px;
  font-size: 36px;
}

.lead-form__heading p:last-child {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 14px;
}

.floating-cta {
  position: fixed;
  right: 24px;
  top: 50%;
  z-index: 44;
  display: flex;
  flex-direction: column;
  padding: 15px 18px;
  color: #fff;
  background: var(--accent);
  border-radius: 12px 0 0 12px;
  box-shadow: var(--shadow);
  transform: translateY(-50%);
  font-weight: 800;
}

.floating-cta small {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
  opacity: .8;
}

.mobile-cta {
  transition: opacity .2s ease, transform .2s ease;
}

.mobile-cta.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
}

.menu-button {
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav.open a {
  min-height: 48px;
  display: flex;
  align-items: center;
}

@media (max-width: 1000px) {
  .hero__grid { gap: 40px; }
  .lead-form--hero { display: grid; }
  .floating-cta { display: none; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 74px; }

  body {
    font-size: 15px;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .hero {
    padding: 30px 0 54px;
  }

  .hero__grid {
    gap: 22px;
  }

  .hero h1 {
    margin-bottom: 0;
    font-size: clamp(30px, 9vw, 34px);
    line-height: 1.02;
  }

  .hero__content > .eyebrow {
    margin-bottom: 10px;
  }

  .hero__lead,
  .hero__points,
  .hero__actions {
    display: none;
  }

  .lead-form--hero {
    gap: 10px;
    padding: 18px;
    border-radius: 14px;
  }

  .lead-form__heading {
    margin-bottom: 0;
  }

  .lead-form__heading .eyebrow {
    margin-bottom: 5px;
  }

  .lead-form__heading h2 {
    margin-bottom: 2px;
    font-size: 26px;
  }

  .lead-form__heading p:last-child {
    display: none;
  }

  .field label {
    margin-bottom: 5px;
  }

  .field input,
  .field textarea {
    min-height: 52px;
    padding: 13px 14px;
    font-size: 16px;
  }

  .lead-form .button {
    min-height: 56px;
  }

  .consent {
    gap: 9px;
    line-height: 1.35;
  }

  .consent input {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    margin-top: 0;
  }

  .mobile-cta {
    height: 56px;
    bottom: max(8px, env(safe-area-inset-bottom));
    font-size: 15px;
  }

  .section {
    padding: 52px 0;
  }

  #application .lead-form {
    gap: 12px;
    padding: 20px;
  }

  .form-card-title {
    display: block;
    padding-bottom: 14px;
  }

  .form-card-title span,
  .form-card-title small {
    display: block;
  }

  .form-card-title span {
    margin-bottom: 5px;
    font-size: 24px;
  }

  #application .field--name,
  #application .field--city,
  #application .field--comment {
    grid-column: 1;
  }

  .optional-fields {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .optional-fields summary {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: var(--green);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
  }

  .optional-fields summary::-webkit-details-marker {
    display: none;
  }

  .optional-fields summary span {
    font-size: 22px;
    transition: transform .18s ease;
  }

  .optional-fields[open] summary span {
    transform: rotate(45deg);
  }

  .optional-fields__grid {
    gap: 10px;
    padding: 4px 0 14px;
  }

  .form-consent .consent {
    min-height: 44px;
    align-items: center;
  }

  .form-submit {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-submit .form-note {
    text-align: center;
  }

  .application-points {
    margin-top: 20px;
  }

  .messenger-section__intro {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 26px;
  }

  .messenger-section__intro > p {
    font-size: 15px;
  }

  .messenger-links {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .messenger-card {
    min-height: 130px;
    grid-template-columns: 54px 1fr 38px;
    gap: 15px;
    padding: 20px;
    border-radius: 15px;
  }

  .messenger-card__icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
  }

  .messenger-card__icon svg {
    width: 30px;
    height: 30px;
  }

  .messenger-card__body strong {
    font-size: 30px;
  }

  .messenger-card__body > span {
    margin-top: 7px;
  }

  .messenger-card__arrow {
    width: 38px;
    height: 38px;
  }

  .cards {
    gap: 12px;
  }

  .card {
    padding: 22px;
  }

  .check-list li {
    font-size: 16px;
  }

  .stats strong {
    font-size: 32px;
  }

  .stats__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }

  .stats strong,
  .stats span {
    overflow-wrap: anywhere;
  }

  .stats__grid div,
  .stats__grid div:first-child {
    padding: 17px 0;
  }

  .stats span {
    font-size: 12px;
  }

  .faq-list summary {
    min-height: 64px;
    align-items: center;
    padding: 18px 0;
  }

  .footer a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

@media (max-width: 1180px) and (min-width: 1001px) {
  .nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .nav.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 82px;
    left: 0;
    width: 100%;
    padding: 12px 28px 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .nav.open a {
    padding: 13px 0;
  }

  .hero__grid {
    gap: 38px;
  }

  .hero h1 {
    font-size: clamp(44px, 5vw, 58px);
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .hero {
    padding: 42px 0 64px;
  }

  .hero__grid {
    gap: 24px;
  }

  .hero h1 {
    max-width: 680px;
    margin-bottom: 0;
    font-size: clamp(40px, 7vw, 50px);
  }

  .hero__content > .eyebrow {
    margin-bottom: 10px;
  }

  .hero__lead,
  .hero__points,
  .hero__actions {
    display: none;
  }

  .lead-form--hero {
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    padding: 26px;
  }

  .lead-form--hero .lead-form__heading,
  .lead-form--hero .consent,
  .lead-form--hero .field__error,
  .lead-form--hero .button--full {
    grid-column: 1 / -1;
  }

  .lead-form__heading h2 {
    margin-bottom: 8px;
  }

  .cards {
    gap: 14px;
  }

  .messenger-section__intro {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .messenger-card {
    min-height: 180px;
    grid-template-columns: 56px 1fr 38px;
    gap: 14px;
    padding: 24px;
  }

  .messenger-card__icon {
    width: 56px;
    height: 56px;
  }

  .messenger-card__body strong {
    font-size: 31px;
  }

  .card {
    padding: 24px;
  }
}

@media (max-width: 360px) {
  .container {
    width: calc(100% - 22px);
  }

  .brand small {
    display: none;
  }

  .hero h1 {
    font-size: 27px;
  }

  .hero {
    padding-top: 22px;
  }

  .hero__grid {
    gap: 16px;
  }

  .lead-form--hero {
    gap: 8px;
    padding: 14px;
  }

  .lead-form--hero .lead-form__heading h2 {
    display: none;
  }

  .contact-picker__options span {
    padding-left: 5px;
    padding-right: 5px;
    font-size: 12px;
  }

  .stats strong {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
