/* Страница сотрудничества (b2b.html)
 *
 * Переиспользует палитру и типографику основного сайта, но подаёт их иначе:
 * те же зелёные, но с жёсткими прямыми углами, тонкими линиями-хайрлайнами и
 * «деловым» плотным текстом. Так страница читается как отдельный продукт, а не
 * как ещё один блок главной.
 */

:root {
  --green-dark: #5c7a54;
  --green-ink: #4a7040;
  --green-mid: #86a47c;
  --green-light: #a3bb96;
  --green-pale: #e8efe5;
  --cream: #f9f7f2;
  --white: #fff;
  --black: #1a1a1a;
  --gray: #6b6b6b;
  --gray-light: #b0b0b0;
  --transition: 0.3s ease;

  /* b2b-specific: ink instead of green for headings and a sharper corner radius */
  --b2b-ink: #16240f;
  --b2b-line: rgba(22, 36, 15, 0.14);
  --b2b-line-strong: rgba(22, 36, 15, 0.28);
  --b2b-r: 4px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

h1,
h2,
h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

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

/* ── page loader (shared with index.html) ─────────────────────────── */
.page-loader {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

html.is-loading .page-loader {
  display: flex;
}

html.is-loading body>*:not(.page-loader) {
  visibility: hidden;
}

.page-loader__spin {
  width: 42px;
  height: 42px;
  border: 3px solid var(--green-pale);
  border-top-color: var(--green-dark);
  border-radius: 50%;
  animation: b2b-spin 0.9s linear infinite;
}

@keyframes b2b-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── nav ──────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  /* Match the navbar line-height of the other pages. b2b's body has no
     line-height, so nav text would fall back to `normal` and render a
     smaller line box. Scoped to .nav so the rest of the page is untouched. */
  line-height: 1.6;
  background: var(--white);
  /* box-shadow instead of border-bottom: a 1px border adds 1px to the
     box, which made this nav 1px taller than the other pages. A 0 1px 0
     shadow draws the same hairline without affecting layout height. */
  box-shadow: 0 1px 0 var(--b2b-line);
  transition: var(--transition);
}

.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--b2b-ink);
  /* keeps the mark on the same optical centre as the wordmark, like the other pages */
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo img {
  flex: none;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--black);
  cursor: pointer;
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.nav-dropdown:hover .nav-dropdown-trigger {
  border-bottom-color: var(--green-mid);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  background: var(--white);
  border-radius: 4px;
  padding: 8px;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--black);
  transition: var(--transition);
}

.nav-dropdown-menu a::after {
  display: none;
}

.nav-dropdown-menu a:hover {
  background: var(--green-pale);
  color: var(--green-dark);
}

.nav-dropdown-menu a img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 24px;
  width: 12px;
  height: 12px;
  background: var(--white);
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--black);
  position: relative;
  padding-bottom: 4px;
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-mid);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* the cooperation link is the one thing on the page that must not be missed */
.nav-links a.nav-b2b {
  color: var(--green-ink);
  font-weight: 600;
  border-bottom: 1px solid var(--green-mid);
  padding-bottom: 6px;
}

.nav-links a.nav-b2b::after {
  display: none;
}

.nav-cta {
  padding: 10px 24px;
  border: 1.5px solid var(--green-dark);
  border-radius: var(--b2b-r);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--green-dark);
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--green-dark);
  color: var(--white);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--b2b-ink);
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── mobile menu ──────────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 200;
  padding: 100px 24px 40px;
  flex-direction: column;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu-nav {
  display: flex;
  flex-direction: column;
}

.mobile-menu-nav a {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--green-ink);
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-menu-nav a.active {
  color: var(--b2b-ink);
}

.mobile-menu-cta {
  margin-top: 32px;
}

.mobile-menu-section {
  margin-top: 32px;
}

.mobile-menu-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(22, 36, 15, 0.5);
  margin-bottom: 12px;
}

.mobile-menu-socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mobile-menu-socials a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 4px;
  background: rgba(22, 36, 15, 0.06);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--green-ink);
  transition: var(--transition);
  border-bottom: none;
}

.mobile-menu-socials a:hover {
  background: rgba(22, 36, 15, 0.1);
  color: var(--b2b-ink);
}

