/* Local mobile homepage composition, based on the user's supplied references. */
.work-accordion-reveal,
.work-accordion-reveal-inner { display: contents; }

@media (max-width: 620px) {
  html:has(body.is-service-transitioning) {
    overflow-anchor: none;
    scroll-behavior: auto;
  }

  .home-page .page {
    /* Keep the last section's light margin inside the light canvas. */
    display: flow-root;
  }

  .home-page #ways { overflow-anchor: none; }

  .home-page #ways .work-accordion-reveal {
    display: grid;
    grid-template-rows: 0fr;
    width: calc(100% + var(--gutter) * 2);
    margin-inline: calc(-1 * var(--gutter));
    transition: grid-template-rows 420ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .home-page #ways .is-accordion-open > .work-accordion-reveal {
    grid-template-rows: 1fr;
  }

  .home-page #ways .work-accordion-reveal-inner {
    display: block;
    min-height: 0;
    overflow: hidden;
  }

  .home-page #ways .work-accordion-body,
  .home-page #ways .work-accordion-item.is-accordion-open .work-accordion-body,
  .home-page #ways .work-accordion-item[open]:not(.is-accordion-open) .work-accordion-body {
    max-height: none;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .home-page #ways .work-accordion-body {
    width: 100%;
    margin-left: 0;
    padding-bottom: 56px;
  }

  html:has(body.home-page) {
    background-color: var(--paper);
    background-image: url("assets/textures/paper-grain.png");
  }

  body.home-page,
  body.home-page:has(.home-footer) .page,
  html[data-mobile-intro-variant] .home-page .hero-intro,
  .home-page #selected {
    background-color: var(--paper);
    background-image: url("assets/textures/paper-grain.png");
    background-repeat: repeat;
  }

  .home-page .mobile-intro-one-about,
  .home-page #ways .work-accordion-link {
    font-family: var(--body);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: lowercase;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 8px;
    min-height: 44px;
  }

  .home-page #ways .work-accordion-intro h2 {
    max-width: none;
    font-family: "Avenir Next", "Gill Sans", "Helvetica Neue", sans-serif;
    font-size: clamp(42px, 12vw, 56px);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: 0;
    text-transform: lowercase;
  }

  .home-page #ways .work-accordion-intro h2 span {
    display: block;
    white-space: nowrap;
  }

  .home-page #ways .work-accordion-intro p {
    width: 100%;
    max-width: none;
    font-family: "Avenir Next", "Gill Sans", "Helvetica Neue", sans-serif;
    font-size: clamp(17px, 4.35vw, 19px);
    font-weight: 400;
    line-height: 1.28;
    text-transform: none;
  }

  .home-page #ways .work-accordion-name {
    font-family: "Avenir Next", "Gill Sans", "Helvetica Neue", sans-serif;
    font-size: clamp(17px, 4.35vw, 19px);
    font-weight: 400;
    line-height: 1.28;
    letter-spacing: 0;
    text-transform: lowercase;
  }

  .home-page #ways .work-accordion-summary {
    min-height: 86px;
    padding-block: 0;
  }

  .home-page #ways .work-accordion-copy {
    font-family: var(--body);
    font-size: 18px;
    font-weight: 350;
    line-height: 1.5;
  }

  .home-page #ways .service-deliverables {
    font-family: var(--body);
    font-size: 16px;
    font-weight: 350;
    line-height: 1.5;
    letter-spacing: normal;
  }
  .home-page #ways .service-deliverables li { padding-left: 12px; }
  .home-page #ways .service-deliverables li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .65em;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #202020;
  }

  .home-page #selected .project-caption p,
  .home-page #ways .service-deliverables,
  .home-page #ways .work-accordion-link {
    text-transform: lowercase;
  }

  .home-page #selected .project-caption p {
    font-family: "Avenir Next", "Gill Sans", "Helvetica Neue", sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.3;
  }

  .home-page #selected .project-caption h3 { gap: 5px; }
  .home-page #selected .project-caption h3::before {
    display: block;
    background: var(--footer-plum);
  }


}

@media (prefers-reduced-motion: reduce) {
  .home-page #ways .work-accordion-reveal { transition: none; }
}
