/* Home page sections: bento, workflow, principles, faq, cta, footer */

.home-section {
  padding-top: clamp(72px, 9vw, 124px);
  padding-bottom: clamp(72px, 9vw, 124px);
}

.home-section-head {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
}

.home-section-head--left {
  margin: 0;
  text-align: left;
}

.home-eyebrow {
  color: var(--hm-green-deep);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-eyebrow--on-dark {
  color: rgb(236 245 240 / 72%);
}

.home-section-head h2 {
  margin-top: 16px;
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.home-section-head__sub {
  margin-top: 16px;
  color: var(--hm-muted);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.65;
}

/* Bento grid */
.home-bento__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 5vw, 60px);
}

.home-bento__card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  gap: 20px;
  padding: 26px;
  border: 1px solid var(--hm-line);
  border-radius: 20px;
  background: var(--hm-surface);
  transition:
    border-color 180ms cubic-bezier(0.2, 0, 0, 1),
    box-shadow 220ms cubic-bezier(0.2, 0, 0, 1),
    transform 220ms cubic-bezier(0.2, 0, 0, 1);
}

.home-bento__card:hover {
  border-color: rgb(47 125 98 / 38%);
  box-shadow: 0 24px 44px -28px rgb(26 27 22 / 30%);
  transform: translateY(-3px);
}

.home-bento__card--wide {
  grid-column: span 2;
}

.home-bento__text h3 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.home-bento__text p {
  margin-top: 10px;
  color: var(--hm-muted);
  font-size: 14px;
  line-height: 1.68;
}

.home-bento__icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--hm-green-soft);
  color: var(--hm-green-deep);
}

/* Wide card: step timeline */
.home-bento__steps {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.home-bento__steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--hm-line);
  border-radius: 12px;
  background: var(--hm-bg);
  color: var(--hm-faint);
  font-size: 13.5px;
  font-weight: 550;
}

.home-bento__steps li.is-done {
  color: var(--hm-muted);
}

.home-bento__steps li.is-active {
  border-color: rgb(47 125 98 / 30%);
  background: var(--hm-green-soft);
  color: var(--hm-ink);
}

.home-bento__step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--hm-bg-soft);
  color: var(--hm-faint);
}

.home-bento__steps li.is-done .home-bento__step-icon {
  background: var(--hm-green);
  color: var(--hm-cream);
}

.home-bento__steps li.is-active .home-bento__step-icon {
  background: var(--hm-surface);
  color: var(--hm-green-deep);
}

.home-bento__steps li.is-active svg {
  animation: hm-spin 1.1s linear infinite;
}

/* Skills grid */
.home-bento__skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.home-bento__skill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--hm-bg);
  color: var(--hm-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.home-bento__skill svg {
  color: var(--hm-green-deep);
  flex: 0 0 auto;
}

/* Context chips */
.home-bento__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.home-bento__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--hm-line-strong);
  border-radius: 999px;
  background: var(--hm-surface);
  color: var(--hm-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.home-bento__chip svg {
  color: var(--hm-green-deep);
}

/* Artifact tags */
.home-bento__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.home-bento__tags span {
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--hm-green-soft);
  color: var(--hm-green-deep);
  font-size: 12px;
  font-weight: 650;
}

/* Banner card */
.home-bento__card--banner {
  grid-column: span 3;
  min-height: 0;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  border-color: rgb(47 125 98 / 26%);
  background: linear-gradient(100deg, var(--hm-green-soft), var(--hm-surface) 55%);
}

.home-bento__card--banner .home-bento__text {
  min-width: 0;
}

.home-bento__card--banner .home-bento__text p {
  margin-top: 4px;
}

.home-bento__banner-arrow {
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--hm-green-deep);
  transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
}

.home-bento__card--banner:hover .home-bento__banner-arrow {
  transform: translate(3px, -3px);
}

/* Workflow */
.home-flow__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 44px);
  margin-top: clamp(40px, 5vw, 60px);
}

.home-flow__step {
  border-top: 1px solid var(--hm-line-strong);
  padding-top: 24px;
}

.home-flow__index {
  color: var(--hm-green-deep);
  font-family: var(--hm-serif);
  font-size: 15px;
  font-style: italic;
  letter-spacing: 0.08em;
}

.home-flow__step h3 {
  margin-top: 14px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.home-flow__step p {
  margin-top: 10px;
  color: var(--hm-muted);
  font-size: 14.5px;
  line-height: 1.68;
}

/* Principles panel (dark, green-tinged) */
.home-principles__panel {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 6vw, 76px);
  border-radius: 28px;
  background:
    radial-gradient(120% 150% at 88% 0%, rgb(47 125 98 / 26%), transparent 55%),
    linear-gradient(160deg, #1b211a, var(--hm-dark) 60%);
  color: var(--hm-cream);
}

.home-principles__panel .home-section-head h2 {
  color: var(--hm-cream);
}

.home-principles__octopus {
  position: absolute;
  right: clamp(16px, 5vw, 72px);
  bottom: 0;
  width: clamp(120px, 16vw, 190px);
  opacity: 0.9;
  transform: translateY(10%);
  transition: transform 600ms cubic-bezier(0.2, 0, 0, 1);
}

.home-principles__panel:hover .home-principles__octopus {
  transform: translateY(4%);
}

.home-principles__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3.5vw, 40px);
  margin-top: clamp(36px, 4.5vw, 56px);
}