.mobile-menu-socials a img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.mobile-menu-cta a {
  display: block;
  width: 100%;
  padding: 16px;
  text-align: center;
  border-radius: var(--b2b-r);
  background: var(--green-dark);
  color: var(--white);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── hero ─────────────────────────────────────────────────────────── */
.b2b-hero {
  background: var(--b2b-ink);
  color: var(--white);
  /* 120px, not the 180px this used to have. The nav is position:fixed and
     81px tall, so the padding counted from the document top and most of that
     180px landed *underneath* the nav as empty space: the H1 sat 241px down.
     At 180px the hero measured 934px tall against a 900px viewport, so the
     whole section no longer fit on screen. 120px keeps clearance over the
     fixed nav and matches the 110px .section rhythm used further down. */
  padding: 120px 0 72px;
  position: relative;
  overflow: hidden;
}

/* faint hairlines: the "contract paper" cue that sets this page apart */
.b2b-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 96px);
  pointer-events: none;
}

.b2b-hero .container {
  position: relative;
}

.b2b-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--b2b-r);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 28px;
}

.b2b-badge svg {
  width: 15px;
  height: 15px;
}

.b2b-badge--sm {
  margin-bottom: 18px;
}

.b2b-hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  max-width: 16ch;
  margin-bottom: 26px;
}

.b2b-lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  max-width: 62ch;
  margin-bottom: 38px;
}

.b2b-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 64px;
}

.b2b-btn {
  display: inline-flex;
  align-items: center;
  padding: 16px 34px;
  border-radius: var(--b2b-r);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  transition: var(--transition);
}

.b2b-btn--primary {
  background: var(--green-mid);
  color: var(--b2b-ink);
}

.b2b-btn--primary:hover {
  background: var(--green-light);
}

.b2b-btn--ghost {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
  text-transform: none;
  letter-spacing: 0;
}

.b2b-btn--ghost:hover {
  border-color: var(--green-light);
  color: var(--green-light);
}

.b2b-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  list-style: none;
  margin: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.b2b-facts li {
  background: var(--b2b-ink);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.b2b-facts strong {
  font-size: 0.95rem;
  font-weight: 600;
}

.b2b-facts span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

/* ── sections ─────────────────────────────────────────────────────── */
.section {
  padding: 110px 0;
  position: relative;
}

.section--alt {
  background: var(--cream);
}

.b2b-head {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}

.b2b-head--left {
  text-align: left;
  margin-left: 0;
}

.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--green-ink);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  color: var(--b2b-ink);
  margin-bottom: 18px;
}

.section-desc {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.7;
  max-width: 62ch;
}

.b2b-head--left .section-desc {
  margin: 0;
}

/* ── who we work with ─────────────────────────────────────────────── */
.b2b-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--b2b-line);
  border: 1px solid var(--b2b-line);
}

.b2b-card {
  background: var(--white);
  padding: 40px 34px;
}

.b2b-card__num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 16px;
}

.b2b-card h3 {
  font-size: 1.25rem;
  color: var(--b2b-ink);
  margin-bottom: 12px;
  line-height: 1.3;
}

.b2b-card p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--gray);
  margin: 0;
}

/* ── terms ────────────────────────────────────────────────────────── */
.b2b-terms {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 72px;
  align-items: start;
}

.b2b-list {
  margin: 0;
}

.b2b-list__item {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--b2b-line);
}

.b2b-list__item:last-child {
  border-bottom: 1px solid var(--b2b-line);
}

.b2b-list dt {
  font-weight: 600;
  color: var(--b2b-ink);
  font-size: 0.95rem;
}

.b2b-list dd {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--gray);
}

/* ── steps ────────────────────────────────────────────────────────── */
.b2b-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: b2bstep;
}

.b2b-steps li {
  position: relative;
  padding-top: 26px;
  border-top: 2px solid var(--b2b-line-strong);
}

.b2b-step-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 12px;
}

.b2b-steps h3 {
  font-size: 1.15rem;
  color: var(--b2b-ink);
  margin-bottom: 10px;
}

.b2b-steps p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--gray);
  margin: 0;
}

/* ── the form block ───────────────────────────────────────────────── */
.section--form {
  background: var(--b2b-ink);
  color: var(--white);
}

.section--form .section-title {
  color: var(--white);
}

.section--form .section-desc {
  color: rgba(255, 255, 255, 0.72);
}

.b2b-formwrap {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 72px;
  align-items: start;
}

.b2b-formintro {
  position: sticky;
  top: 120px;
}

.b2b-direct {
  margin-top: 40px;
  padding: 26px 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--b2b-r);
}

.b2b-direct p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 8px;
}

.b2b-direct__mail {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--green-light);
  margin-bottom: 8px;
  word-break: break-all;
}

