/* Home page refinements. Scoped to .home-page to avoid changing shared page styles. */

.home-page {
  background:
    linear-gradient(180deg, #ffffff 0%, #f7faf4 38%, #ffffff 66%),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(18, 59, 42, 0.035) 50%, transparent calc(50% + 1px));
}

.home-page .section-heading {
  position: relative;
  padding-bottom: 18px;
}

.home-page .section-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(180px, 46vw);
  height: 1px;
  background: linear-gradient(90deg, rgba(18, 59, 42, 0.7), rgba(46, 107, 71, 0));
  transform: scaleX(0);
  transform-origin: left;
}

.home-page .reveal.is-visible .section-heading::after {
  animation: homeLineGrow 0.72s ease forwards;
}

.home-page .hero {
  isolation: isolate;
  background-position: 58% center;
}

.home-page .hero-overlay {
  background:
    linear-gradient(90deg,
      rgba(5, 16, 11, 0.92) 0%,
      rgba(9, 30, 20, 0.74) 33%,
      rgba(12, 43, 29, 0.34) 58%,
      rgba(12, 43, 29, 0.04) 100%),
    linear-gradient(180deg, rgba(8, 23, 16, 0.16), rgba(8, 23, 16, 0.08));
}

.home-page .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.08) 50%, transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 84px);
  pointer-events: none;
}

.home-page .hero-content {
  z-index: 1;
}

.home-page .hero-subtitle {
  color: rgba(255, 255, 255, 0.74);
  letter-spacing: 0.34em;
}

.home-page .hero h1 {
  font-size: clamp(2.8rem, 7.2vw, 6.1rem);
  letter-spacing: 0.05em;
}

.home-page .hero-lead {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.98rem, 1.7vw, 1.18rem);
  line-height: 1.86;
  letter-spacing: 0.02em;
}

.home-page .hero .btn {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 3px;
  overflow: hidden;
}

.home-page .hero .btn::after {
  content: "→";
  margin-left: 10px;
  line-height: 1;
  transition: transform 0.22s ease;
}

.home-page .hero .btn:hover::after,
.home-page .hero .btn:focus-visible::after {
  transform: translateX(4px);
}

.home-page .hero .btn-primary {
  background: linear-gradient(135deg, var(--light-green), var(--green));
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-page .hero .btn-secondary {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.home-page .hero .btn-secondary:hover,
.home-page .hero .btn-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.58);
}

.home-page .intro {
  background:
    linear-gradient(180deg, rgba(246, 249, 243, 0.78), rgba(255, 255, 255, 0.92)),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(18, 59, 42, 0.035) 50%, transparent calc(50% + 1px));
}

.home-page .intro-grid {
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1.14fr);
  gap: 54px;
}

.home-page .intro-main {
  max-width: 560px;
}

.home-page .intro-main p {
  font-size: 1.02rem;
  line-height: 2;
}

.home-page .intro-questions {
  counter-reset: homeQuestion;
  gap: 0;
  border-top: 1px solid rgba(18, 59, 42, 0.16);
  border-bottom: 1px solid rgba(18, 59, 42, 0.12);
}

.home-page .question-card {
  counter-increment: homeQuestion;
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 22px;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 18px 0;
  color: var(--deep-green);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(18, 59, 42, 0.11);
  border-radius: 0;
  box-shadow: none;
  font-weight: 700;
  transition:
    color 0.22s ease,
    background-color 0.22s ease;
}

.home-page .question-card:last-child {
  border-bottom: 0;
}

.home-page .question-card::before {
  content: "Q." counter(homeQuestion, decimal-leading-zero);
  color: rgba(46, 107, 71, 0.7);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  transition: transform 0.22s ease, color 0.22s ease;
}

.home-page .question-card::after {
  content: "→";
  color: rgba(46, 107, 71, 0.58);
  font-weight: 800;
  transition: transform 0.22s ease, color 0.22s ease;
}

.home-page .question-card:hover {
  color: var(--text);
  background: rgba(239, 247, 236, 0.42);
}

.home-page .question-card:hover::before,
.home-page .question-card:hover::after {
  color: var(--deep-green);
  transform: translateX(4px);
}

.home-page .services {
  background:
    linear-gradient(180deg, rgba(18, 59, 42, 0.035), rgba(147, 201, 107, 0.06));
}

.home-page .services .card-grid {
  gap: 0;
  background: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(18, 59, 42, 0.16);
  border-bottom: 1px solid rgba(18, 59, 42, 0.13);
}

.home-page .services .service-card {
  min-height: 285px;
  padding: 34px 26px 28px;
  background:
    linear-gradient(90deg, rgba(18, 59, 42, 0.052), transparent 1px) left top / 34% 100% no-repeat;
  border: 0;
  border-right: 1px solid rgba(18, 59, 42, 0.12);
  border-radius: 0;
  box-shadow: none;
}

