/* Home hero layout. Loaded after workspace.css and dynamics.css, so the rules here are the final word on the hero. */
.preview-hero{position:relative;isolation:isolate}
/* Orbits stay behind the visual column and fade out before the headline and buttons. */
.preview-hero>.hero-orbits{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;opacity:.5;
  -webkit-mask-image:linear-gradient(to bottom,transparent,#000 9%,#000 91%,transparent),linear-gradient(to right,transparent 30%,#000 55%);
  -webkit-mask-composite:source-in;
  mask-image:linear-gradient(to bottom,transparent,#000 9%,#000 91%,transparent),linear-gradient(to right,transparent 30%,#000 55%);
  mask-composite:intersect}
html[data-theme=light] .preview-hero>.hero-orbits{opacity:.35}
.preview-hero>.preview-copy,.preview-hero>.assembly{position:relative;z-index:1}

/* Caption, model, flow and spreadsheet sit in their own grid cells instead of being stacked absolutely. */
.preview-hero .assembly{height:auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,400px);grid-template-areas:"caption caption" "model model" "flow sheet";align-items:center;column-gap:24px;row-gap:12px}
.assembly .model-caption{position:static;grid-area:caption}
.assembly #hero-model{position:static;grid-area:model;width:100%;height:330px}
.assembly .assembly-flow{position:static;grid-area:flow}
.assembly .excel-preview{position:static;grid-area:sheet;width:100%;max-width:none}

/* The global table min-width made the card scroll sideways and hid the count and mass columns. */
.excel-preview table{min-width:0;font-size:13px}
.excel-preview td,.excel-preview th{padding:8px 10px}
.excel-preview td:not(:first-child),.excel-preview th:not(:first-child){text-align:right}

/* Swatches tie each table row to its colour in the hero model (HERO_PALETTE in app.js). */
.excel-preview tr[data-hero-layer] td:first-child::before{content:"";display:inline-block;width:9px;height:9px;margin-right:8px;border-radius:2px;vertical-align:1px;background:var(--swatch)}
tr[data-hero-layer=lower-x]{--swatch:#7d7064}
tr[data-hero-layer=lower-y]{--swatch:#d8c8b2}
tr[data-hero-layer=lower-extra]{--swatch:#ff4912}
html[data-theme=light] tr[data-hero-layer=lower-x]{--swatch:#b3a596}
html[data-theme=light] tr[data-hero-layer=lower-y]{--swatch:#4d4239}
html[data-theme=light] tr[data-hero-layer=lower-extra]{--swatch:#ff4003}

@media(max-width:900px){
  .preview-hero .assembly{grid-template-columns:minmax(0,1fr);grid-template-areas:"caption" "model" "flow" "sheet"}
  .assembly #hero-model{height:300px}
  .assembly .assembly-flow{max-width:320px}
}
@media(max-width:760px){
  .preview-hero{grid-template-columns:minmax(0,1fr)}
  /* Keep the line break inside the accent: hiding it glued "точного" and "расчёта" into one word. */
  .preview-copy h1{font-size:clamp(38px,11vw,55px)}
  .preview-copy h1 br:last-child{display:inline}
  .preview-copy .actions{flex-wrap:wrap}
  .preview-hero>.hero-orbits{opacity:.3;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 9%,#000 91%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 9%,#000 91%,transparent)}
  .assembly #hero-model{height:260px}
}
