/* ---------------------------------------------------------------------------
   Version 1b — «Минимал»
   Light stone palette, Space Grotesk throughout, IBM Plex Mono labels.

   Wide (>=1024px) follows the designer's 1280 desktop artboard.
   Narrow (<1024px) follows the designer's 390 phone artboard, with fluid type
   so the phone composition still reads well on tablets.
   --------------------------------------------------------------------------- */

.dir-b {
  background: var(--b-bg);
  color: var(--b-ink);
  font-family: var(--font-grotesk);
}

/* ------------------------------------------------------------------ header -- */

.b-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 56px;
  border-bottom: 1px solid var(--b-rule);
  background: var(--b-bg);
}

.b-header__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

.b-logo {
  flex: none;
  width: 34px;
  height: 34px;
  background: var(--b-accent);
  color: var(--b-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
}

.b-header__name { font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }

.b-header__city {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--b-ink-mono);
  text-transform: uppercase;
  border-left: 1px solid var(--b-rule);
  padding-left: 12px;
  white-space: nowrap;
}

.b-nav { display: flex; gap: 28px; font-size: 14px; font-weight: 500; color: var(--b-ink-nav); white-space: nowrap; }
.b-nav a { padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color .15s ease, border-color .15s ease; }
.b-nav a:hover { color: var(--b-accent); border-bottom-color: var(--b-accent); }
.dir-b a:focus-visible,
.dir-b button:focus-visible { outline: 2px solid var(--b-focus); outline-offset: 3px; }
.b-form a:focus-visible,
.b-form button:focus-visible,
.b-form input:focus-visible,
.b-form textarea:focus-visible { outline-color: var(--b-focus-on-dark); }
.b-header__cta { display: flex; align-items: center; gap: 16px; flex: none; }
.b-header__phone { font-family: var(--font-mono); font-size: 14px; white-space: nowrap; }

/* Mobile menu panel — the source leaves the burger inert. */
.b-menu { padding: 4px 18px 18px; background: var(--b-bg); border-bottom: 1px solid var(--b-rule); }
.b-menu__nav { display: flex; flex-direction: column; }

.b-menu__nav a {
  padding: 15px 0;
  border-bottom: 1px solid var(--b-rule);
  font-size: 16px;
  font-weight: 500;
  color: var(--b-ink-nav);
}

.b-menu__phone { display: block; padding-top: 18px; font-size: 17px; font-weight: 600; color: var(--b-accent); }
.b-menu__nav a { transition: color .15s ease; }
.b-menu__nav a:hover { color: var(--b-accent); }

/* ----------------------------------------------------------------- buttons -- */

.b-btn {
  display: inline-block;
  border: 0;
  background: var(--b-accent);
  color: var(--b-on-accent);
  font-family: var(--font-grotesk);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.b-btn--header:hover,
.b-btn--hero:hover { background: var(--b-accent-hover); }
.b-btn--ghost:hover { border-color: var(--b-accent); color: var(--b-accent); }
.b-btn--submit:hover { background: var(--b-accent-label); }
.b-more:hover { border-color: var(--b-accent); color: var(--b-accent); }

.b-btn--header { font-size: 14px; padding: 13px 22px; }
.b-btn--hero { font-size: 15px; padding: 16px 26px; }

.b-btn--ghost {
  background: transparent;
  border: 1px solid var(--b-ink);
  color: var(--b-ink);
  font-size: 15px;
  padding: 15px 24px;
}

.b-btn--submit {
  display: block;
  width: 100%;
  background: var(--b-on-accent);
  color: var(--b-ink);
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  padding: 17px;
  margin-top: 8px;
}

.b-burger {
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--b-rule);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.b-burger span { width: 16px; height: 1px; background: var(--b-ink); }
.b-burger[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.b-burger[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* -------------------------------------------------------------------- hero -- */

.b-hero {
  padding: 76px 56px 56px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  border-bottom: 1px solid var(--b-rule);
}

.b-hero__top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: end; }

.b-hero__title {
  margin: 0;
  font-size: clamp(36px, 5vw, 70px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -.03em;
  text-wrap: pretty;
}

/* A single hairline ties the headline and the supporting column into one
   composition instead of two blocks standing side by side. */
.b-hero__aside {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-left: 1px solid var(--b-rule);
  padding-left: 32px;
}
.b-hero__lede { margin: 0; font-size: 17px; line-height: 1.6; color: var(--b-ink-muted); max-width: 42ch; text-wrap: pretty; }
.b-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.b-hero__facts {
  display: flex;
  gap: 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--b-ink-mono);
  text-transform: uppercase;
}

.b-hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--b-ink-mono);
  text-transform: uppercase;
}

