/* ---------------------------------------------------------------------------
   Version 1a — «Ремесло»
   Dark leather palette, Prata serif accents, Manrope UI, 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-a {
  background: var(--a-bg);
  color: var(--a-ink);
  font-family: var(--font-sans);
}

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

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

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

.a-logo {
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--a-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--a-accent);
}

.a-header__names { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.a-header__name {
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.a-header__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--a-ink-label);
  text-transform: uppercase;
  white-space: nowrap;
}

.a-nav { display: flex; gap: 30px; font-size: 14px; color: var(--a-ink-nav); white-space: nowrap; }
.a-nav a { padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color .15s ease, border-color .15s ease; }
.a-nav a:hover { color: var(--a-ink); border-bottom-color: var(--a-seam); }
.dir-a a:focus-visible,
.dir-a button:focus-visible { outline: 2px solid var(--a-focus); outline-offset: 3px; }
.a-header__cta { display: flex; align-items: center; gap: 18px; flex: none; }
.a-header__phone { font-size: 15px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }

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

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

.a-menu__phone {
  display: block;
  padding-top: 18px;
  font-size: 17px;
  font-weight: 600;
  color: var(--a-accent);
}

.a-menu__nav a { transition: color .15s ease; }
.a-menu__nav a:hover { color: var(--a-ink); }

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

.a-btn {
  display: inline-block;
  border: 0;
  border-radius: var(--radius-chip);
  font-family: var(--font-sans);
  font-weight: 700;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

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

.a-btn--header { background: var(--a-accent); color: var(--a-bg); font-size: 14px; padding: 13px 22px; }
.a-btn--compact { font-size: 13px; padding: 11px 14px; }
.a-btn--hero { background: var(--a-accent); color: var(--a-bg); font-size: 15px; padding: 17px 30px; }

.a-btn--ghost {
  border: 1px solid var(--a-rule-btn);
  background: transparent;
  color: var(--a-ink);
  font-size: 15px;
  font-weight: 600;
  padding: 16px 28px;
}

.a-btn--submit {
  display: block;
  width: 100%;
  background: var(--a-accent);
  color: var(--a-bg);
  text-align: center;
  font-size: 15px;
  padding: 17px;
}

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

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

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

.a-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); min-height: clamp(440px, 48vw, 640px); }

.a-hero__copy {
  position: relative;
  padding: 88px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

/* The seam: copy and photograph are two panels joined by a stitch — the one
   graphic device this direction borrows from the trade itself. */
.a-hero__copy::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background-image: var(--a-seam-v);
}

.a-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--a-accent);
}

.a-hero__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.8vw, 62px);
  line-height: 1.08;
  font-weight: 400;
  text-wrap: pretty;
}

.a-hero__lede {
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--a-ink-muted);
  max-width: 460px;
  text-wrap: pretty;
}

.a-hero__actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.a-hero__facts { display: flex; gap: 34px; padding-top: 12px; font-size: 13px; color: var(--a-ink-label); }

.a-hero__media { border-left: 0; }

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

.a-section { padding: 88px 56px; border-top: 1px solid var(--a-rule); }
.a-section--flush { padding: 0 56px 88px; border-top: 0; }
.a-section--deep { padding: 80px 56px; background: var(--a-surface-deep); border-top: 1px solid var(--a-rule); }

.a-section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
}

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

.a-h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.7vw, 34px);
  font-weight: 400;
  text-wrap: balance;
}

.a-h2--tight { margin: 0 0 8px; }
.a-section__aside { font-size: 14px; color: var(--a-ink-label); white-space: nowrap; }
.a-section__lede { margin: 0 0 36px; font-size: 15px; color: var(--a-ink-soft); }

.a-link {
  font-size: 14px;
  color: var(--a-accent);
  border-bottom: 1px solid var(--a-accent-deep);
  padding-bottom: 3px;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}

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

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

.a-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.a-card { background: var(--a-surface); border: 1px solid var(--a-rule); }
.a-card__media { aspect-ratio: 4 / 3; padding: 14px; }
.a-card__body { padding: 24px 22px 28px; display: flex; flex-direction: column; gap: 10px; }
.a-card__title { margin: 0; font-family: var(--font-serif); font-size: 21px; font-weight: 400; }
.a-card__text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--a-ink-soft); }

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

.a-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 210px;
  gap: 14px;
}

.a-tile { padding: 12px; }
/* The process strip spans the full row: the source left the last row half
   empty, which read as a broken grid. Full width matches the sibling
   direction 1b, where the same tile is a full-width panorama. */
.a-tile--lead { grid-column: span 2; grid-row: span 2; padding: 14px; }
.a-tile--wide { grid-column: span 2; }
.a-tile--full { grid-column: span 4; }