.home-principles__item {
  position: relative;
  border-left: 1px solid rgb(236 245 240 / 14%);
  padding-left: 22px;
}

.home-principles__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgb(236 245 240 / 10%);
  color: var(--hm-cream);
}

.home-principles__index {
  position: absolute;
  top: 2px;
  right: 0;
  color: rgb(236 245 240 / 32%);
  font-family: var(--hm-serif);
  font-size: 15px;
  font-style: italic;
}

.home-principles__item h3 {
  margin-top: 16px;
  font-size: 17.5px;
  font-weight: 650;
}

.home-principles__item p {
  margin-top: 10px;
  color: rgb(236 245 240 / 62%);
  font-size: 14px;
  line-height: 1.7;
}

/* FAQ */
.home-faq__list {
  max-width: 760px;
  margin: clamp(36px, 4.5vw, 52px) auto 0;
}

.home-faq__item {
  border-bottom: 1px solid var(--hm-line);
}

.home-faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 22px 4px;
  border: 0;
  background: transparent;
  color: var(--hm-ink);
  font-family: inherit;
  font-size: clamp(16px, 1.6vw, 18.5px);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
}

.home-faq__icon {
  flex: 0 0 auto;
  color: var(--hm-faint);
  transition:
    color 180ms cubic-bezier(0.2, 0, 0, 1),
    transform 220ms cubic-bezier(0.2, 0, 0, 1);
}

.home-faq__item.is-open .home-faq__icon {
  color: var(--hm-green-deep);
  transform: rotate(45deg);
}

.home-faq__answer {
  max-width: 640px;
  padding: 0 4px 24px;
  color: var(--hm-muted);
  font-size: 15px;
  line-height: 1.75;
}

/* CTA panel (brand green, octopus peeking) */
.home-cta {
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(72px, 9vw, 124px);
}

.home-cta__panel {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 7vw, 92px) clamp(24px, 5vw, 64px);
  border-radius: 28px;
  background:
    radial-gradient(130% 160% at 50% -30%, rgb(236 245 240 / 16%), transparent 55%),
    linear-gradient(165deg, var(--hm-green) 0%, var(--hm-green-deep) 78%);
  color: var(--hm-cream);
  text-align: center;
}

.home-cta__panel h2 {
  position: relative;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.home-cta__panel p {
  position: relative;
  max-width: 500px;
  margin: 16px auto 30px;
  color: rgb(236 245 240 / 78%);
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.65;
}

.home-cta__panel .home-btn {
  position: relative;
}

.home-cta__octopus {
  position: absolute;
  bottom: 0;
  left: clamp(8px, 6vw, 84px);
  width: clamp(130px, 18vw, 210px);
  transform: translateY(10%);
  transition: transform 600ms cubic-bezier(0.2, 0, 0, 1);
}

.home-cta__panel:hover .home-cta__octopus {
  transform: translateY(4%);
}

/* Footer */
.home-footer {
  border-top: 1px solid rgb(236 245 240 / 10%);
  background: var(--hm-dark);
  color: rgb(236 245 240 / 64%);
  padding-top: clamp(48px, 6vw, 72px);
  padding-bottom: 36px;
}

.home-footer .threadlab-logo-wordmark-image {
  color: var(--hm-cream);
}

.home-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.home-footer__brand p {
  max-width: 240px;
  margin-top: 14px;
  color: rgb(236 245 240 / 55%);
  font-size: 14px;
  line-height: 1.6;
}

.home-footer__columns {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(40px, 6vw, 84px);
}

.home-footer__column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-footer__title {
  color: var(--hm-cream);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-footer__column a {
  color: rgb(236 245 240 / 60%);
  font-size: 14px;
  transition: color 160ms cubic-bezier(0.2, 0, 0, 1);
}

.home-footer__column a:hover {
  color: var(--hm-cream);
}

.home-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(40px, 5vw, 60px);
  padding-top: 22px;
  border-top: 1px solid rgb(236 245 240 / 10%);
  color: rgb(236 245 240 / 40%);
  font-size: 13px;
}

/* Sections responsive */
@media (max-width: 980px) {
  .home-bento__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-bento__card--wide {
    grid-column: span 2;
  }

  .home-bento__card--banner {
    grid-column: span 2;
  }

  .home-flow__grid {
    grid-template-columns: 1fr;
  }

  .home-principles__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .home-principles__octopus {
    opacity: 0.5;
  }
}

@media (max-width: 620px) {
  .home-bento__grid {
    grid-template-columns: 1fr;
  }

  .home-bento__card--wide,
  .home-bento__card--banner {
    grid-column: span 1;
  }

  .home-bento__card {
    min-height: 0;
  }

  .home-cta__octopus {
    opacity: 0.55;
  }

  .home-footer__top {
    flex-direction: column;
  }
}