.b-hero__media { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; height: 440px; }
.b-hero__media-side { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; }

/* ---------------------------------------------------------------- sections -- */

.b-section { padding: 72px 56px; border-bottom: 1px solid var(--b-rule); }
.b-section--alt { background: var(--b-surface-alt); }

.b-section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 32px;
}

.b-section__head--tight { margin-bottom: 28px; }

.b-h2 {
  margin: 0;
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 600;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.b-h2--tight { margin: 0 0 6px; }

.b-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--b-ink-mono);
  text-transform: uppercase;
  white-space: nowrap;
}

.b-section__lede { margin: 0 0 32px; font-size: 15px; color: var(--b-ink-soft); }

.b-link-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--b-ink);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}

.b-link-mono:hover { color: var(--b-accent); border-bottom-color: var(--b-accent); }
.b-more { transition: border-color .15s ease, color .15s ease; }

/* --------------------------------------------------------- service cards -- */

.b-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.b-card { background: var(--b-surface); border: 1px solid var(--b-rule-soft); }
.b-card__media { aspect-ratio: 4 / 3; padding: 12px; }
/* The four services are a set, not a sequence: the 01–04 counters are gone
   and an olive rule marks each card's start instead. */
.b-card__body { padding: 22px 20px 26px; display: flex; flex-direction: column; gap: 8px; }
.b-card__title { margin: 0; font-size: 20px; font-weight: 600; padding-top: 14px; border-top: 2px solid var(--b-accent); }
.b-card__text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--b-ink-soft); }

/* stacked rows — the phone composition */
.b-rows { display: flex; flex-direction: column; gap: 10px; }
.b-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; background: var(--b-surface); border: 1px solid var(--b-rule-soft); }
.b-row__media { aspect-ratio: 4 / 3; }
.b-row__body { padding: 14px 14px 14px 0; }
.b-row__title { margin: 0; font-size: 17px; font-weight: 600; }
.b-row__text { margin: 0; font-size: 13px; color: var(--b-ink-soft); line-height: 1.5; }

/* --------------------------------------------------------------- gallery -- */

.b-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 250px;
  gap: 12px;
}

.b-tile--wide { grid-column: span 2; }
.b-tile--full { grid-column: span 3; }

.b-more {
  display: block;
  margin-top: 14px;
  text-align: center;
  border: 1px solid var(--b-ink);
  padding: 15px;
  font-size: 14px;
  font-weight: 600;
}

/* ----------------------------------------------------------- how to order -- */

.b-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.b-step { background: var(--b-surface); border: 1px solid var(--b-rule-soft); padding: 30px 26px; display: flex; flex-direction: column; gap: 10px; }
.b-step__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--b-ink-label); }
.b-step__value { font-size: 22px; font-weight: 600; }
.b-step__text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--b-ink-soft); }

.b-step__link {
  margin-top: auto;
  padding-top: 14px;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--b-ink);
  transition: color .15s ease, border-color .15s ease;
}

.b-step:not(.b-step--accent) .b-step__link:hover { color: var(--b-accent); border-bottom-color: var(--b-accent); }
.b-step--accent .b-step__link:hover { color: var(--b-accent-label); border-bottom-color: var(--b-accent-label); }

.b-step--accent { background: var(--b-accent); border-color: var(--b-accent); color: var(--b-on-accent); }
.b-step--accent .b-step__label { color: var(--b-accent-label); }
.b-step--accent .b-step__text { color: var(--b-accent-text); }
.b-step--accent .b-step__link { border-bottom-color: var(--b-on-accent); }

