/* One continuous stage: the page and the mechanism share the viewport. */
html:has(.agrobot-experience) { scroll-behavior: auto; scrollbar-color: #465256 #0d1214; }
.agrobot-experience {
  --stage: #0d1214;
  --stage-ink: #e6ebe9;
  --stage-muted: #aab6b3;
  --stage-faint: #8a979e;
  --stage-rule: #2b3639;
  --stage-hover: #1b2427;
  --stage-live: #5b9bff;
  --stage-pad: clamp(24px, 4.5vw, 80px);
  min-width: 300px;
  background: var(--stage);
  color: var(--stage-ink);
  color-scheme: dark;
}
.agrobot-experience ::selection { color: var(--stage); background: var(--stage-ink); }
.experience-story { position: relative; height: 600vh; height: 600svh; }
.experience-stage { position: sticky; top: 0; width: 100%; height: 100vh; height: 100svh; overflow: hidden; background: var(--stage); isolation: isolate; }
#experience-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: pan-y; outline-offset: -6px; }
.experience-header { position: absolute; z-index: 3; inset: 0 0 auto; height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 var(--stage-pad); pointer-events: none; }
.experience-header a, .experience-header button { pointer-events: auto; }
.experience-identity { display: flex; align-items: center; gap: 24px; min-width: 0; }
.experience-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 600 17px/1 var(--f-cond); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.experience-brand-mark { display: inline-grid; place-items: center; width: 23px; height: 23px; background: var(--stage-ink); color: var(--stage); font-size: 16px; font-weight: 700; }
.brand-detail { color: var(--stage-muted); font-weight: 400; }
.experience-product { border-left: 1px solid var(--stage-rule); padding-left: 24px; color: var(--stage-muted); font: 500 17px/1 var(--f-cond); }
.agrobot-experience svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.motion-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--stage-muted); font: 400 13px/1.2 var(--f-body); cursor: pointer; }
.motion-toggle svg { width: 17px; height: 17px; }
.motion-toggle .icon-play { display: none; }
.motion-toggle[aria-pressed="true"] .icon-pause { display: none; }
.motion-toggle[aria-pressed="true"] .icon-play { display: initial; }
.motion-toggle:hover:not(:disabled), .experience-brand:hover { color: #ffffff; }
.chapter-copy { --copy-opacity: 1; --copy-shift: 0px; position: absolute; z-index: 2; left: var(--stage-pad); top: 46%; width: 29%; max-width: 440px; opacity: var(--copy-opacity); transform: translateY(calc(-50% + var(--copy-shift))); pointer-events: none; }
#chapter-title { margin: 0; font: 600 clamp(58px, 5.75vw, 92px)/.98 var(--f-cond); letter-spacing: -.025em; text-wrap: balance; white-space: pre-line; }
#chapter-description { margin: 26px 0 0; max-width: 31ch; color: var(--stage-muted); font-size: clamp(15px, 1.2vw, 18px); line-height: 1.55; text-wrap: pretty; }
.scroll-next { display: inline-flex; align-items: center; gap: 22px; min-height: 44px; margin: 25px 0 0; padding: 0; border: 0; background: transparent; color: var(--stage-ink); font: 400 13px/1 var(--f-body); cursor: pointer; pointer-events: auto; }
.scroll-next:hover:not(:disabled) { color: var(--stage-live); }
.scroll-next svg { width: 18px; height: 18px; }
.story-controls { position: absolute; z-index: 3; left: var(--stage-pad); right: var(--stage-pad); bottom: 18px; outline-offset: 8px; }
.story-detail { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-bottom: 13px; color: var(--stage-faint); font-size: 12px; line-height: 1.4; }
.story-detail p { margin: 0; }
#phase-label { color: var(--stage-muted); }
.story-progress-track { height: 1px; background: var(--stage-rule); overflow: hidden; }
#story-progress { width: 100%; height: 100%; background: var(--stage-ink); transform: scaleX(var(--progress, 0)); transform-origin: left; }
.chapter-navigation { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chapter-navigation button { min-height: 52px; padding: 12px 0; border: 0; background: transparent; color: var(--stage-faint); font: 500 16px/1.2 var(--f-cond); text-align: left; cursor: pointer; }
.chapter-navigation button:last-child { text-align: right; }
.chapter-navigation button[aria-pressed="true"], .chapter-navigation button:hover:not(:disabled) { color: var(--stage-ink); }
.experience-status { position: absolute; z-index: 4; left: 68%; top: 50%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; width: min(340px, 35vw); padding: 28px 16px; text-align: center; transform: translate(-50%, -50%); background: var(--stage); }
.experience-status p, .experience-status h2 { margin: 0; font: 500 26px/1.2 var(--f-cond); }
.experience-status progress { width: 180px; max-width: 100%; height: 3px; accent-color: var(--stage-live); }
.experience-status span { color: var(--stage-muted); font-size: 13px; }
.experience-error p { max-width: 34ch; color: var(--stage-muted); font: 400 15px/1.5 var(--f-body); }
.experience-error a { display: inline-flex; align-items: center; min-height: 44px; color: var(--stage-muted); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.experience-error a:hover { color: var(--stage-ink); }
.retry-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--stage-rule); border-radius: 2px; background: transparent; color: var(--stage-ink); cursor: pointer; font: 500 14px/1 var(--f-body); }
.retry-button:hover { background: var(--stage-hover); }
.experience-skip { position: fixed; z-index: 20; top: 8px; left: 16px; padding: 10px 16px; transform: translateY(-150%); color: var(--stage); background: var(--stage-ink); }
.experience-skip:focus { transform: none; }
.experience-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.agrobot-experience [hidden] { display: none !important; }
.agrobot-experience button:disabled { opacity: .4; cursor: wait; }
.agrobot-experience :focus-visible { outline: 2px solid var(--stage-live); outline-offset: 5px; }
.experience-noscript { max-width: 640px; padding: 0 var(--stage-pad) 48px; color: var(--stage-ink); }
.experience-noscript a { display: inline-flex; align-items: center; min-height: 44px; margin-right: 20px; text-decoration: underline; text-underline-offset: 4px; }
.embedded .experience-header { display: none; }
.story-modes { display: flex; gap: 18px; pointer-events: auto; }
.story-modes button { min-height:44px; padding:0; border:0; border-bottom:1px solid transparent; background:transparent; color:var(--stage-muted); font:500 15px/1.2 var(--f-cond); cursor:pointer; }
.story-modes button[aria-pressed="true"] { border-bottom-color:var(--stage-live); color:var(--stage-ink); }
.story-modes button:hover { color:#fff; }
.play-flow { display:inline-flex; align-items:center; gap:8px; margin:12px 0 0 20px; padding:0; min-height:44px; background:transparent; border:0; color:var(--stage-live); font:500 13px/1 var(--f-body); cursor:pointer; pointer-events:auto; }
.play-flow svg { width:15px; height:15px; }
.play-flow[aria-pressed="true"] svg { fill:currentColor; }
#step-count { font-variant-numeric:tabular-nums; color:var(--stage-faint); }
[data-story="vision"] .chapter-navigation { display:flex; gap:22px; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; scrollbar-color:var(--stage-rule) transparent; }
[data-story="vision"] .chapter-navigation button { flex:0 0 auto; text-align:left; font-size:15px; min-width:44px; }
[data-story="vision"] .chapter-navigation button[aria-pressed="true"] { color:var(--stage-live); }
[data-story="vision"] #chapter-title { font-size:clamp(46px,4.5vw,72px); }
[data-vision-step="damage"] #experience-canvas,[data-vision-step="disease"] #experience-canvas { opacity:.14; }
[data-vision-step="row-analysis"] #experience-canvas,[data-vision-step="sync"] #experience-canvas { opacity:.12; }
[data-vision-step="row-map"] #experience-canvas { opacity:0; }

@media (max-width: 1100px) and (min-width: 741px) {
  .experience-header { height: 76px; }
  .experience-identity { gap: 18px; }
  .experience-product { padding-left: 18px; }
  .brand-detail { display: none; }
  .chapter-copy { width: 31%; }
  #chapter-title { font-size: clamp(49px, 5.75vw, 64px); }
  #chapter-description { font-size: 15px; margin-top: 22px; }
}
@media (max-width: 740px) {
  .agrobot-experience { --stage-pad: 22px; }
  .experience-header { height: 64px; gap: 12px; }
  .experience-header { height:110px; align-items:flex-start; padding-top:17px; flex-wrap:wrap; }
  .experience-identity { min-height:30px; }
  .story-modes { position:absolute; top:61px; left:var(--stage-pad); right:var(--stage-pad); gap:24px; }
  .story-modes button { min-height:38px; font-size:14px; }
  .motion-toggle { min-height:30px; }
  .experience-brand { font-size: 15px; gap: 8px; }
  .experience-brand-mark { width: 21px; height: 21px; font-size: 14px; }
  .brand-detail { display: none; }
  .experience-identity { gap: 12px; }
  .experience-product { padding-left: 12px; font-size: 15px; }
  .motion-toggle { gap: 5px; font-size: 12px; }
  .motion-toggle svg { width: 15px; height: 15px; }
  .chapter-copy { left: var(--stage-pad); right: var(--stage-pad); top: 123px; width: auto; max-width: 450px; transform: translateY(var(--copy-shift)); }
  #chapter-title { font-size: clamp(43px, 11.4vw, 65px); max-width: 16ch; }
  #chapter-description { margin-top: 15px; max-width: 35ch; font-size: 14px; line-height: 1.45; }
  .scroll-next { margin-top: 12px; gap: 15px; font-size: 12px; }
  .play-flow { font-size:12px; margin-top:12px; }
  [data-story="vision"] #chapter-title { font-size:clamp(36px,9.8vw,48px); }
  [data-story="vision"] #chapter-description { font-size:13px; max-width:38ch; margin-top:12px; }
  [data-story="vision"] .story-detail { font-size:11px; }
  [data-story="vision"] .chapter-navigation { gap:22px; }
  .scroll-next svg { width: 16px; height: 16px; }
  .story-controls { bottom: 12px; }
  .story-detail { padding-bottom: 10px; gap: 12px; font-size: 12px; }
  .motion-note { max-width: 17ch; text-align: right; }
  #phase-label { max-width: 20ch; }
  .chapter-navigation button { min-height: 46px; font-size: 15px; }
  .experience-status { left: 50%; top: 61%; width: min(340px, calc(100% - 44px)); padding: 20px; }
  .experience-status p, .experience-status h2 { font-size: 23px; }
  .experience-status span { font-size: 12px; }
  .experience-error { gap: 10px; }
  .experience-error p { font: 400 13px/1.4 var(--f-body); }
}
@media (max-width: 370px) {
  .agrobot-experience { --stage-pad: 16px; }
  .experience-product { display: none; }
  #chapter-title { font-size: 42px; }
  #chapter-description { font-size: 13px; }
  .chapter-navigation button { font-size: 14px; }
}
@media (max-height: 700px) and (max-width: 740px) {
  .chapter-copy { top: 115px; }
  #chapter-title { font-size: clamp(37px, 10vw, 48px); }
  #chapter-description { margin-top: 10px; font-size: 13px; }
  .scroll-next { margin-top: 4px; }
  .story-controls { bottom: 5px; }
  .story-detail { padding-bottom: 6px; }
}
@media (max-height: 560px) and (min-width: 600px) {
  .experience-header { height: 60px; }
  .chapter-copy { top: 45%; width: 33%; max-width: 370px; transform: translateY(calc(-50% + var(--copy-shift))); }
  #chapter-title { font-size: clamp(36px, 5vw, 52px); }
  #chapter-description { margin-top: 12px; font-size: 13px; }
  .scroll-next { margin-top: 4px; }
  .story-controls { bottom: 5px; }
  .story-detail { padding-bottom: 5px; }
  .chapter-navigation button { min-height: 44px; padding: 10px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.agrobot-experience) { scroll-behavior: auto; }
  .chapter-copy { opacity: 1; }
  .agrobot-experience *, .agrobot-experience *::before, .agrobot-experience *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* The camera may pass close to pale metal and the gutter. Neutral scrims keep
   interface text legible while the mechanism stays exposed at the focal point. */
.experience-stage::after { content: ""; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(90deg, #0d1214 0%, rgba(13,18,20,.97) 29%, rgba(13,18,20,0) 52%), linear-gradient(0deg, #0d1214 0px, #0d1214 110px, rgba(13,18,20,0) 180px, rgba(13,18,20,0) calc(100% - 150px), #0d1214 calc(100% - 88px), #0d1214 100%); }
@media (max-width: 740px) {
  .experience-stage::after { background: linear-gradient(180deg, #0d1214 0px, #0d1214 290px, rgba(13,18,20,0) 360px, rgba(13,18,20,0) calc(100% - 170px), #0d1214 calc(100% - 110px), #0d1214 100%); }
}
@media (max-height: 700px) and (max-width: 740px) {
  .experience-stage::after { background: linear-gradient(180deg, #0d1214 0px, #0d1214 255px, rgba(13,18,20,0) 305px, rgba(13,18,20,0) calc(100% - 150px), #0d1214 calc(100% - 100px), #0d1214 100%); }
}
@media (max-height: 560px) and (min-width: 600px) {
  .experience-stage::after { background: linear-gradient(90deg, #0d1214 0%, rgba(13,18,20,.97) 32%, rgba(13,18,20,0) 58%), linear-gradient(0deg, #0d1214 0px, #0d1214 95px, rgba(13,18,20,0) 140px, rgba(13,18,20,0) 70%, #0d1214 calc(100% - 60px), #0d1214 100%); }
}
