/* Home redesign (REQ-111, REQ-113 and the drawing set): blocks 03 to 07 and the sheet title blocks. The hero and blocks 01
   and 02 moved to home-b.css (REQ-126). Colours, durations and easing come from the tokens in design-system.css. */

/* ---------- Stage 5: the remaining blocks restyled, content unchanged (REQ-111) ---------- */

/* 03 / Product configuration: the heading stays beside the sequence it introduces. */
@media (min-width: 901px) {
  #problem .container {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    column-gap: 64px;
    align-items: start;
  }
  #problem .section-heading { grid-row: 1 / span 3; position: sticky; top: calc(var(--header-height) + 32px); }
  #problem .configuration-sequence { margin-top: 0; }
}
#problem .configuration-sequence .problem-item { border-top: 0; }
/* The number sits above the line that joins the steps. */
#problem .configuration-sequence .step-number { position: relative; z-index: 1; background: var(--bc-surface); }
/* Each step lights up as it is read, where the browser supports scroll-driven animation. */
@supports (animation-timeline: view()) {
  #problem .configuration-sequence .step-number {
    animation: sequence-step linear both;
    animation-timeline: view();
    animation-range: entry 60% cover 45%;
  }
  @keyframes sequence-step {
    from { color: var(--bc-muted); border-color: var(--bc-line); background: var(--bc-surface); }
    to { color: var(--bc-surface); border-color: var(--bc-blue); background: var(--bc-blue); }
  }
}

/* 04 / Capabilities as a ledger: one row per capability instead of four boxed cards. */
#solutions .systems-capabilities { grid-template-columns: minmax(0, 1fr); gap: 0; border-bottom: 1px solid var(--bc-line); }
#solutions .systems-capability {
  display: grid;
  grid-template-columns: 64px minmax(0, 1.25fr) minmax(0, 0.75fr);
  column-gap: 32px;
  align-items: start;
  padding: 32px 0;
  border: 0;
  border-top: 1px solid var(--bc-line);
  border-radius: 0;
  background: transparent;
  transition: border-color var(--bc-motion-base) var(--bc-ease-out);
}
#solutions .systems-capability:hover { border-top-color: var(--bc-blue); }
#solutions .capability-number { grid-row: 1 / span 2; margin: 6px 0 0; font-size: 13px; }
#solutions .systems-capability h3 { grid-column: 2; margin-bottom: 12px; max-width: none; }
#solutions .systems-capability > p { grid-column: 2; padding-bottom: 0; }
#solutions .systems-capability ul { grid-column: 3; grid-row: 1 / span 2; margin: 0; padding: 4px 0 0; border-top: 0; }
@media (max-width: 900px) {
  #solutions .systems-capability { grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; padding: 26px 0; }
  #solutions .systems-capability ul { grid-column: 2; grid-row: auto; margin-top: 16px; }
}

/* ---------- REQ-113: remaining home blocks ---------- */

