/* Pending, unsupported, and no-JS states retain the original hero geometry. */
.hero-motion-track {
  display: contents;
}

.hero-motion-canvas {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-motion-track.is-motion-active {
  display: block;
  height: var(--hero-motion-track-height);
  position: relative;
  overflow-anchor: none;
}

.hero-motion-track.is-motion-active > .hero {
  position: sticky;
  top: var(--hero-motion-sticky-top, 0px);
  min-height: 100vh;
  min-height: 100svh;
  overflow-anchor: none;
}

.admin-bar .hero-motion-track.is-motion-active > .hero {
  min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
  min-height: calc(100svh - var(--wp-admin--admin-bar--height, 32px));
}

/* JavaScript removes sticky geometry and releases resources at these changes.
   These rules hide the decorative surface immediately while it does so. */
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .hero-motion-canvas {
    display: none !important;
  }
}

/* Visible only when the head bootstrap opts in. No JavaScript keeps the page open. */
.hero-loader {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: grid;
  place-items: center;
  background: #f4f6ef;
  color: #082b20;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 400ms ease, visibility 400ms;
}
.hero-loader-brand { width: 180px; text-align: center; }
.hero-loader-brand img { width: 144px; height: auto; margin: 0 auto 22px; mix-blend-mode: multiply; }
.hero-loader-brand p { margin: 0 0 28px; font-size: 12px; letter-spacing: .08em; }
.hero-loader-progress { height: 2px; border-radius: 2px; overflow: hidden; background: #dbe2d5; }
.hero-loader-progress span { display: block; height: 100%; background: #246d3d; transform-origin: left; transform: scaleX(var(--hero-load-progress, 0)); transition: transform 180ms ease; }
html.hero-intro-pending { overflow: hidden; }
.hero-intro-pending .hero-loader { opacity: 1; visibility: visible; pointer-events: auto; }
.hero-intro-pending .site-header,
.hero-intro-pending #main,
.hero-intro-pending #contacts,
.hero-intro-pending .skip-link { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .hero-loader, .hero-loader-progress span { transition: none; }
}
.hero-loader-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Temporary comparison, restricted to preview hosts by the PHP theme. */
.hero-scene-picker { position: absolute; top: 126px; left: 0; right: 0; z-index: 2; }
.hero-scene-caption { display: flex; align-items: baseline; gap: 16px; margin-bottom: 10px; color: #fff; text-shadow: 0 1px 8px #082b20; font-size: 12px; font-weight: 600; }
.hero-scene-caption small { font-size: 10px; font-weight: 400; opacity: .8; }
.hero-scene-options { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid #fff6; border-radius: 30px; background: #f4f6eff2; box-shadow: 0 8px 28px #082b2020; }
.hero-scene-option { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 18px; border-radius: 24px; color: #082b20; font-size: 12px; font-weight: 600; line-height: 1.2; transition: background .2s; }
.hero-scene-option:hover { background: #dfe7d9; }
.hero-scene-option[aria-current] { background: #efff41; }
.hero-scene-option:focus-visible { outline: 2px solid #082b20; outline-offset: -3px; }
.hero[data-hero-scene="rows"] .hero-shade,
.hero[data-hero-scene="harvest"] .hero-shade { background: linear-gradient(90deg,rgba(4,35,21,.64),rgba(4,35,21,.28) 55%,rgba(4,35,21,.14)),linear-gradient(0deg,rgba(4,34,18,.36),transparent 40%); }
@media (max-width: 900px) {
  .hero-scene-picker { top: 110px; }
  .hero-comparison .hero-inner { padding-top: 235px; }
}
@media (max-width: 680px) {
  .hero-scene-picker { top: 112px; }
  .hero-scene-caption { justify-content: space-between; gap: 8px; }
  .hero-scene-options { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; border-radius: 18px; }
  .hero-scene-option { min-height: 44px; padding: 8px 7px; font-size: 11px; text-align: center; border-radius: 13px; }
  .hero-comparison { height: 865px; min-height: 865px; }
  .hero-comparison .hero-inner { padding-top: 232px; }
  .hero[data-hero-scene="harvest"] .hero-image { object-position: 32% 55%; }
}