.b2b-direct__mail:hover {
  color: var(--white);
}

.b2b-direct span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
}

.b2b-form {
  background: var(--white);
  color: var(--black);
  border-radius: var(--b2b-r);
  padding: 44px 40px;
}

.b2b-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.b2b-field {
  margin-bottom: 22px;
}

.b2b-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 8px;
}

.b2b-field input[type=text],
.b2b-field input[type=tel],
.b2b-field input[type=email],
.b2b-field select,
.b2b-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--b2b-line-strong);
  border-radius: var(--b2b-r);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--black);
  transition: var(--transition);
}

.b2b-field input:focus,
.b2b-field select:focus,
.b2b-field textarea:focus {
  outline: none;
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px var(--green-pale);
}

.b2b-field textarea {
  resize: vertical;
  min-height: 110px;
}

.b2b-field .b2b-invalid {
  border-color: #b3402f;
  box-shadow: 0 0 0 3px rgba(179, 64, 47, 0.12);
}

/* chip group: reads as "pick your category" rather than a generic form */
.b2b-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.b2b-choice {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  border: 1px solid var(--b2b-line-strong);
  border-radius: var(--b2b-r);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.b2b-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.b2b-choice:hover {
  border-color: var(--green-mid);
}

.b2b-choice.selected {
  background: var(--green-pale);
  border-color: var(--green-dark);
  color: var(--green-ink);
  font-weight: 500;
}

.b2b-consent {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 24px;
  cursor: pointer;
}

.b2b-consent input {
  width: 18px;
  height: 18px;
  accent-color: var(--green-dark);
  cursor: pointer;
}

.b2b-submit {
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: var(--b2b-r);
  background: var(--green-dark);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.b2b-submit:hover:not(:disabled) {
  background: var(--green-ink);
}

.b2b-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.b2b-note {
  font-size: 0.78rem;
  color: var(--gray-light);
  text-align: center;
  margin: 16px 0 0;
}

.b2b-success {
  background: var(--white);
  color: var(--black);
  border-radius: var(--b2b-r);
  padding: 64px 48px;
  text-align: center;
}

.b2b-success svg {
  width: 56px;
  height: 56px;
  color: var(--green-dark);
  margin-bottom: 20px;
}

.b2b-success h3 {
  font-size: 1.7rem;
  color: var(--b2b-ink);
  margin-bottom: 12px;
}

.b2b-success p {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.7;
  margin: 0;
  max-width: 44ch;
  margin-inline: auto;
}

/* ── faq ──────────────────────────────────────────────────────────── */
.b2b-faq {
  max-width: 880px;
  margin: 0 auto;
}

.b2b-faq__item {
  padding: 28px 0;
  border-top: 1px solid var(--b2b-line);
}

.b2b-faq__item:last-child {
  border-bottom: 1px solid var(--b2b-line);
}

.b2b-faq__item h3 {
  font-size: 1.15rem;
  color: var(--b2b-ink);
  margin-bottom: 10px;
}

.b2b-faq__item p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--gray);
  margin: 0;
  max-width: 68ch;
}

/* ── footer ───────────────────────────────────────────────────────── */
.footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.7);
  padding: 32px 0;
}

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

.footer-bottom p {
  font-size: 0.85rem;
  margin: 0;
}

.footer-bottom__links {
  display: flex;
  gap: 24px;
}

.footer-bottom__links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.footer-bottom__links a:hover {
  color: var(--green-light);
}

/* ── back to top ──────────────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: var(--b2b-r);
  background: var(--green-dark);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  pointer-events: none;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--green-ink);
}

.scroll-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── responsive ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .b2b-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .b2b-terms,
  .b2b-formwrap {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .b2b-formintro {
    position: static;
  }

  .b2b-list__item {
    grid-template-columns: 200px 1fr;
    gap: 24px;
  }

  .b2b-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 76px 0;
  }

  .b2b-hero {
    /* 104px, not 140px: a phone viewport is shorter than a laptop one, so the
       desktop value was proportionally worse here. Clears the 64px mobile nav
       (20px padding + 44px row) with room to spare. */
    padding: 104px 0 56px;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .b2b-cards,
  .b2b-steps {
    grid-template-columns: 1fr;
  }

  .b2b-facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .b2b-form__row,
  .b2b-list__item {
    grid-template-columns: 1fr;
  }

  .b2b-form {
    padding: 30px 24px;
  }

  .b2b-head {
    margin-bottom: 40px;
  }

  .b2b-hero-actions {
    margin-bottom: 44px;
  }
}
