/* Vacuum Gripper: "Inside the smart gripper" scroll section (from the Squarespace code block, Nov 2026).
   The frame stays pinned while the page scrolls through .amg-track; gripper-scrolly.js turns the
   scroll position into the animation. The stage is a fixed 1920 x 1080 canvas scaled into the frame,
   below the header. Colours and fonts from tokens.css. */

#amg-scrolly {
  --amg-navy: var(--site-navy); --amg-ink: var(--site-white); --amg-soft: var(--ink-soft-on-navy); --amg-line: var(--line); --amg-dot: var(--dot-grid);
  --amg-accent: var(--site-accent); --amg-scan: var(--app-filtration); --amg-page: var(--site-white); --amg-page-ink: var(--site-navy); --amg-page-soft: var(--ink-soft-on-white);
  --amg-display: var(--font-display); --amg-text: var(--font-text);
  position: relative; background: var(--amg-page);
  overflow-anchor: none;   /* the script keeps the scroll on its step when the screen height changes */
}
#amg-scrolly *, #amg-scrolly *::before, #amg-scrolly *::after { box-sizing: border-box; }
#amg-scrolly p { margin: 0; }
#amg-scrolly img, #amg-scrolly video { max-width: none; }
/* First section of the page: the frame itself runs behind the transparent header (no extra top border) */
main > #amg-scrolly > .amg-track { border-top: 0; }
#amg-scrolly .amg-track { position: relative; height: 780vh; }
#amg-scrolly .amg-sticky { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
#amg-scrolly .amg-frame { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background-color: var(--amg-navy); background-image: radial-gradient(circle, var(--amg-dot) 1.6px, transparent 2.2px); }
#amg-scrolly .amg-stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; color: var(--amg-ink); }
#amg-scrolly .amg-cam { position: absolute; left: 0; top: 0; width: 2000px; height: 1200px; transform-origin: 0 0; }
#amg-scrolly .amg-cam img, #amg-scrolly .amg-cam svg { position: absolute; left: 0; top: 0; width: 2000px; height: 1200px; display: block; }
#amg-scrolly .amg-ghost { filter: grayscale(1) brightness(3.2) contrast(.55); opacity: .3; }
#amg-scrolly .amg-photo { position: absolute; left: 0; top: 0; width: 2576px; height: 1717px; transform-origin: 0 0; display: block; opacity: 0; }
#amg-scrolly .amg-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#amg-scrolly .amg-lead { fill: none; stroke: var(--amg-line); stroke-width: 2; }
#amg-scrolly .amg-dotm { fill: var(--amg-ink); }
#amg-scrolly .amg-vox { fill: none; stroke: var(--amg-accent); stroke-width: 3; vector-effect: non-scaling-stroke; }
#amg-scrolly .amg-tick { fill: none; stroke: var(--amg-line); stroke-width: 2; vector-effect: non-scaling-stroke; }
#amg-scrolly .amg-scan { stroke: var(--amg-scan); stroke-width: 3; vector-effect: non-scaling-stroke; }
#amg-scrolly .amg-label { position: absolute; width: 600px; display: flex; flex-direction: column; gap: 6px; opacity: 0; }
#amg-scrolly .amg-label .t { font-family: var(--amg-display); font-weight: 700; font-size: 42px; line-height: 1.15; letter-spacing: -0.01em; }
#amg-scrolly .amg-label .b { font-family: var(--amg-text); font-size: 34px; line-height: 1.22; color: var(--amg-soft); }
#amg-scrolly .amg-label .hot { color: var(--amg-accent); }
/* Page-text layer over the animation, below the header, at the content edge (like the logo).
   .amg-intro: large heading left of the gripper at the start (size capped by the width, so it never
   reaches the gripper). .amg-head: the same text as one running heading line in the top-left, shown
   for the rest of the section. The script cross-fades the two on the first scroll. */
#amg-scrolly .amg-overlay { position: absolute; inset: var(--header-height) 0 0; pointer-events: none; color: var(--amg-ink); }
#amg-scrolly .amg-intro, #amg-scrolly .amg-head { position: absolute; left: max(var(--gutter), 50% - 700px); top: 0; font-family: var(--amg-display); font-weight: 700; letter-spacing: var(--heading-tracking); }
#amg-scrolly .amg-intro { max-width: 8.5em; font-size: min(var(--fs-h1), 4.4vw); }
#amg-scrolly .amg-intro .t { line-height: 1.1; }
#amg-scrolly .amg-intro .b { margin-top: 0.45em; font-size: 0.5em; line-height: 1.2; color: var(--amg-accent); }
#amg-scrolly .amg-head { top: clamp(12px, 3vh, 36px); right: max(var(--gutter), 50% - 700px); margin: 0; font-size: var(--fs-h2); line-height: 1.2; opacity: 0; }
#amg-scrolly .amg-head .b { display: block; color: var(--amg-accent); }
#amg-scrolly.amg-compact .amg-intro, #amg-scrolly.amg-compact .amg-head { display: none; }
#amg-scrolly .amg-cap.amg-cap-intro { margin-bottom: 12px; }
#amg-scrolly .amg-cap.amg-cap-intro .t { font-size: 21px; letter-spacing: var(--heading-tracking); }
#amg-scrolly .amg-cap.amg-cap-intro .b { font-family: var(--amg-display); font-weight: 700; font-size: 17px; color: var(--amg-accent); }
#amg-scrolly .amg-chip { position: absolute; left: max(var(--gutter), 50% - 700px); bottom: 48px; margin: 0; padding: 10px 18px; background: var(--amg-navy); color: var(--amg-ink); font-family: var(--amg-display); font-weight: 700; font-size: var(--fs-large); letter-spacing: var(--heading-tracking); opacity: 0; }
/* Demonstrator video below the stage: shown (first frame) under the prototype photo as that shrinks onto
   the module, then playing full-frame; at the end the script fits it into .amg-settle-slot */