.a-more {
  display: block;
  margin-top: 16px;
  text-align: center;
  border: 1px solid var(--a-rule-btn);
  padding: 15px;
  font-size: 14px;
}

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

/* Three equal channels, not three steps: the frames and the 01/02/03 counters
   are gone, the columns are joined by the same seam as the hero. */
.a-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }

.a-step {
  position: relative;
  padding: 4px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.a-step:first-child { padding-left: 0; }
.a-step:last-child { padding-right: 0; }

.a-step + .a-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background-image: var(--a-seam-v);
}

.a-step__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; color: var(--a-accent); }
.a-step__value { font-family: var(--font-serif); font-size: 24px; }
.a-step__text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--a-ink-soft); }

.a-step__link {
  margin-top: auto;
  padding-top: 14px;
  align-self: flex-start;
  font-size: 14px;
  color: var(--a-ink);
  border-bottom: 1px solid var(--a-rule-btn);
  transition: color .15s ease, border-color .15s ease;
}

.a-step__link:hover { color: var(--a-accent-hover); border-bottom-color: var(--a-seam); }

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

.a-about { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--a-rule); }
.a-about__media { min-height: 460px; }

.a-about__copy {
  padding: 80px 56px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-content: center;
}

.a-about__text { margin: 0; font-size: 16px; line-height: 1.7; color: var(--a-ink-muted); text-wrap: pretty; }
.a-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-top: 8px; }
.a-fact { border-top: 1px solid var(--a-rule-soft); padding-top: 14px; }
.a-fact__value { font-family: var(--font-serif); font-size: 28px; }
.a-fact__label { font-size: 13px; color: var(--a-ink-label); margin-top: 4px; }

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

.a-contacts {
  padding: 88px 56px;
  border-top: 1px solid var(--a-rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.a-contacts__col { display: flex; flex-direction: column; gap: 26px; }
.a-contactlist { display: flex; flex-direction: column; gap: 18px; font-size: 16px; }

/* The phone leads: it is the fastest of the three channels, so it is set in
   the display face at display size, and the rest stay at list size. */
.a-contactlist__lead { font-family: var(--font-serif); font-size: clamp(26px, 2.4vw, 32px); line-height: 1.15; }
.a-contactlist__lead a { transition: color .15s ease; }
.a-contactlist__lead a:hover { color: var(--a-accent-hover); }

.a-contactlist__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--a-ink-label);
  margin-bottom: 6px;
}

.a-map { height: 180px; font-size: 11px; }

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