.home-page .services .service-card:last-child {
  border-right: 0;
}

.home-page .services .service-card::before {
  left: 0;
  right: auto;
  width: 62px;
  height: 1px;
  background: rgba(46, 107, 71, 0.44);
  border-radius: 0;
  transition: width 0.22s ease, background 0.22s ease;
}

.home-page .services .service-card::after {
  content: "0" counter(homeService);
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: rgba(18, 59, 42, 0.045);
  font-size: clamp(3.8rem, 8vw, 6.2rem);
  font-weight: 800;
  line-height: 0.9;
  pointer-events: none;
}

.home-page .services .card-grid {
  counter-reset: homeService;
}

.home-page .services .service-card {
  counter-increment: homeService;
}

.home-page .services .service-card:hover,
.home-page .services .service-card:focus-within {
  background:
    linear-gradient(90deg, rgba(46, 107, 71, 0.08), transparent 1px) left top / 34% 100% no-repeat,
    rgba(245, 250, 242, 0.76);
  transform: none;
}

.home-page .services .service-card:hover::before,
.home-page .services .service-card:focus-within::before {
  width: 124px;
  background: rgba(46, 107, 71, 0.62);
}

.home-page .service-card-label {
  letter-spacing: 0.22em;
}

.home-page .services .card-link,
.home-page .home-feature-action {
  position: relative;
  display: inline-flex;
  width: fit-content;
  min-height: 0;
  margin-top: 24px;
  padding: 0 0 6px;
  color: var(--green);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.home-page .services .card-link::before,
.home-page .home-feature-action::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.34);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.home-page .services .card-link:hover,
.home-page .services .card-link:focus-visible {
  background: transparent;
  transform: none;
}

.home-page .services .card-link:hover::before,
.home-page .services .card-link:focus-visible::before,
.home-page .home-feature-link:hover .home-feature-action::before,
.home-page .home-feature-link:focus-visible .home-feature-action::before {
  transform: scaleX(1);
}

.home-page .principles-grid {
  gap: 0;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(18, 59, 42, 0.14);
  border-left: 0;
  border-right: 0;
}

.home-page .principle-card {
  counter-increment: homePrinciple;
  padding: 32px 26px;
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(18, 59, 42, 0.12);
  border-radius: 0;
  box-shadow: none;
}

.home-page .principles-grid {
  counter-reset: homePrinciple;
}

.home-page .principle-card:last-child {
  border-right: 0;
}

.home-page .principle-card:hover,
.home-page .principle-card:focus-within {
  background: rgba(239, 247, 236, 0.46);
  transform: none;
}

.home-page .principle-card h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.home-page .principle-card h3::before {
  content: "0" counter(homePrinciple);
  color: rgba(46, 107, 71, 0.72);
  font-size: 1.45rem;
  line-height: 1;
}

.home-page .principle-card strong {
  color: var(--deep-green);
}

.home-page .quick-links {
  background:
    linear-gradient(180deg, rgba(247, 250, 244, 0.6), rgba(255, 255, 255, 0.92));
}

.home-page .home-feature-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(18, 59, 42, 0.16);
  border-bottom: 1px solid rgba(18, 59, 42, 0.16);
}

.home-page .home-feature-link {
  position: relative;
  display: grid;
  min-height: 300px;
  padding: 34px 30px;
  overflow: hidden;
  border-right: 1px solid rgba(18, 59, 42, 0.14);
  transition:
    background-color 0.24s ease,
    color 0.24s ease;
}

.home-page .home-feature-link:last-child {
  border-right: 0;
}

.home-page .home-feature-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 30px;
  width: 76px;
  height: 1px;
  background: rgba(46, 107, 71, 0.48);
  transition: width 0.24s ease, background 0.24s ease;
}

.home-page .home-feature-link::after {
  content: attr(class);
  position: absolute;
  right: 20px;
  bottom: 22px;
  color: rgba(18, 59, 42, 0.035);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 0.9;
  pointer-events: none;
}

.home-page .home-feature-link-cases::after {
  content: "CASE STUDY";
}

.home-page .home-feature-link-product {
  color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(135deg, rgba(18, 59, 42, 0.97), rgba(46, 107, 71, 0.9));
}

.home-page .home-feature-link-product::before {
  background: rgba(255, 255, 255, 0.5);
}

.home-page .home-feature-link-product::after {
  content: "PRODUCT";
  color: rgba(255, 255, 255, 0.07);
}

.home-page .home-feature-link:hover,
.home-page .home-feature-link:focus-visible {
  background-color: rgba(239, 247, 236, 0.64);
}