/* 05 / Integration (WEB-HOME-023): the arrows become lines on which data moves both ways while on screen. */
.systems-flow.is-enhanced .systems-arrow {
  position: relative;
  height: 2px;
  font-size: 0;
  background: var(--bc-graphite-active);
}
.flow-packet {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: var(--bc-graphite-accent);
  opacity: 0;
}
.flow-packet--return { background: var(--bc-graphite-return); }
.systems-flow.is-live .flow-packet { animation: flow-forward 1.8s var(--bc-ease-out) infinite; }
.systems-flow.is-live .flow-packet--return { animation-name: flow-return; animation-delay: .9s; }
@keyframes flow-forward {
  0% { left: 0; opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@keyframes flow-return {
  0% { left: 100%; opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { left: 0; opacity: 0; }
}
@media (max-width: 900px) {
  .systems-flow.is-enhanced .systems-arrow { width: 2px; height: 40px; justify-self: center; transform: none; }
  .flow-packet { top: 0; left: 50%; margin: -4px 0 0 -4px; }
  @keyframes flow-forward {
    0% { top: 0; opacity: 0; }
    15%, 85% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
  }
  @keyframes flow-return {
    0% { top: 100%; opacity: 0; }
    15%, 85% { opacity: 1; }
    100% { top: 0; opacity: 0; }
  }
}

/* 06 / BIM services and the configurator services (WEB-HOME-025): rows like the capabilities ledger. */
.bim-service-section .bim-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.bim-service-section .bim-grid article {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) auto;
  column-gap: 32px;
  align-items: start;
  padding: 30px 0;
  border: 0;
  border-top: 1px solid var(--bc-line);
  border-radius: 0;
  background: transparent;
  transition: border-color var(--bc-motion-base) var(--bc-ease-out);
}
.bim-service-section .bim-grid article:hover { border-top-color: var(--bc-blue); }
.bim-service-section .bim-grid article > * { grid-column: 2; }
.bim-service-section .bim-grid article > h3 { grid-column: 1; grid-row: 1 / span 4; min-height: 0; margin: 0; }
.bim-service-section .bim-grid article > p:not(.bim-deliverables) { min-height: 0; }
.bim-service-section .bim-grid article > .text-link { grid-column: 3; grid-row: 1; padding-top: 0; margin-top: 0; }
.disclosure-content .config-services { grid-template-columns: minmax(0, 1fr); gap: 0; }
.disclosure-content .config-service {
  padding: 28px 0;
  border: 0;
  border-top: 1px solid var(--bc-line);
  border-radius: 0;
  background: transparent;
}
@media (max-width: 900px) {
  .bim-service-section .bim-grid article { grid-template-columns: minmax(0, 1fr); padding: 24px 0; }
  .bim-service-section .bim-grid article > *,
  .bim-service-section .bim-grid article > h3,
  .bim-service-section .bim-grid article > .text-link { grid-column: 1; grid-row: auto; }
  .bim-service-section .bim-grid article > h3 { margin-bottom: 12px; }
}

/* ---------- REQ-115 / Drawing set: sheet title blocks (WEB-VIS-011, WEB-HOME-026, WEB-HOME-027) ---------- */
/* Each section closes its heading with a title block, like a sheet of a drawing set. It sits in the page flow,
   never over a drawing (REQ-028). */
.sheet-block {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  margin-top: 24px;
  border: 1px solid var(--bc-line);
  font: 11px/1.5 var(--bc-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bc-muted);
  background: var(--bc-surface);
}
.sheet-block > span { padding: 8px 12px; border-left: 1px solid var(--bc-line); }
.sheet-block > span:first-child { border-left: 0; }
.sheet-code { font-weight: 600; color: var(--bc-ink); }
.sheet-title { color: var(--bc-ink); }
.sheet-status { color: var(--bc-blue); }
.sheet-figures {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--bc-line);
}
.sheet-figures > div { padding: 8px 12px; border-left: 1px solid var(--bc-line); }
.sheet-figures > div:nth-child(3n + 1) { border-left: 0; }
.sheet-figures > div:nth-child(n + 4) { border-top: 1px solid var(--bc-line); }
.sheet-figures > div:first-child { border-left: 0; }
.sheet-figures dt { font-size: 10px; }
.sheet-figures dd { margin: 2px 0 0; font: 500 13px/1.4 var(--bc-font); letter-spacing: 0; text-transform: none; color: var(--bc-ink); }

/* FIG. 01: the title block is the figure's own, under its caption, and its title is the central message. */
.system-figure .sheet-block { margin-top: 16px; background: transparent; }
.system-figure .sheet-title { text-transform: none; letter-spacing: 0; font: 500 13px/1.4 var(--bc-font); }

.closing-line {
  margin: 56px 0 0;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.25;
  font-weight: 500;
  color: var(--bc-ink);
}

@media (max-width: 600px) {
  .sheet-block { grid-template-columns: auto minmax(0, 1fr); }
  .sheet-block > .sheet-scale { border-left: 0; border-top: 1px solid var(--bc-line); }
  .sheet-block > .sheet-status { border-top: 1px solid var(--bc-line); }
  .sheet-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-figures > div:nth-child(n) { border-left: 1px solid var(--bc-line); border-top: 0; }
  .sheet-figures > div:nth-child(odd) { border-left: 0; }
  .sheet-figures > div:nth-child(n + 3) { border-top: 1px solid var(--bc-line); }
}
