/* How it Works (services) page */

/* ---------- Hero: text-only on the two-tone backdrop ---------- */
.svc-hero .hero__inner { grid-template-columns: minmax(0, 760px); min-height: 0; padding-block: clamp(28px, 3.5vw, 56px) clamp(56px, 7vw, 112px); }
.svc-hero h1 { font-style: italic; font-weight: 800; font-size: clamp(2rem, 1rem + 2.4vw, 2.875rem); }
.svc-hero .hero__sub { max-width: 640px; }
/* keep the copy on the darker half of the two-tone backdrop */
@media (min-width: 901px) {
  .svc-hero .hero__inner { grid-template-columns: minmax(0, min(720px, calc(50vw - var(--gutter) - 32px))); }
}

/* ---------- Overview ---------- */
.svc-intro__text { max-width: 980px; padding-left: clamp(16px, 2vw, 28px); border-left: 3px solid var(--green); }
.svc-intro__text p { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink); }
.svc-intro__text p + p { color: var(--text); }

/* ---------- Method overview: Collect → Act, each step links to its detail ---------- */
.svc-method .section-head { margin-bottom: clamp(40px, 5vw, 72px); }
.svc-flow { max-width: 1216px; margin-inline: auto; }
.svc-flow__link { display: flex; flex-direction: column; align-items: center; gap: 18px; color: inherit; border-radius: var(--radius); }
.svc-flow__link:hover { color: inherit; }
.svc-flow__link:hover .steps__icon { transform: scale(1.06); }
.svc-flow__link:hover .steps__label { color: var(--green); }
.svc-flow .steps__label { transition: color .2s var(--ease); }
@media (max-width: 768px) {
  .svc-flow { --steps: 4; }
  .svc-flow .steps__icon { width: 60px; height: 60px; }
  .svc-flow .steps__icon img { width: 32px; height: 32px; }
  .svc-flow .steps__label { font-size: 1rem; }
  .svc-flow__link { gap: 12px; }
}
@media (max-width: 480px) {
  .svc-flow { --steps: 2; row-gap: 32px; }
}

/* ---------- Step detail panel ---------- */
.svc-panel { display: grid; gap: clamp(56px, 7vw, 80px); padding-bottom: clamp(40px, 8vw, 140px); border-radius: 12px; }
.svc-step { --split-gap: clamp(32px, 9vw, 160px); max-width: 1080px; width: 100%; margin-inline: auto; scroll-margin-top: calc(var(--header-h) + 24px); }
.svc-step__num {
  display: inline-grid; place-items: center; min-width: 44px; height: 28px; padding: 0 12px; margin-bottom: 16px;
  border-radius: 999px; background: var(--green); color: #fff; font-size: .8125rem; font-weight: 700; letter-spacing: .06em;
}
.svc-step h3 { font-size: var(--fs-h2); font-weight: 800; margin-bottom: 20px; }
.svc-step__tagline { margin-bottom: 20px; font-size: clamp(1.0625rem, 1rem + .25vw, 1.125rem); font-weight: 600; font-style: italic; color: var(--green); }
.svc-step__text p:not(.svc-step__tagline) { font-size: 1rem; line-height: 1.55; }

.svc-step__media {
  position: relative; display: grid; place-items: center; aspect-ratio: 463 / 440; padding: clamp(16px, 2vw, 24px);
  border-radius: 12px; overflow: hidden;
  background: #eef2ff url("../../img/SaaS-Features-BG-1.webp") center / cover no-repeat;
}
.svc-step__media--alt { background-image: url("../../img/SaaS-Features-BG-2.webp"); }
.split__media.svc-step__media img { width: 100%; max-width: 440px; }
.svc-step__media--fill { padding: 0; }
.split__media.svc-step__media--fill img { position: absolute; inset: 0; width: 100%; max-width: none; height: 100%; object-fit: cover; object-position: left top; }
@media (max-width: 900px) {
  .svc-step__media { justify-self: center; width: 100%; max-width: 480px; }
}

/* ---------- Architecture flow ---------- */
.svc-arch__head { --split-cols: 1fr 1.1fr; --split-gap: clamp(16px, 4vw, 64px); align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.svc-arch__head h2 { margin: 0; }
.svc-arch__head p { max-width: 560px; margin: 0; font-size: var(--fs-lead); }

.svc-arch__flow {
  --arrow: 36px; --flow-gap: 56px;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--flow-gap);
}
.svc-arch__node {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
  padding: 28px 16px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); transition: border-color .2s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.svc-arch__node:hover { border-color: rgba(58, 117, 95, .45); transform: translateY(-3px); box-shadow: var(--shadow); }
.svc-arch__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--green-100); color: var(--green); }
.svc-arch__icon .icon { width: 28px; height: 28px; }
.svc-arch__label { font-size: clamp(1rem, .95rem + .25vw, 1.1875rem); font-weight: 600; line-height: 1.3; color: var(--ink); }
/* arrow chip between nodes */
.svc-arch__node:not(:last-child)::after {
  content: ""; position: absolute; z-index: 1; top: 50%; right: calc((var(--flow-gap) + var(--arrow)) / -2);
  width: var(--arrow); height: var(--arrow); margin-top: calc(var(--arrow) / -2); border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: 0 6px 14px rgba(58, 117, 95, .28);
}
@media (max-width: 1200px) {
  .svc-arch__flow { --flow-gap: 44px; --arrow: 32px; }
  .svc-arch__node { padding: 24px 10px 20px; }
  .svc-arch__icon { width: 48px; height: 48px; }
  .svc-arch__icon .icon { width: 24px; height: 24px; }
}
@media (max-width: 900px) {
  .svc-arch__flow { --flow-gap: 44px; --arrow: 36px; grid-template-columns: minmax(0, 520px); justify-content: center; }
  .svc-arch__node { flex-direction: row; gap: 18px; padding: 16px 20px; text-align: left; }
  .svc-arch__icon { flex: none; width: 48px; height: 48px; }
  .svc-arch__icon .icon { width: 24px; height: 24px; }
  .svc-arch__node:not(:last-child)::after {
    top: auto; right: auto; left: 50%; bottom: calc((var(--flow-gap) + var(--arrow)) / -2);
    margin: 0 0 0 calc(var(--arrow) / -2); transform: rotate(90deg);
  }
}
@media (max-width: 900px) {
  .svc-arch__head { align-items: start; gap: 16px; }
}

/* ---------- Practical example + walkthrough card ---------- */
.svc-example__grid { --split-cols: 1.1fr 1fr; align-items: stretch; }
.svc-example h2 { font-size: var(--fs-h3); }
.svc-example__story p { max-width: 540px; }
.svc-example__img { width: 100%; max-width: 560px; margin-top: clamp(24px, 3vw, 40px); }
.svc-example__cta { height: auto; align-self: center; box-shadow: var(--shadow); }
.svc-example__cta .card__icon { margin-bottom: 24px; }
.svc-example__cta .card__footer { padding-top: 24px; }
@media (max-width: 480px) {
  .svc-example__cta .btn { padding-inline: 20px; }
}
