/* Autonomyware Solutions: Mechanical Engineering only. Loaded after solutions.css on /solutions/mechanical-engineering.
   Shared tokens, frames and blocks live in solutions.css; this file holds what is this page's alone.

   Character: an engineering drawing on the site's ground. Everything here is line work in the page's steel-blue
   tint (--sol-tint for lines, --sol-tint-ink for text), on the theme's own surfaces, so it follows light and dark
   by itself: a drawing-sheet border with zone ticks behind the hero, crop brackets and centre lines around the
   hero window, the spec chips as a title block, item balloons for the build steps, and the build loop drawn as a
   flange with its pitch circle. No new colours, and teal stays the only interactive colour. */

/* ---- Hero motif: the drawing sheet. A border ruled 12px in from the edges, zone ticks every 160px (four cells
   of the site's 40px grid) hanging from it, and the tint's wash behind the hero window. The shared hero mask
   fades it out before the first section. ---- */
.sol-theme-mechanical-engineering {
  --mech-rule: var(--sol-tint-line);
  --mech-cl: color-mix(in srgb, var(--sol-tint) 45%, transparent);        /* centre lines */
  --mech-dashdot: var(--mech-cl) 0 14px, transparent 14px 18px, var(--mech-cl) 18px 20px, transparent 20px 24px;
  --mech-sides:
    linear-gradient(var(--mech-rule), var(--mech-rule)) 12px 12px / 1px 100% no-repeat,
    linear-gradient(var(--mech-rule), var(--mech-rule)) calc(100% - 12px) 12px / 1px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--mech-rule) 0 1px, transparent 1px 160px) 12px 12px / 10px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--mech-rule) 0 1px, transparent 1px 160px) calc(100% - 12px) 12px / 10px 100% no-repeat;
  --sol-motif:
    radial-gradient(55% 60% at 78% 42%, var(--sol-tint-wash), transparent 70%),
    linear-gradient(var(--mech-rule), var(--mech-rule)) 12px 12px / calc(100% - 24px) 1px no-repeat,
    repeating-linear-gradient(90deg, var(--mech-rule) 0 1px, transparent 1px 160px) 12px 12px / calc(100% - 24px) 10px no-repeat,
    var(--mech-sides);
}

/* The hero window, framed as the view on a drawing: crop brackets just off its four corners, and its two centre
   lines (dash-dot) running out past the frame. Drawn behind the window, so only what lies outside it shows. */
.sol-theme-mechanical-engineering .sol-hero-media { --mech-m: 30px; --mech-o: 18px; --mech-leg: 14px; }
.sol-theme-mechanical-engineering .sol-hero-media::after {
  content: ""; position: absolute; inset: calc(-1 * var(--mech-m)); z-index: -1; pointer-events: none;
  --k: var(--sol-tint);
  background:
    linear-gradient(var(--k), var(--k)) var(--mech-o) var(--mech-o) / var(--mech-leg) 1px no-repeat,
    linear-gradient(var(--k), var(--k)) var(--mech-o) var(--mech-o) / 1px var(--mech-leg) no-repeat,
    linear-gradient(var(--k), var(--k)) calc(100% - var(--mech-o)) var(--mech-o) / var(--mech-leg) 1px no-repeat,
    linear-gradient(var(--k), var(--k)) calc(100% - var(--mech-o)) var(--mech-o) / 1px var(--mech-leg) no-repeat,
    linear-gradient(var(--k), var(--k)) var(--mech-o) calc(100% - var(--mech-o)) / var(--mech-leg) 1px no-repeat,
    linear-gradient(var(--k), var(--k)) var(--mech-o) calc(100% - var(--mech-o)) / 1px var(--mech-leg) no-repeat,
    linear-gradient(var(--k), var(--k)) calc(100% - var(--mech-o)) calc(100% - var(--mech-o)) / var(--mech-leg) 1px no-repeat,
    linear-gradient(var(--k), var(--k)) calc(100% - var(--mech-o)) calc(100% - var(--mech-o)) / 1px var(--mech-leg) no-repeat,
    repeating-linear-gradient(90deg, var(--mech-dashdot)) 0 50% / 100% 1px no-repeat,
    repeating-linear-gradient(180deg, var(--mech-dashdot)) 50% 0 / 1px 100% no-repeat;
}

/* The spec chips as a drawing's title block: one ruled strip of cells, a heavier tint rule at its left edge. */
.sol-theme-mechanical-engineering .sol-chips {
  display: flex; flex-wrap: wrap; gap: 0; width: fit-content; max-width: 100%; overflow: hidden;
  border: 1px solid var(--line-strong); border-left: 2px solid var(--sol-tint); border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--raised) 80%, transparent);
}
.sol-theme-mechanical-engineering .sol-chips li {
  flex: 1 1 auto; margin: -1px 0 0 -1px; padding: 8px 12px; border: 0; border-radius: 0; background: none;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line); color: var(--ink-soft); text-align: center;
}

