/* Homepage accordion: keep the long-form content available without showing it all at once. */

.page-home :is(#services, #usecases, #fit, #process, #trust, #contact).home-fold-section.is-ready {
  padding-block: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  scroll-margin-top: 82px;
  border-top: 1px solid rgba(112, 94, 65, 0.18);
  background: #f7f3eb !important;
}

.page-home :is(#services, #usecases, #fit, #process, #trust, #contact).home-fold-section.is-ready:last-of-type {
  border-bottom: 1px solid rgba(112, 94, 65, 0.18);
}

.page-home :is(#services, #usecases, #fit, #process, #trust, #contact).home-fold-section.is-ready > .container {
  min-height: 0 !important;
  height: auto !important;
  padding-inline: clamp(24px, 4vw, 48px);
}

.page-home .home-fold-toggle {
  appearance: none;
  width: 100%;
  min-height: 88px;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0 4px;
  color: #171814;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
}

.page-home .home-fold-heading {
  display: inline-flex;
  gap: clamp(16px, 2.2vw, 30px);
  align-items: baseline;
  min-width: 0;
}

.page-home .home-fold-index {
  color: #8b806f;
  font-family: var(--txf-sans, sans-serif);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.page-home .home-fold-label {
  color: #171814;
  font-family: var(--txf-serif, "Noto Serif SC", "Songti SC", serif);
  font-size: clamp(19px, 1.7vw, 23px);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.2;
}

.page-home .home-fold-icon {
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(112, 94, 65, 0.34);
  border-radius: 50%;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.page-home .home-fold-icon::before,
.page-home .home-fold-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.page-home .home-fold-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease;
}

.page-home .home-fold-toggle:hover .home-fold-label,
.page-home .home-fold-toggle:focus-visible .home-fold-label {
  color: #0d756c;
}

.page-home .home-fold-toggle:hover .home-fold-icon,
.page-home .home-fold-toggle:focus-visible .home-fold-icon {
  color: #0d756c;
  border-color: rgba(13, 117, 108, 0.54);
  background: rgba(13, 117, 108, 0.055);
}

.page-home .home-fold-toggle:focus-visible {
  outline: 2px solid rgba(13, 117, 108, 0.6);
  outline-offset: -2px;
}

.page-home .home-fold-section.is-open .home-fold-icon {
  color: #f8f3e9;
  border-color: #0d756c;
  background: #0d756c;
  transform: rotate(180deg);
}

.page-home .home-fold-section.is-open .home-fold-icon::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg);
}

.page-home .home-fold-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition:
    grid-template-rows 520ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 260ms ease,
    visibility 0s linear 520ms;
}

.page-home .home-fold-section.is-open .home-fold-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition:
    grid-template-rows 560ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 320ms ease 80ms,
    visibility 0s linear 0s;
}

.page-home .home-fold-panel-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.page-home .home-fold-section.is-open .home-fold-panel-inner {
  padding: clamp(50px, 5vw, 72px) 0 clamp(76px, 7vw, 104px);
  border-top: 1px solid rgba(112, 94, 65, 0.16);
}

.page-home .home-fold-section .section-head {
  margin-top: 0 !important;
}

.page-home .home-fold-section .is-accordion-metric {
  width: 100%;
  margin: 0 0 30px;
  border: 1px solid rgba(112, 94, 65, 0.18);
  background: rgba(255, 252, 246, 0.56);
}

.page-home .home-fold-section .is-accordion-metric > .container {
  width: 100%;
  max-width: none;
  padding-inline: 0;
}

.page-home .home-fold-section .is-accordion-metric .metrics {
  border: 0;
}

.page-home .home-fold-section.is-open#contact .home-fold-panel-inner {
  padding-top: clamp(50px, 5vw, 72px);
}

.page-home .home-fold-section.is-open#contact .contact-box {
  margin: 0;
}

@media (max-width: 720px) {
  .page-home :is(#services, #usecases, #fit, #process, #trust, #contact).home-fold-section.is-ready {
    scroll-margin-top: 68px;
  }

  .page-home :is(#services, #usecases, #fit, #process, #trust, #contact).home-fold-section.is-ready > .container {
    padding-inline: 16px !important;
  }

  .page-home .home-fold-toggle {
    min-height: 66px;
    padding-inline: 1px;
  }

  .page-home .home-fold-heading {
    gap: 14px;
  }

  .page-home .home-fold-label {
    font-size: 18px;
  }

  .page-home .home-fold-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .page-home .home-fold-section.is-open .home-fold-panel-inner {
    padding: 36px 0 64px;
  }

  .page-home .home-fold-section .is-accordion-metric {
    margin-bottom: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .home-fold-panel,
  .page-home .home-fold-section.is-open .home-fold-panel,
  .page-home .home-fold-icon,
  .page-home .home-fold-icon::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
