/* Services page — ERP systems editorial stack */

.products-systems {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
  background:
    linear-gradient(180deg, #f4faf6 0%, #eaf5ef 48%, #f7fbf8 100%);
}

.systems-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 35% at 12% 18%, rgba(0, 104, 48, 0.1), transparent 60%),
    radial-gradient(ellipse 45% 30% at 88% 72%, rgba(0, 128, 64, 0.08), transparent 55%);
}

.products-systems > .container {
  position: relative;
  z-index: 1;
}

.systems-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: end;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid rgba(0, 104, 48, 0.14);
}

.systems-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #006830;
}

.systems-eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  background: #006830;
}

.systems-head h2 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: #013820;
}

.systems-lead {
  margin: 0;
  max-width: 32ch;
  justify-self: end;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #4f6a5b;
}

.systems-stack {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.75rem);
}

.system-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: stretch;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  min-height: clamp(320px, 42vw, 420px);
}

.system-row.is-flip {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.system-row.is-flip .system-stage {
  order: 2;
}

.system-row.is-flip .system-copy {
  order: 1;
}

.system-stage {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 30% 45%, rgba(255, 255, 255, 0.18), transparent 48%),
    linear-gradient(145deg, #008040 0%, #006830 48%, #013820 100%);
  box-shadow: 0 28px 60px rgba(1, 56, 32, 0.16);
  min-height: 100%;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.system-glow {
  position: absolute;
  width: min(70%, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 68%);
  filter: blur(4px);
  animation: system-glow 8s ease-in-out infinite alternate;
}

.system-num {
  position: absolute;
  left: 1.1rem;
  top: 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 800;
  line-height: 0.85;
  color: rgba(255, 255, 255, 0.1);
  pointer-events: none;
  user-select: none;
}

.system-stage img {
  position: relative;
  z-index: 1;
  width: min(88%, 460px);
  max-height: 340px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.28));
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.system-row:hover .system-stage img {
  transform: translateY(-8px) scale(1.03);
}

.system-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(0.5rem, 2vw, 1.25rem) 0.25rem;
}

.system-tag {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 0.9rem;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 104, 48, 0.1);
  color: #006830;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-copy h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #013820;
}

.system-copy > p {
  margin: 0 0 1.35rem;
  max-width: 34ch;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #4f6a5b;
}

.system-meta {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.5rem;
  padding: 1rem 0 0;
  border-top: 1px solid rgba(0, 104, 48, 0.12);
}

.system-meta div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
}

.system-meta dt {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #006830;
}

.system-meta dd {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #3f5749;
}

.system-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: #006830;
  transition: gap 0.25s ease, color 0.25s ease;
}

.system-link:hover {
  gap: 0.7rem;
  color: #013820;
}

@keyframes system-glow {
  from { transform: scale(1); opacity: 0.75; }
  to { transform: scale(1.12); opacity: 1; }
}

@media (max-width: 900px) {
  .systems-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .systems-lead {
    justify-self: start;
    max-width: 42ch;
  }

  .system-row,
  .system-row.is-flip {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .system-row.is-flip .system-stage,
  .system-row.is-flip .system-copy {
    order: initial;
  }

  .system-stage {
    min-height: 280px;
  }

  .system-stage img {
    max-height: 260px;
  }
}

@media (max-width: 640px) {
  .system-meta div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .system-stage {
    border-radius: 22px;
    padding: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .system-glow,
  .system-stage img {
    animation: none !important;
    transition: none !important;
  }

  .system-row:hover .system-stage img {
    transform: none;
  }
}