#amg-scrolly .amg-video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; visibility: hidden; }   /* hit-testable, so the header (menu.js) takes its colour */
/* End state, matching the page below: the headline again across the top, taglines left, video slot
   right (16:9), white page behind. --amg-hl: headline size, also capped by the screen height; the slot
   narrows on short screens so headline and video fit below the header */
#amg-scrolly .amg-settle { --amg-hl: min(var(--fs-h1), 4.4vw, 6.4svh); position: absolute; inset: var(--header-height) 0 0; display: flex; align-items: center; pointer-events: none; opacity: 0; visibility: hidden; }
#amg-scrolly .amg-settle-head { grid-column: 1 / -1; grid-row: 1; margin: 0 0 clamp(20px, 4svh, 48px); font-family: var(--amg-display); font-weight: 700; font-size: var(--amg-hl); line-height: 1.1; letter-spacing: var(--heading-tracking); color: var(--amg-page-ink); }
#amg-scrolly .amg-settle-head span { display: block; }
#amg-scrolly .amg-settle-head .b { color: var(--amg-accent); }
#amg-scrolly .amg-settle-grid { width: min(100% - 2 * var(--gutter), 1400px); margin-inline: auto; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); column-gap: 11px; align-items: center; }
#amg-scrolly .amg-settle-text { grid-column: 1 / 9; grid-row: 2; display: grid; gap: 32px; }
#amg-scrolly .amg-settle-slot { grid-column: 10 / -1; grid-row: 2; justify-self: end; width: min(100%, (100dvh - var(--header-height) - 2.2 * var(--amg-hl) - 48px - 64px) * 16 / 9); aspect-ratio: 16 / 9; }
#amg-scrolly.amg-compact .amg-settle-grid { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
#amg-scrolly.amg-compact .amg-settle { --amg-hl: var(--fs-h2); }
#amg-scrolly.amg-compact .amg-settle-head { grid-column: 1; margin: 0; }
#amg-scrolly.amg-compact .amg-settle-slot { grid-column: 1; grid-row: 2; width: 100%; }
#amg-scrolly.amg-compact .amg-settle-text { grid-column: 1; grid-row: 3; gap: 16px; }
#amg-scrolly.amg-light .amg-frame, #amg-scrolly.amg-light.amg-compact .amg-sticky { background: var(--amg-page); }
/* Step dots on the right: ring = step not shown, filled = current step; click jumps to the step */
#amg-scrolly .amg-dots { position: absolute; right: max(14px, var(--gutter) / 2); top: calc(var(--header-height) + (100% - var(--header-height)) / 2); transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 999px; background: color-mix(in srgb, var(--amg-navy) 55%, transparent); }
#amg-scrolly .amg-dots button { width: 22px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
#amg-scrolly .amg-dots button:focus-visible { outline: 2px solid var(--amg-ink); outline-offset: 2px; }
#amg-scrolly .amg-dots button::before { content: ""; width: 10px; height: 10px; border: 2px solid var(--amg-ink); border-radius: 50%; transition: background-color .2s ease; }
#amg-scrolly .amg-dots button.on::before { background: var(--amg-ink); }
/* Arrows above and below the dots: one step back or on; dimmed at the first step */
#amg-scrolly .amg-dots .amg-step-up::before, #amg-scrolly .amg-dots .amg-step-down::before { width: 8px; height: 8px; border: 0; border-radius: 0; border-left: 2px solid var(--amg-ink); border-top: 2px solid var(--amg-ink); transform: translateY(2px) rotate(45deg); }
#amg-scrolly .amg-dots .amg-step-down::before { transform: translateY(-2px) rotate(225deg); }
#amg-scrolly .amg-dots .amg-step-up.off { opacity: .35; cursor: default; }
/* Phones: the dots as a row at the bottom, inside the card's bottom padding (gripper-scrolly.js keeps
   room for them: DOTSH) and over the photo once the card has faded out */
