.hero-story {
  display: grid;
  position: relative;
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.hero-copy-stage {
  display: none;
}

@media (max-width: 63.99rem) {
  .hero-story {
    display: flex;
    flex-direction: column;
    isolation: isolate;
    z-index: 0;
  }

  .hero-story .hero-visual {
    order: -1;
    position: sticky;
    inset-block-start: var(--header-height);
    z-index: 0;
    height: calc(100svh - var(--header-height));
    margin-block-end: calc(var(--header-height) - 100svh);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: visible;
    background: transparent;
    pointer-events: none;
  }

  .hero-story .hero-process {
    width: min(100%, 36rem);
    max-height: min(52svh, calc(100svh - var(--header-height) - 10rem));
  }

  .hero-copy-stage {
    order: -1;
    position: sticky;
    inset-block-start: var(--header-height);
    z-index: 3;
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    align-items: stretch;
    height: calc(100svh - var(--header-height));
    margin-block-end: calc(var(--header-height) - 100svh);
    padding-block: var(--space-6);
    pointer-events: none;
  }

  .hero-live-title,
  .hero-live-support {
    margin: 0;
    transition:
      opacity var(--motion-slow) var(--ease-standard),
      transform var(--motion-slow) var(--ease-standard);
  }

  .hero-live-title {
    align-self: end;
    margin-block-end: var(--space-3);
    font-size: var(--heading-md);
    font-weight: var(--weight-medium);
    line-height: 0.95;
    letter-spacing: -0.035em;
    max-inline-size: 12ch;
    text-wrap: balance;
  }

  .hero-live-slot {
    width: min(100%, 36rem);
    height: var(--hero-slot-h, 12rem);
    margin-inline: auto;
    transition: height var(--motion-slow) var(--ease-standard);
  }

  .hero-live-support {
    align-self: start;
    margin-block-start: var(--space-3);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    line-height: 1.5;
    max-inline-size: min(100%, 28rem);
  }

  .hero-live-title.is-exit {
    opacity: 0;
    transform: translateY(-0.7rem);
  }

  .hero-live-support.is-exit {
    opacity: 0;
    transform: translateY(0.7rem);
  }

  .hero-copy-stage.is-outcome {
    text-align: center;
  }

  .hero-copy-stage.is-outcome .hero-live-title,
  .hero-copy-stage.is-outcome .hero-live-support {
    justify-self: stretch;
    font-size: var(--heading-lg);
    font-weight: var(--weight-medium);
    line-height: 0.95;
    letter-spacing: -0.035em;
    color: var(--color-text);
    max-inline-size: none;
    text-align: center;
  }

  .hero-copy-stage.is-outcome .hero-live-title {
    margin-block-end: 0;
  }

  .hero-copy-stage.is-outcome .hero-live-support {
    margin-block-start: 0;
  }

  .hero-copy-stage.is-outcome .hero-live-slot {
    width: 100%;
    height: 1.75rem;
  }

  .hero-story .hero-step {
    position: relative;
    z-index: 1;
    min-height: calc(100svh - var(--header-height));
    height: calc(100svh - var(--header-height));
    justify-content: space-between;
    padding: var(--space-5) 0;
    background: transparent;
  }

  .hero-story .hero-step h1,
  .hero-story .hero-step h2,
  .hero-story .hero-step .support,
  .hero-story .hero-step .hero-outcome-sub {
    opacity: 0;
  }

  .hero-story .hero-step--outcome {
    justify-content: space-between;
  }

  .hero-story .hero-outcome-slot {
    display: none;
  }
}

.hero-step {
  min-height: calc(100vh - var(--header-height));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-8) 0 var(--space-7);
}

.hero-step h1,
.hero-step h2 {
  font-size: var(--heading-md);
  max-inline-size: 12ch;
}

.hero-step .support {
  margin-block-start: var(--space-4);
  max-inline-size: min(100%, 28rem);
}