.a-form {
  background: var(--a-surface);
  border: 1px solid var(--a-rule);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.a-form__title { margin: 0; font-family: var(--font-serif); font-size: 26px; font-weight: 400; }
.a-form__note { margin: 0; font-size: 14px; color: var(--a-ink-soft); line-height: 1.6; }
.a-form__fields { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.a-form__legal { font-size: 12px; color: var(--a-field-ink); line-height: 1.5; }
.a-form__status { margin: 0; font-size: 13px; line-height: 1.5; color: var(--a-accent); }

.a-field {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--a-ink);
  background: var(--a-field-bg);
  border: 1px solid var(--a-field-rule);
  border-radius: 0;
  padding: 15px 16px;
}

.a-field::placeholder { color: var(--a-field-ink); opacity: 1; }
.a-field { transition: border-color .15s ease; }
.a-field:hover { border-color: var(--a-rule-hover); }
.a-field:focus { outline: none; border-color: var(--a-accent); box-shadow: 0 0 0 1px var(--a-accent); }
.a-field--area { height: 86px; min-height: 86px; resize: none; }

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

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

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

/* -------------------------------------------------------------- mobile dock -- */
/* The designer drew this as `position:sticky`; in the artboard it could not
   stick, on the real page it can. */

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

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

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

@media (min-width: 1024px) and (max-width: 1279px) {
  .a-header { padding: 20px 32px; gap: 16px; }
  .a-header__tag { display: none; }
  .a-header__phone { display: none; }
  .a-nav { gap: 18px; font-size: 13px; }
  .a-hero__copy { padding: 64px 40px; }
  .a-step { padding: 4px 28px; }
  .a-section { padding: 72px 40px; }
  .a-section--flush { padding: 0 40px 72px; }
  .a-section--deep { padding: 64px 40px; }
  .a-about__copy { padding: 64px 40px; }
  .a-contacts { padding: 72px 40px; gap: 40px; }
  .a-footer { padding: 28px 40px; }
}

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

@media (max-width: 1023px) {
  /* --- header ---------------------------------------------------------- */
  .a-header { padding: 16px 20px; gap: 12px; }
  .a-logo { width: 30px; height: 30px; font-size: 13px; }
  .a-header__brand { gap: 10px; }
  .a-header__name { font-size: 13px; }
  .a-header__tag { display: none; }
  .a-header__cta { gap: 10px; }

  /* --- hero: photo leads, then the copy -------------------------------- */
  .a-hero { grid-template-columns: 1fr; min-height: 0; }
  .a-hero__media { order: -1; border-left: 0; height: clamp(240px, 66vw, 380px); }
  .a-hero__copy { padding: 28px 20px 32px; gap: 18px; }
  .a-hero__title { font-size: clamp(32px, 8.4vw, 44px); line-height: 1.14; }
  .a-hero__lede { font-size: 15px; line-height: 1.6; }
  .a-hero__actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .a-hero__actions .a-btn { text-align: center; }
  .a-hero__facts { flex-wrap: wrap; gap: 8px 20px; padding-top: 4px; font-size: 12px; }

  /* the seam turns horizontal: the photo now sits above the copy */
  .a-hero__copy::after {
    top: 0;
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 1px;
    background-image: var(--a-seam-h);
  }

  /* --- sections --------------------------------------------------------- */
  .a-section { padding: 8px 20px 32px; }
  .a-section--flush { padding: 0 20px 32px; }
  .a-section--deep { padding: 32px 20px; }
  .a-section__head { margin-bottom: 16px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .a-h2 { font-size: clamp(26px, 6.6vw, 34px); }
  .a-section--deep > .a-h2--tight { margin-bottom: 6px; }
  .a-section__lede { margin-bottom: 18px; font-size: 14px; }
  /* the first section sits right under the hero and carries its own top gap */
  .a-section:not(.a-section--deep):not(.a-section--flush) { padding-top: 28px; }

  /* --- service cards: 2 × 2, title only (as drawn) ---------------------- */
  .a-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .a-card__media { padding: 0; }
  .a-card__body { padding: 14px; gap: 6px; }
  .a-card__title { font-size: 16px; }
  .a-card__text { font-size: 13px; line-height: 1.5; }

  /* --- works: three tiles + a link to the gallery ----------------------- */
  .a-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; gap: 10px; }
  .a-tile { padding: 0; height: 130px; }
  .a-tile--lead { grid-column: span 2; grid-row: auto; height: 200px; padding: 0; }

  /* --- how to order: compact stacked rows ------------------------------- */
  .a-steps { grid-template-columns: 1fr; gap: 0; }
  .a-step { padding: 18px 0; gap: 4px; }
  .a-step:first-child { padding-top: 4px; }
  .a-step:last-child { padding-bottom: 4px; }

  .a-step + .a-step::before {
    left: 0;
    right: 0;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
    background-image: var(--a-seam-h);
  }
  .a-step__label { font-size: 10px; letter-spacing: .14em; }
  .a-step__value { font-size: 19px; }
  .a-step__text { font-size: 13px; line-height: 1.55; }
  .a-step__link { margin-top: 8px; padding-top: 0; font-size: 13px; }

  /* --- about: title, photo, text ---------------------------------------- */
  .a-about {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px 20px;
    border-top: 1px solid var(--a-rule);
  }

  .a-about__copy { display: contents; }
  .a-about__copy > .a-h2 { order: 1; }
  .a-about__media { order: 2; min-height: 0; height: 200px; }
  .a-about__text { order: 3; font-size: 15px; line-height: 1.65; }
  .a-facts { order: 4; gap: 16px; }
  .a-fact__value { font-size: 22px; }

  /* --- contacts --------------------------------------------------------- */
  .a-contacts { grid-template-columns: 1fr; gap: 16px; padding: 32px 20px; }
  .a-contacts__col { gap: 16px; }
  .a-contactlist { gap: 12px; font-size: 15px; line-height: 1.5; }
  .a-contactlist__lead { font-size: 26px; line-height: 1.2; }
  .a-contactlist__label { font-size: 10px; margin-bottom: 2px; }
  .a-map { height: 150px; font-size: 10px; }

  /* the phone artboard draws the fields straight on the section, no card */
  .a-form { background: transparent; border: 0; padding: 0; gap: 10px; }
  .a-form__fields { gap: 10px; padding-top: 6px; }
  .a-field { padding: 15px; }
  .a-form__note { font-size: 13px; }
  /* the consent line is a compliance notice, not a design nicety: it stays */
  .a-form__legal { font-size: 11px; }

  /* --- footer ----------------------------------------------------------- */
  .a-footer {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--a-rule);
    font-size: 12px;
  }

  .a-footer__contact { gap: 18px; }
}
