/* T-Transit · home hero layout around the panning workbench.
   Loaded last on the canonical and pilot homes, after style.css + studio.css.
   Covers both templates: section.lead-home directly in main (pilot) and inside
   [data-block=hero] (canonical CMS). Only layout, type, colour and CTA states of
   the light DOM are set here; tt-workbench's shadow tree and the ambient layer
   behind the hero are not addressed, and no background is painted over them. */

@media screen {

/* ── Shared: type, ink, the two actions ───────────────────────────────── */

body.tt-studio[data-page=home] .lead.lead-home {
  --pl-ivory: 245, 237, 221;
  --pl-red: #dc112c;
  --pl-red-deep: #b80d24;
  --pl-ink: 4, 13, 28;
}

body.tt-studio[data-page=home] .lead.lead-home .eyebrow {
  color: rgba(var(--pl-ivory), .76);
}

/* Words are never split: sizes below keep the longest RU word inside the
   column, break-word stays only as a last resort for unforeseen CMS copy. */
body.tt-studio[data-page=home] .lead.lead-home h1 {
  max-width: none;
  font-family: var(--tt-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.022em;
  color: rgb(var(--pl-ivory));
  text-wrap: balance;
  hyphens: manual;
  word-break: normal;
  overflow-wrap: break-word;
}

body.tt-studio[data-page=home] .lead.lead-home .lede {
  font-family: var(--tt-reading);
  color: rgba(var(--pl-ivory), .88);
  text-wrap: pretty;
}

/* Primary: a solid red control sized to its label. Secondary: a text link.
   They are deliberately not the same object at the same width. */
body.tt-studio[data-page=home] .lead.lead-home .actions .button {
  font-family: var(--tt-reading);
  letter-spacing: 0;
}
body.tt-studio[data-page=home] .lead.lead-home .actions .button span {
  flex: none;
  transform: none;
}

body.tt-studio[data-page=home] .lead.lead-home .actions .button.primary {
  min-height: 56px;
  padding: 0 20px 0 22px;
  gap: 24px;
  border: 0;
  border-radius: 2px;
  background: var(--pl-red);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .26), 0 16px 26px -18px rgba(var(--pl-ink), .95);
}
body.tt-studio[data-page=home] .lead.lead-home .actions .button.primary span {
  font-size: 18px;
  line-height: 1;
}
body.tt-studio[data-page=home] .lead.lead-home .actions .button.primary:active {
  background: var(--pl-red-deep);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .3);
}

body.tt-studio[data-page=home] .lead.lead-home .actions .button.secondary {
  width: auto;
  min-height: 46px;
  padding: 12px 0 10px;
  gap: 12px;
  justify-content: flex-start;
  justify-self: start;
  align-self: flex-start;
  border: 0;
  border-bottom: 1px solid rgba(var(--pl-ivory), .42);
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: rgb(var(--pl-ivory));
  font-size: 16px;
  font-weight: 560;
  line-height: 1.2;
}
body.tt-studio[data-page=home] .lead.lead-home .actions .button.secondary:active {
  border-bottom-color: rgb(var(--pl-ivory));
}