.home-page .home-feature-link-product:hover,
.home-page .home-feature-link-product:focus-visible {
  background:
    linear-gradient(135deg, rgba(16, 52, 36, 0.98), rgba(49, 114, 75, 0.94));
}

.home-page .home-feature-link:hover::before,
.home-page .home-feature-link:focus-visible::before {
  width: 150px;
}

.home-page .home-feature-label {
  color: rgba(46, 107, 71, 0.78);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  line-height: 1.4;
}

.home-page .home-feature-link-product .home-feature-label {
  color: rgba(255, 255, 255, 0.74);
}

.home-page .home-feature-title {
  margin-top: 22px;
  color: var(--deep-green);
  font-size: clamp(1.42rem, 3.4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.28;
}

.home-page .home-feature-link-product .home-feature-title {
  color: var(--white);
}

.home-page .home-feature-text {
  max-width: 520px;
  margin-top: 18px;
  color: var(--subtext);
  line-height: 1.82;
}

.home-page .home-feature-link-product .home-feature-text {
  color: rgba(255, 255, 255, 0.82);
}

.home-page .home-feature-action {
  align-self: end;
  color: var(--green);
  font-weight: 800;
}

.home-page .home-feature-action::after {
  content: "→";
  margin-left: 10px;
  transition: transform 0.22s ease;
}

.home-page .home-feature-link-product .home-feature-action {
  color: rgba(255, 255, 255, 0.9);
}

.home-page .home-feature-link:hover .home-feature-action::after,
.home-page .home-feature-link:focus-visible .home-feature-action::after {
  transform: translateX(5px);
}

@keyframes homeLineGrow {
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 1024px) {
  .home-page .intro-grid,
  .home-page .home-feature-links {
    grid-template-columns: 1fr;
  }

  .home-page .services .card-grid,
  .home-page .principles-grid {
    grid-template-columns: 1fr;
  }

  .home-page .services .service-card,
  .home-page .principle-card,
  .home-page .home-feature-link {
    border-right: 0;
    border-bottom: 1px solid rgba(18, 59, 42, 0.12);
  }

  .home-page .services .service-card:last-child,
  .home-page .principle-card:last-child,
  .home-page .home-feature-link:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 820px) {
  .home-page .hero {
    background-position: 64% center;
  }

  .home-page .hero-overlay {
    background:
      linear-gradient(90deg,
        rgba(5, 16, 11, 0.92) 0%,
        rgba(9, 30, 20, 0.75) 54%,
        rgba(12, 43, 29, 0.28) 100%);
  }

  .home-page .hero h1 {
    font-size: clamp(2rem, 9vw, 2.7rem);
  }

  .home-page .intro-grid {
    gap: 28px;
  }

  .home-page .question-card {
    grid-template-columns: 74px minmax(0, 1fr) 18px;
    min-height: 68px;
    padding: 15px 0;
    font-size: 0.94rem;
  }

  .home-page .services .service-card,
  .home-page .principle-card,
  .home-page .home-feature-link {
    min-height: auto;
    padding: 24px 18px;
  }

  .home-page .home-feature-link::after {
    font-size: clamp(2.2rem, 12vw, 4rem);
  }

  .home-page .home-feature-text {
    font-size: 0.94rem;
    line-height: 1.72;
  }
}

@media (max-width: 560px) {
  .home-page .hero {
    min-height: 82svh;
    background-position: 70% center;
  }

  .home-page .hero-overlay {
    background:
      linear-gradient(90deg,
        rgba(5, 16, 11, 0.94) 0%,
        rgba(9, 30, 20, 0.84) 64%,
        rgba(12, 43, 29, 0.38) 100%);
  }

  .home-page .hero h1 {
    font-size: clamp(1.9rem, 10vw, 2.35rem);
  }

  .home-page .hero .btn {
    width: 100%;
  }

  .home-page .question-card {
    grid-template-columns: 1fr 18px;
    gap: 10px;
  }

  .home-page .question-card::before {
    grid-column: 1 / -1;
    transform: none;
  }

  .home-page .services .service-card::after {
    font-size: 3.8rem;
  }

  .home-page .principle-card h3 {
    gap: 9px;
  }

  .home-page .home-feature-link {
    padding: 22px 16px;
  }

  .home-page .home-feature-title {
    font-size: 1.34rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .section-heading::after,
  .home-page .reveal.is-visible .section-heading::after {
    animation: none;
    transform: scaleX(1);
  }

  .home-page .hero .btn:hover::after,
  .home-page .hero .btn:focus-visible::after,
  .home-page .question-card:hover::before,
  .home-page .question-card:hover::after,
  .home-page .home-feature-link:hover .home-feature-action::after,
  .home-page .home-feature-link:focus-visible .home-feature-action::after {
    transform: none;
  }
}