#amg-scrolly.amg-compact .amg-dots { z-index: 2; top: auto; right: auto; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); flex-direction: row; }
#amg-scrolly.amg-compact .amg-hint { display: none; }
#amg-scrolly .amg-hint { position: absolute; left: 0; right: 0; bottom: 40px; height: 56px; pointer-events: none; }
#amg-scrolly .amg-arrow { position: absolute; left: 50%; top: 0; width: 34px; height: 34px; border-right: 6px solid var(--amg-ink); border-bottom: 6px solid var(--amg-ink); transform: translate(-50%, -6px) rotate(45deg); animation: amg-arrow 1.8s ease-in-out infinite; }
@keyframes amg-arrow { 0%, 100% { transform: translate(-50%, -6px) rotate(45deg); opacity: .65; } 50% { transform: translate(-50%, 8px) rotate(45deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #amg-scrolly .amg-arrow { animation: none; } }
#amg-scrolly .amg-caps { display: none; flex: 0 0 auto; height: 18.5rem; padding: 4px max(var(--gutter), 16px) 16px; }
/* Phones: one dotted canvas for image and captions; captions in a white card */
#amg-scrolly.amg-compact .amg-sticky { background-color: var(--amg-navy); background-image: radial-gradient(circle, var(--amg-dot) 1.6px, transparent 2.2px); }
#amg-scrolly.amg-compact .amg-frame { background: none; }
#amg-scrolly .amg-card { overflow: hidden; padding: 16px 18px; border-radius: var(--radius-lg); background: var(--amg-page); color: var(--amg-page-ink); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); }
/* Lettered markers on the part (phones) and the same letter in the caption */
#amg-scrolly .amg-pin { position: absolute; display: none; align-items: center; justify-content: center; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; background: var(--amg-ink); color: var(--amg-navy); font-family: var(--amg-display); font-weight: 700; font-size: 34px; line-height: 1; box-shadow: 0 0 0 8px rgba(9, 8, 51, 0.45); opacity: 0; }
#amg-scrolly .amg-pin.hot { background: var(--amg-accent); color: var(--amg-ink); }
#amg-scrolly.amg-compact .amg-pin { display: flex; }
#amg-scrolly .amg-cap.has-key { grid-template-columns: 26px 1fr; column-gap: 12px; align-items: start; }
#amg-scrolly .amg-cap.has-key .b { grid-column: 2; }
#amg-scrolly .amg-key { grid-row: span 2; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--amg-page-ink); color: var(--amg-page); font-family: var(--amg-display); font-weight: 700; font-size: 15px; line-height: 1; }
#amg-scrolly .amg-cap .amg-key.hot { background: var(--amg-accent); color: var(--amg-page); }
/* Phones: the card sits over the frame at the bottom, as high as its text (set by the script) */
#amg-scrolly.amg-compact .amg-caps { display: block; position: absolute; z-index: 1; left: max(var(--gutter), 16px); right: max(var(--gutter), 16px); bottom: calc(16px + env(safe-area-inset-bottom)); height: auto; padding: 0; }
#amg-scrolly.amg-compact .amg-label, #amg-scrolly.amg-compact .amg-leads { display: none; }
#amg-scrolly.amg-compact .amg-chip { left: max(var(--gutter), 16px); bottom: calc(72px + env(safe-area-inset-bottom)); padding: 8px 14px; font-size: var(--fs-body); }
#amg-scrolly .amg-cap { margin: 0 0 8px; display: none; }
#amg-scrolly .amg-cap .t { font-family: var(--amg-display); font-weight: 700; font-size: 22px; line-height: 1.2; }
#amg-scrolly .amg-cap .b { margin-top: 2px; font-family: var(--amg-text); font-size: 17px; line-height: 1.35; color: var(--amg-page-soft); }
#amg-scrolly .amg-cap .hot { color: var(--amg-accent); }
#amg-scrolly .amg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Without JavaScript (scripting: none) the animation cannot run: instead of the tall scroll track the
   section shows the heading, the first frame of the robot arm video and the steps as a static block on the navy dot grid */
#amg-scrolly .amg-static { display: none; }
@media (scripting: none) {
  #amg-scrolly .amg-track { height: auto; padding-block: calc(var(--header-height) + var(--space-6)) var(--space-12); background-color: var(--amg-navy); background-image: radial-gradient(circle, var(--amg-dot) 1.6px, transparent 2.2px); background-size: 32px 32px; color: var(--amg-ink); }
  #amg-scrolly .amg-sticky { display: none; }
  #amg-scrolly .amg-sr { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  #amg-scrolly .amg-text h1 { max-width: 18ch; font-size: var(--fs-h1); }
  #amg-scrolly .amg-static { display: block; margin-block: var(--space-6); }
  #amg-scrolly .amg-static img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); }
  #amg-scrolly #amg-steps { max-width: 760px; margin: 0; padding-left: 1.4em; display: grid; gap: var(--space-2); font-size: var(--fs-large); line-height: 1.5; color: var(--amg-soft); }
}