@media (hover: hover) and (pointer: fine) {
  body.tt-studio[data-page=home] .lead.lead-home .actions .button.primary:hover {
    background: var(--pl-red-deep);
  }
  body.tt-studio[data-page=home] .lead.lead-home .actions .button:hover span {
    transform: translate(3px, -3px);
  }
  body.tt-studio[data-page=home] .lead.lead-home .actions .button.secondary:hover {
    background: none;
    color: #fff;
    border-bottom-color: #fff;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body.tt-studio[data-page=home] .lead.lead-home .actions .button {
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
  }
  body.tt-studio[data-page=home] .lead.lead-home .actions .button span {
    transition: transform .26s cubic-bezier(.2, .7, .1, 1);
  }
  body.tt-studio[data-page=home] .lead.lead-home .actions .button.primary:active {
    transform: translateY(1px);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.tt-studio[data-page=home] .lead.lead-home .actions .button,
  body.tt-studio[data-page=home] .lead.lead-home .actions .button span {
    transition: none;
    transform: none;
  }
}

/* ── Phones and narrow tablets: statement, drawing with its stage controls,
      then the actions directly underneath ─────────────────────────────── */

@media (max-width: 699.98px) {
  body.tt-studio[data-page=home] .lead.lead-home {
    padding-block: 14px 52px;
  }
  body.tt-studio[data-page=home] .lead.lead-home .eyebrow {
    margin: 0 0 10px;
  }
  body.tt-studio[data-page=home] .lead.lead-home h1 {
    margin: 0 0 12px;
    font-size: clamp(23px, 7.2vw, 46px);
    line-height: 1.07;
  }
  /* Canonical RU title is longer and Cyrillic Unbounded is wide: at this size
     it sets as three lines (Импорт промышленной / химии, металлов /
     и оборудования) instead of four with a lone first word. */
  body.tt-studio[data-page=home] [data-block=hero] .lead.lead-home h1:lang(ru) {
    font-size: clamp(19px, 5.9vw, 40px);
    line-height: 1.1;
  }
  body.tt-studio[data-page=home] .lead.lead-home .lede {
    margin: 0 0 16px;
    max-width: 36em;
    font-size: 16px;
    line-height: 1.5;
  }
  body.tt-studio[data-page=home] .lead.lead-home > .hero-workbench {
    order: 4;
    margin: 0 0 20px;
  }
  body.tt-studio[data-page=home] .lead.lead-home .actions {
    order: 5;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin: 0 0 40px;
  }
  body.tt-studio[data-page=home] .lead.lead-home .actions .button.primary {
    width: 100%;
    min-height: 54px;
  }
  body.tt-studio[data-page=home] .lead.lead-home > .roles-home {
    order: 6;
  }
}

/* ── 700–1099: full-width masthead, intro, one row of actions, drawing ── */

@media (min-width: 700px) {
  body.tt-studio[data-page=home] .lead.lead-home h1 {
    font-size: clamp(36px, 5.5vw, 60px);
    margin-bottom: 24px;
  }
  body.tt-studio[data-page=home] .lead.lead-home .lede {
    margin: 0 0 26px;
    max-width: 34em;
  }
  body.tt-studio[data-page=home] .lead.lead-home .actions {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    gap: 10px 32px;
    margin: 0 0 40px;
  }
  body.tt-studio[data-page=home] .lead.lead-home .actions .button {
    width: auto;
  }
  body.tt-studio[data-page=home] .lead.lead-home .actions .button.primary {
    min-width: min(100%, 18.5rem);
  }
}

/* ── Desktop: two-line masthead over one open band. Intro and actions hang
      from the same top edge as the drawing's title; the space below them is
      left empty on purpose. No frames, rules or panels on either side. ─── */

@media (min-width: 1100px) {
  body.tt-studio[data-page=home] .lead.lead-home {
    padding-block: clamp(32px, 3.6vw, 56px) clamp(64px, 6vw, 104px);
  }
  body.tt-studio[data-page=home] .lead.lead-home .eyebrow {
    margin-bottom: 14px;
  }
  /* 4.4vw capped at 66px keeps «Импорт промышленной химии,» and
     “Import of industrial chemicals,” on one line of the 1376px shell,
     so both canonical titles and both pilot titles set in two lines. */
  body.tt-studio[data-page=home] .lead.lead-home h1 {
    font-size: clamp(46px, 4.4vw, 66px);
    line-height: 1.06;
    letter-spacing: -.025em;
    margin-bottom: clamp(24px, 2.4vw, 40px);
  }
  body.tt-studio[data-page=home] .lead.lead-home .lede {
    grid-area: 3 / 1 / 4 / 5;
    align-self: start;
    margin: 9px 0 30px;
    padding-inline-end: clamp(0px, 1.4vw, 24px);
    max-width: none;
    font-size: clamp(17px, 1.25vw, 19px);
    line-height: 1.52;
  }
  body.tt-studio[data-page=home] .lead.lead-home .actions {
    grid-area: 4 / 1 / 5 / 5;
    align-self: start;
    flex-flow: column nowrap;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
  }
  body.tt-studio[data-page=home] .lead.lead-home .actions .button.primary {
    min-height: 58px;
    padding-inline: 24px 20px;
    font-size: 17px;
  }
  body.tt-studio[data-page=home] .lead.lead-home > .hero-workbench {
    grid-area: 3 / 5 / 5 / -1;
    align-self: start;
    margin: 0;
  }
}

/* Short laptop screens: give the height back to the drawing and its tabs. */
@media (min-width: 1100px) and (max-height: 820px) {
  body.tt-studio[data-page=home] .lead.lead-home {
    padding-top: 16px;
  }
  body.tt-studio[data-page=home] .lead.lead-home .eyebrow {
    margin-bottom: 10px;
  }
  /* 1280×800: the stage tabs must sit clear of the fold, not on it. */
  body.tt-studio[data-page=home] .lead.lead-home h1 {
    font-size: clamp(44px, 3.9vw, 58px);
    margin-bottom: 16px;
  }
}

}