/* ------------------------------------------------------------------- about -- */

.b-about { display: grid; grid-template-columns: .9fr 1.1fr; border-bottom: 1px solid var(--b-rule); }

.b-about__copy {
  padding: 72px 48px 72px 56px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

.b-about__text { margin: 0; font-size: 16px; line-height: 1.7; color: var(--b-ink-muted); text-wrap: pretty; }
.b-specs { display: flex; flex-direction: column; gap: 0; padding-top: 8px; }
.b-spec { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--b-rule); padding: 14px 0; font-size: 15px; }
.b-spec:last-child { border-bottom: 1px solid var(--b-rule); }
.b-spec__value { font-family: var(--font-mono); color: var(--b-ink-soft); }
.b-about__media { min-height: 480px; }

/* ---------------------------------------------------------------- contacts -- */

.b-contacts { padding: 72px 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.b-contacts__col { display: flex; flex-direction: column; gap: 24px; }
.b-contactrows { display: flex; flex-direction: column; gap: 0; }
.b-contactrow { border-top: 1px solid var(--b-rule); padding: 16px 0; display: flex; justify-content: space-between; gap: 16px; font-size: 16px; }
.b-contactrow:last-child { border-bottom: 1px solid var(--b-rule); }

.b-contactrow__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--b-ink-mono);
  text-transform: uppercase;
  align-self: center;
}

.b-contactrow--lead { padding: 20px 0; align-items: center; }
.b-contactrow--lead .b-contactrow__value { font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -.02em; }
.b-contactrow--lead a { transition: color .15s ease; }
.b-contactrow--lead a:hover { color: var(--b-accent); }

.b-map { height: 190px; font-size: 11px; }

/* -------------------------------------------------------------------- form -- */

.b-form {
  background: var(--b-ink);
  color: var(--b-on-accent);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.b-form__title { margin: 0; font-size: 26px; font-weight: 600; }
.b-form__note { margin: 0; font-size: 14px; line-height: 1.6; color: var(--b-on-dark-muted); }
.b-form__fields { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.b-form__legal { font-size: 12px; color: var(--b-field-ink); line-height: 1.5; }
.b-form__status { margin: 0; font-size: 13px; line-height: 1.5; color: var(--b-accent-label); }

.b-field {
  width: 100%;
  font-family: var(--font-grotesk);
  font-size: 14px;
  color: var(--b-on-accent);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--b-field-rule);
  border-radius: 0;
  padding: 14px 2px;
}

.b-field::placeholder { color: var(--b-field-ink); opacity: 1; }
.b-field { transition: border-color .15s ease; }
.b-field:hover { border-bottom-color: var(--b-on-dark-muted); }
.b-field:focus { outline: none; border-bottom-color: var(--b-on-accent); box-shadow: 0 1px 0 0 var(--b-on-accent); }
.b-field--area { padding: 14px 2px 60px; resize: none; }

/* ------------------------------------------------------------------ footer -- */

.b-footer {
  padding: 28px 56px;
  border-top: 1px solid var(--b-rule);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--b-ink-mono);
}

.b-footer__contact { display: flex; gap: 22px; }
.b-footer__contact a { color: var(--b-ink-nav); transition: color .15s ease; }
.b-footer__contact a:hover { color: var(--b-accent); }

/* -------------------------------------------------------------- mobile dock -- */

.b-dock {
  position: sticky;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--b-rule);
}

.b-dock a { padding: 16px; text-align: center; font-size: 14px; font-weight: 600; transition: background-color .15s ease; }
.b-dock__msg:hover { background: var(--b-accent-hover); }
.b-dock__call { background: var(--b-surface); }
.b-dock__msg { background: var(--b-accent); color: var(--b-on-accent); }

/* ======================================================== compact desktop == */

@media (min-width: 1024px) and (max-width: 1339px) {
  .b-header { padding: 18px 32px; gap: 16px; }
  .b-header__city { display: none; }
  .b-header__phone { display: none; }
  .b-nav { gap: 18px; font-size: 13px; }
  .b-hero { padding: 56px 40px 44px; gap: 32px; }
  .b-hero__top { gap: 36px; }
  .b-section { padding: 56px 40px; }
  .b-about__copy { padding: 56px 32px 56px 40px; }
  .b-contacts { padding: 56px 40px; gap: 36px; }
  .b-footer { padding: 24px 40px; }
}