/* ---- The build loop ---- */
.sol-loop { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.sol-loop-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.sol-loop-steps li { display: grid; grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.sol-loop-steps b { display: flex; align-items: center; gap: 10px; font-size: 15px; }
/* item balloons, as on an assembly drawing; the review step is the filled one, as in the figure */
.sol-loop-steps b i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-style: normal; font-family: var(--font-mono); font-size: 11px; font-weight: 600; border: 1px solid var(--sol-tint); color: var(--sol-tint-ink); }
.sol-loop-steps li.is-review b i { border-color: var(--sol-tint-ink); background: var(--sol-tint-ink); color: var(--paper); }
.sol-loop-steps span { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }

/* The figure: a drawing plate on the theme's raised surface, ruled with the tint's fine graph grid, with the
   site's drafting corner marks (in the tint) at its top-left and bottom-right. */
.sol-loop-fig {
  position: relative; margin: 0; padding: clamp(10px, 2vw, 24px); border: 1px solid var(--line); border-radius: var(--radius);
  background:
    linear-gradient(var(--sol-tint-wash) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(90deg, var(--sol-tint-wash) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--raised);
}
.sol-loop-fig::before, .sol-loop-fig::after, .sol-theme-mechanical-engineering .sol-boards-stage::before, .sol-theme-mechanical-engineering .sol-boards-stage::after {
  content: ""; position: absolute; z-index: 1; width: 20px; height: 20px; pointer-events: none;
}
.sol-loop-fig::before { left: -1px; top: -1px; }
.sol-loop-fig::after { right: -1px; bottom: -1px; }
/* the stage clips to its frame, so its marks sit just inside it */
.sol-theme-mechanical-engineering .sol-boards-stage::before { left: 0; top: 0; }
.sol-theme-mechanical-engineering .sol-boards-stage::after { right: 0; bottom: 0; }
.sol-loop-fig::before, .sol-theme-mechanical-engineering .sol-boards-stage::before { border-left: 2px solid var(--sol-tint); border-top: 2px solid var(--sol-tint); border-radius: var(--radius) 0 0 0; }
.sol-loop-fig::after, .sol-theme-mechanical-engineering .sol-boards-stage::after { border-right: 2px solid var(--sol-tint); border-bottom: 2px solid var(--sol-tint); border-radius: 0 0 var(--radius) 0; }
.sol-loop-fig svg { display: block; width: 100%; height: auto; }
/* line weights after drafting practice: object lines heavy (ink), construction and centre lines thin (tint) */
.sol-loop-rim { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.sol-loop-cl { fill: none; stroke: var(--sol-tint); stroke-opacity: .6; stroke-width: 1; stroke-dasharray: 14 3 2 3; }
.sol-loop-arc { fill: none; stroke: var(--sol-tint-ink); stroke-width: 1.6; }
.sol-loop-arc--out { stroke-dasharray: 6 4; }                     /* back to step 1: the next version, a hidden line */
.sol-loop-head { fill: var(--sol-tint-ink); }
.sol-loop-node circle { fill: var(--raised); stroke: var(--ink); stroke-width: 1.6; }
.sol-loop-node text { fill: var(--ink); font: 600 15px var(--font-mono); }
.sol-loop-node.is-review circle { fill: var(--sol-tint-ink); stroke: var(--sol-tint-ink); }
.sol-loop-node.is-review text { fill: var(--paper); }
.sol-loop-centre-k { fill: var(--sol-tint-ink); font: 500 9px var(--font-mono); letter-spacing: .08em; }
.sol-loop-centre { fill: var(--ink); font: 600 13px var(--font-main); }

/* ---- Showroom: the 3D stage carries the same drafting corner marks as the loop's plate. ---- */
.sol-theme-mechanical-engineering .sol-boards-stage { position: relative; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .sol-loop { grid-template-columns: minmax(0, 1fr); }
  .sol-loop-steps li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  /* one column: the hero window spans the shell, so the sheet keeps only its top rule and the brackets close in */
  .sol-theme-mechanical-engineering { --mech-sides: linear-gradient(transparent, transparent); }
  .sol-theme-mechanical-engineering .sol-hero-media { --mech-m: 22px; --mech-o: 12px; --mech-leg: 12px; }
}
@media (max-width: 560px) {
  /* the brackets stay inside the 16px phone gutter */
  .sol-theme-mechanical-engineering .sol-hero-media { --mech-m: 14px; --mech-o: 6px; --mech-leg: 10px; }
  /* the drawing scales down to the phone; its lettering does not shrink with it */
  .sol-loop-centre-k { font-size: 11px; letter-spacing: .04em; }
  .sol-loop-centre { font-size: 14.5px; }
}