.hero-visual {
  padding-inline: 0;
  padding-block-end: var(--space-8);
  pointer-events: none;
  overflow: hidden;
}

.hero-process {
  width: min(100%, 44rem);
  margin-inline: auto;
  height: auto;
  will-change: transform;
}

.examine-stroke {
  stroke: var(--color-accent);
  fill: none;
  stroke-width: var(--line-art-large);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.wheat-line {
  stroke: var(--color-accent);
  stroke-width: var(--line-art-large);
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.wheat-dot {
  fill: var(--color-bg);
  stroke: var(--color-accent);
  opacity: 0;
}

.solution-constellation {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.solution-line {
  fill: none;
  stroke: var(--color-line-muted);
  stroke-width: var(--line-art);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.solution-holder {
  fill: var(--color-line-soft);
  stroke: var(--color-line-muted);
  stroke-width: var(--line-art);
}

.solution-node {
  opacity: 0;
}

.hero-process .solution-icon-art,
.hero-process .solution-icon-art path,
.hero-process .solution-icon-art rect {
  fill: var(--color-line);
  stroke: none;
}

.wheat-line.is-complete {
  animation: wheat-pulse 2.8s var(--ease-standard) infinite;
}

.hero-process.is-idle .node {
  transform-box: fill-box;
  transform-origin: center;
  animation: hero-node-idle 3.8s ease-in-out infinite;
}

.hero-process.is-idle [data-detour]:nth-of-type(2) .node {
  animation-delay: 0.35s;
}

.hero-process.is-idle [data-detour]:nth-of-type(3) .node {
  animation-delay: 0.7s;
}

.hero-process.is-idle [data-detour]:nth-of-type(4) .node {
  animation-delay: 1.05s;
}

.hero-process.is-idle .geo-line {
  stroke-dasharray: 16 20;
  animation: hero-route-idle 16s linear infinite;
}

@keyframes wheat-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes hero-node-idle {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.16);
  }
}

@keyframes hero-route-idle {
  to {
    stroke-dashoffset: -72;
  }
}

.hero-step--outcome {
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-block: 0;
  gap: 0;
}

.hero-step--outcome h2,
.hero-outcome-sub {
  font-size: var(--heading-lg);
  font-weight: var(--weight-medium);
  max-inline-size: none;
  color: var(--color-text);
}

.hero-outcome-slot {
  flex: 0 0 auto;
  width: min(36rem, 72vw);
  height: 5.5rem;
  min-height: 5.5rem;
}

.projects {
  display: grid;
  scroll-snap-align: start;
  border-block: var(--line-ui) solid var(--color-line-soft);
}

.project-panel {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: var(--space-4);
  min-height: auto;
  padding: var(--section-standard) var(--page-gutter);
  text-decoration: none;
  color: inherit;
}

.project-panel + .project-panel {
  border-block-start: var(--line-ui) solid var(--color-line-soft);
}

.project-panel h2 {
  font-size: var(--heading-sm);
}

.project-panel__art {
  display: grid;
  place-items: end center;
  min-height: 12rem;
  padding-block: var(--space-6) var(--space-3);
}

.project-panel__art svg {
  width: min(100%, 22rem);
  height: auto;
}

.project-panel__art .teaser-field {
  width: min(100%, 26rem);
  justify-self: center;
}

.teaser-car .car-body {
  transform-box: fill-box;
  transform-origin: 50% 80%;
}

.teaser-field .stalk {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.teaser-field .field-ground {
  stroke: var(--color-accent);
}

.contact-section {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: calc(100svh - var(--header-height));
  scroll-snap-align: start;
}

.contact-section__body {
  display: grid;
  gap: var(--space-8);
  align-content: center;
  align-items: center;
  padding-block: var(--space-9);
}

.contact-section h2 {
  font-size: var(--heading-md);
  max-inline-size: 14ch;
}

.contact-section .support {
  font-size: var(--text-base);
  margin-block-start: var(--space-5);
}

.contact-visual {
  width: min(100%, 38rem);
}

.industry-cue {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6) var(--page-gutter) var(--space-7);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-align: center;
  text-decoration: none;
}

.industry-cue:hover,
.industry-cue:focus-visible {
  color: var(--color-text);
}

.industry-cue__arrow {
  width: 0.7rem;
  height: 0.7rem;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
  fill: none;
  animation: industry-cue-idle 2.8s var(--ease-standard) infinite;
}

@keyframes industry-cue-idle {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(0.22rem);
    opacity: 1;
  }
}

.contact-overhead {
  animation: contact-idle 5.5s ease-in-out infinite;
}

@keyframes contact-idle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

.contact-visual .contact-wheat {
  stroke: var(--color-accent);
  stroke-width: var(--line-art-large);
  fill: none;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
}

.contact-section.is-active .contact-wheat {
  opacity: 1;
  stroke-dashoffset: 0;
  animation: wheat-pulse 2.8s var(--ease-standard) infinite;
}

.contact-section.is-active .contact-overhead {
  opacity: 0.18;
}

@media (max-width: 63.99rem) {
  .contact-section {
    position: relative;
    z-index: 4;
    background: var(--color-bg);
    scroll-snap-stop: always;
    min-height: calc(100svh - var(--header-height));
  }

  .contact-section__body {
    padding-block: var(--space-6);
    gap: var(--space-5);
  }

  .contact-visual {
    width: min(100%, 22rem);
  }

  .industry-cue {
    padding-block: var(--space-4) var(--space-5);
  }

  .projects {
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-rows: 1fr 1fr;
    min-height: calc(100svh - var(--header-height));
    background: var(--color-bg);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .project-panel {
    scroll-snap-align: none;
    min-height: 0;
    padding: var(--space-4) var(--page-gutter);
    gap: var(--space-2);
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  }

  .project-panel__art {
    min-height: 0;
    padding-block: var(--space-2) var(--space-1);
    place-items: center;
  }

  .project-panel__art svg,
  .project-panel__art .teaser-field {
    width: min(100%, 16rem);
    max-height: 8.5rem;
  }

  .site-footer {
    position: relative;
    z-index: 4;
    background: var(--color-bg);
  }
}

@media (min-width: 64rem) {
  .hero-story {
    grid-template-columns: minmax(18rem, 28rem) minmax(26rem, 40rem);
    justify-content: center;
    column-gap: clamp(2rem, 4vw, 4.5rem);
  }

  .hero-visual {
    grid-column: 2;
    grid-row: 1 / span 6;
    position: sticky;
    inset-block-start: var(--header-height);
    height: calc(100vh - var(--header-height));
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    overflow: visible;
  }

  .hero-process {
    width: 100%;
    max-width: 40rem;
    margin-inline: 0;
  }

  .hero-step {
    grid-column: 1;
    z-index: 2;
    justify-content: center;
    padding-inline: 0;
    padding-block: 0;
  }

  .hero-step--outcome {
    grid-column: 1 / -1;
    text-align: center;
    align-items: center;
    z-index: 2;
  }

  .projects {
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - var(--header-height));
  }

  .project-panel {
    min-height: calc(100vh - var(--header-height));
    padding-block: var(--space-9);
  }

  .project-panel + .project-panel {
    border-block-start: 0;
    border-inline-start: var(--line-ui) solid var(--color-line-soft);
  }

  .contact-section__body {
    grid-template-columns: minmax(18rem, 1fr) minmax(22rem, 1.15fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wheat-line,
  .examine-stroke,
  .contact-wheat,
  .contact-overhead,
  .hero-process.is-idle .node,
  .hero-process.is-idle .geo-line,
  .industry-cue__arrow {
    stroke-dashoffset: 0;
    animation: none;
  }

  .hero-step h1,
  .hero-step h2,
  .hero-step .support,
  .hero-step .hero-outcome-sub,
  .hero-live-title,
  .hero-live-support {
    transition: none;
    transform: none;
  }
}
