/* LEAFSpace. Mobile first; the desktop layout (matching the original at 1440 px) starts at 1200 px. */

/* ---------- Hero ---------- */
.leaf-hero { border-top: 6px solid var(--white); background: #FAFAFA; }
.leaf-hero__inner { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 28px 16px 34px; }
.leaf-hero__logo { width: min(280px, 72vw); height: auto; }
.leaf-hero__statement {
  width: 100%;
  padding: 36px 24px 40px;
  background: var(--teal);
  color: var(--white);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
}

/* ---------- Local Engineering and Fabrication Space: loop of four boxes ---------- */
.leaf-loop { padding: 8px 0 0; }
.leaf-loop__title, .loop { background: #E8EDEA; }
.leaf-loop__title {
  margin: 0;
  padding: 36px 20px 24px;
  font-family: var(--font-avenir-heavy);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: #323232;
}
.loop { display: flex; flex-direction: column; padding: 0 20px 80px; }
.loop__box {
  position: relative;
  margin: 0 0 64px;
  min-height: 150px;
  padding: 24px 20px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
}
.loop__box--a, .loop__box--d { background: #A4C6CA; color: var(--black); }
.loop__box--b, .loop__box--c { background: var(--teal); color: var(--white); }
.loop__box--a { order: 1; } .loop__box--b { order: 2; } .loop__box--d { order: 3; } .loop__box--c { order: 4; margin-bottom: 0; }
.loop__arrows { display: none; }
/* on small screens the boxes stack in reading order and a simple arrow links each to the next */
.loop__box::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 46'%3E%3Cpath d='M6 1v33' stroke='%23222' stroke-width='1.6' fill='none'/%3E%3Cpath d='M0 32h12l-6 13z' fill='%23222'/%3E%3C/svg%3E") center / auto 40px no-repeat;
}
.loop__box--c::after {
  /* the last box leads back to the first */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 46'%3E%3Cpath d='M6 45V12' stroke='%23222' stroke-width='1.6' fill='none'/%3E%3Cpath d='M0 14h12L6 1z' fill='%23222'/%3E%3C/svg%3E");
  top: 100%;
}
.loop { padding-bottom: 76px; }

/* ---------- Technology Development Pipeline ---------- */
.pipeline__title {
  padding: 40px 20px 36px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: var(--teal);
}
.pipeline__stage {
  background: #CFCFCF url("/images/leafspace-pipeline-background.jpg") center / cover no-repeat;
  padding: 56px 20px 64px;
}
.pipeline__steps { display: grid; gap: 56px; max-width: 420px; margin: 0 auto; }
.step { position: relative; padding: 76px 28px 40px; background: var(--white); color: #324158; }
.step__number {
  position: absolute;
  top: -30px;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 89px;
  margin-left: -42px;
  border-radius: 50%;
  background: var(--light-teal);
  color: var(--teal);
  font-family: var(--font-avenir-heavy);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
}
.step__title { text-align: center; font-size: 20px; font-weight: 700; line-height: 28px; color: var(--teal); }
.step__list { margin-top: 24px; font-size: 16px; line-height: 25.4px; }
.step__list > li + li { margin-top: 0; }
.step--tall-lines .step__list { line-height: 28.8px; }
.step--tall-lines .step__list > li + li { margin-top: 0; }
.step__sublist { padding-left: 40px; }
.step__list sub { font-size: 9px; line-height: 0; }

@media (min-width: 760px) {
  .leaf-hero__inner { flex-direction: row; justify-content: center; gap: 0; padding: 24px 24px; }
  .leaf-hero__logo { width: 360px; }
  .leaf-hero__statement { width: 420px; font-size: 26px; }
  .leaf-loop__title { font-size: 30px; }
  .loop { max-width: 520px; margin: 0 auto; background: none; }
  .leaf-loop { background: #E8EDEA; }
  .loop__box { font-size: 26px; }
  .pipeline__steps { max-width: none; grid-template-columns: repeat(3, 1fr); align-items: start; gap: 12px; }
  .pipeline__stage { padding: 56px 20px 80px; }
  .step { padding: 76px 16px 36px; }
}

@media (min-width: 1200px) {
  .leaf-hero { height: 509px; }
  .leaf-hero__inner { position: relative; display: block; width: 980px; height: 503px; margin: 0 auto; padding: 0; }
  .leaf-hero__logo { position: absolute; left: 28px; top: 31px; width: 454px; height: 364px; object-fit: cover; }
  .leaf-hero__statement {
    position: absolute;
    left: 496px; top: 15px;
    width: 467px; height: 468px;
    padding: 54px 38px 0;
    font-size: 30px;
    line-height: 39px;
    letter-spacing: 3px;
  }

  .leaf-loop { height: 765px; padding-top: 8px; background: none; }
  .leaf-loop__title { height: 134px; padding: 46px 0 0; font-size: 33px; line-height: 40px; }
  .loop { position: relative; display: block; max-width: none; height: 600px; margin: 0; padding: 0; background: #E8EDEA; }
  .loop__box { position: absolute; width: 339px; height: 240px; min-height: 0; margin: 0; padding: 65px 0 0 64px; font-size: 27px; line-height: 32.4px; letter-spacing: 2.7px; }
  .loop__box::after { display: none; }
  .loop__text { display: block; max-width: 190px; }
  .loop__box--a { left: calc(50% - 398px); top: 0; }
  .loop__box--b { left: calc(50% + 38px); top: -1px; width: 352px; padding: 78px 0 0 66px; }
  .loop__box--c { left: calc(50% - 398px); top: 302px; padding-top: 77px; }
  .loop__box--d { left: calc(50% + 38px); top: 302px; width: 352px; padding: 69px 0 0 66px; }
  .loop__box--d .loop__text { max-width: 210px; }
  .loop__arrows { display: block; position: absolute; left: calc(50% - 490px); top: 0; width: 980px; height: 1px; color: #222; }
  .loop__arrow { position: absolute; }
  .loop__arrow--right { left: 444px; top: 112px; width: 74px; height: 16px; }
  .loop__arrow--corner-tr { left: 905px; top: 133px; width: 32px; height: 32px; }
  .loop__arrow--down { left: 925px; top: 245px; width: 12px; height: 46px; }
  .loop__arrow--corner-br { left: 906px; top: 375px; width: 32px; height: 32px; }
  .loop__arrow--left { left: 442px; top: 414px; width: 74px; height: 16px; }
  .loop__arrow--corner-bl { left: 47px; top: 385px; width: 32px; height: 32px; }
  .loop__arrow--up { left: 55px; top: 250px; width: 12px; height: 46px; }
  .loop__arrow--corner-tl { left: 47px; top: 129px; width: 32px; height: 32px; }

  .pipeline { height: 846px; }
  .pipeline__title { height: 136px; padding: 41px 0 0; font-size: 39px; line-height: 54.6px; }
  .pipeline__stage { height: 710px; padding: 84px 0 0; }
  .pipeline__steps { width: 980px; margin: 0 auto; grid-template-columns: 320px 320px 320px; gap: 0 10px; }
  .step { padding: 96px 35px 44px; }
  .step__number { left: 118px; top: -26px; margin: 0; }
  .step__title { margin-top: -0px; }
  .step__list { margin-top: 24px; }
}