/* ============================================================ phone layout == */

@media (max-width: 1023px) {
  /* --- header ---------------------------------------------------------- */
  .b-header { padding: 14px 18px; gap: 10px; }
  .b-logo { width: 28px; height: 28px; font-size: 13px; }
  .b-header__brand { gap: 10px; }
  .b-header__name { font-size: 14px; }
  .b-header__cta { gap: 10px; }
  .b-btn--header { font-size: 13px; padding: 11px 14px; }

  /* --- hero: title, lede, photo, buttons -------------------------------- */
  .b-hero { padding: 28px 18px; gap: 16px; }
  .b-hero__top { display: contents; }
  .b-hero__aside { display: contents; }
  .b-hero__lede { max-width: none; }
  .b-hero__eyebrow { order: 0; }
  .b-hero__title { order: 1; font-size: clamp(36px, 9.2vw, 52px); line-height: 1.05; }
  .b-hero__lede { order: 2; font-size: 15px; }
  .b-hero__media { order: 3; grid-template-columns: 1fr; height: 250px; }
  .b-hero__media-side { display: none; }
  .b-hero__actions { order: 4; flex-direction: column; gap: 10px; }
  .b-hero__actions .b-btn { text-align: center; }
  .b-hero__facts { order: 5; flex-wrap: wrap; gap: 8px 20px; font-size: 10px; }

  /* --- sections --------------------------------------------------------- */
  .b-section { padding: 28px 18px; }
  .b-section__head { margin-bottom: 16px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .b-section__head--tight { margin-bottom: 16px; }
  .b-h2 { font-size: clamp(26px, 6.6vw, 34px); }
  .b-h2--tight { margin-bottom: 6px; }
  .b-section__lede { margin-bottom: 16px; font-size: 14px; }

  /* --- works: two tiles + a link to the gallery ------------------------- */
  .b-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; gap: 8px; }
  .b-tile { height: 135px; }
  .b-tile--wide { grid-column: span 2; height: 190px; }

  /* --- how to order: stacked rows --------------------------------------- */
  .b-steps { grid-template-columns: 1fr; gap: 8px; }
  .b-step { padding: 18px; gap: 4px; }
  .b-step__value { font-size: 18px; }
  .b-step__text { font-size: 13px; line-height: 1.55; }
  .b-step__link { margin-top: 8px; padding-top: 0; }

  /* --- about: title, photo, text ---------------------------------------- */
  .b-about { display: flex; flex-direction: column; gap: 14px; padding: 28px 18px; border-bottom: 1px solid var(--b-rule); }
  .b-about__copy { display: contents; }
  .b-about__copy > .b-h2 { order: 1; }
  .b-about__media { order: 2; min-height: 0; height: 200px; }
  .b-about__text { order: 3; font-size: 15px; line-height: 1.65; }
  .b-specs { order: 4; padding-top: 0; }
  .b-spec { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 0; }
  .b-spec__value { font-size: 14px; }

  /* --- contacts --------------------------------------------------------- */
  .b-contacts { grid-template-columns: 1fr; gap: 14px; padding: 28px 18px; }
  .b-contacts__col { gap: 14px; }
  .b-contactrow { padding: 13px 0; font-size: 15px; }
  .b-contactrow__label { font-size: 10px; }
  .b-contactrow--lead { padding: 15px 0; }
  .b-contactrow--lead .b-contactrow__value { font-size: 20px; }
  .b-map { height: 150px; font-size: 10px; }
  .b-form { padding: 24px 20px; gap: 10px; }
  .b-form__title { font-size: 20px; }
  .b-field { padding: 13px 2px; }
  .b-form__legal { font-size: 11px; }

  /* --- footer ----------------------------------------------------------- */
  .b-footer { padding: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 11px; }
  .b-footer__contact { gap: 18px; }
}
