/* =========================================================
   LINXAS GROUP — Services page
   Scoped under body.page-services. Extends shared tokens.
   ========================================================= */

body.page-services {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Width & spacing polish ---------- */
body.page-services .page-hero h1 {
  max-width: min(22ch, 100%);
}

body.page-services .page-hero p.lede-with-cta {
  max-width: min(68ch, 100%);
}

body.page-services section.primary-service {
  padding-block: clamp(72px, 8vw, 100px);
}

body.page-services .primary-service h2 {
  max-width: min(24ch, 100%);
}

body.page-services .primary-service > p.lede {
  max-width: min(72ch, 100%);
  margin-bottom: 44px;
}

body.page-services .primary-grid {
  gap: 28px 64px;
  width: 100%;
}

body.page-services .primary-grid li {
  padding: 18px 0;
  line-height: 1.65;
}

body.page-services .terms-note {
  margin-top: 36px;
  max-width: min(76ch, 100%);
  padding: 4px 0 4px 18px;
}

body.page-services section.on-white {
  padding-block: clamp(72px, 8vw, 104px);
}

body.page-services .section-head {
  max-width: min(720px, 100%);
  margin-bottom: 44px;
}

body.page-services .service-block {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.55fr);
  gap: clamp(24px, 4vw, 56px);
  width: 100%;
  margin: 0;
  padding: 28px 24px;
  border: 1px solid transparent;
  border-top-color: var(--line);
  border-radius: 12px;
  background: transparent;
  transition:
    border-color 280ms var(--ease),
    box-shadow 280ms var(--ease),
    background-color 280ms var(--ease);
}

body.page-services .service-block + .service-block {
  margin-top: 8px;
}

body.page-services .service-block:last-child {
  border-bottom-color: transparent;
}

body.page-services .service-block:hover,
body.page-services .service-block:focus-within {
  border-color: var(--line-strong);
  border-top-color: var(--accent);
  background: var(--cream);
  box-shadow: var(--shadow);
}

body.page-services .service-block h3 {
  max-width: none;
  line-height: 1.25;
}

body.page-services .service-block ul {
  width: 100%;
}

body.page-services .service-block li {
  padding: 8px 0 8px 18px;
}

body.page-services section.structure {
  padding-block: clamp(72px, 8vw, 104px);
}

body.page-services .structure-grid {
  gap: 16px;
  background: transparent;
  border: none;
  width: 100%;
  margin-bottom: 32px;
}

body.page-services .structure-item {
  min-width: 0;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  transition:
    border-color 280ms var(--ease),
    box-shadow 280ms var(--ease),
    background-color 280ms var(--ease);
}

body.page-services .structure-item:hover,
body.page-services .structure-item:focus-within {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  background: var(--white);
}

body.page-services .structure-item h4 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.3;
  margin-bottom: 10px;
}

body.page-services .structure-item p {
  font-size: 14.5px;
  line-height: 1.65;
}

body.page-services .structure-note {
  max-width: min(72ch, 100%);
}

body.page-services section.final-cta {
  padding-block: clamp(88px, 10vw, 120px);
}

body.page-services .final-cta h2 {
  max-width: min(36ch, 100%);
}

/* ---------- Reveal stagger (uses shared .js-reveal rules) ---------- */
body.page-services .primary-service > [data-reveal]:nth-child(1) { --d: 0ms; }
body.page-services .primary-service > [data-reveal]:nth-child(2) { --d: 70ms; }
body.page-services .primary-service > [data-reveal]:nth-child(3) { --d: 140ms; }
body.page-services .primary-service > [data-reveal]:nth-child(4) { --d: 210ms; }
body.page-services .primary-service > [data-reveal]:nth-child(5) { --d: 280ms; }

body.page-services .on-white > .service-block:nth-child(2) { --d: 0ms; }
body.page-services .on-white > .service-block:nth-child(3) { --d: 60ms; }
body.page-services .on-white > .service-block:nth-child(4) { --d: 120ms; }
body.page-services .on-white > .service-block:nth-child(5) { --d: 180ms; }
body.page-services .on-white > .service-block:nth-child(6) { --d: 240ms; }

body.page-services .structure-grid > [data-reveal]:nth-child(1) { --d: 0ms; }
body.page-services .structure-grid > [data-reveal]:nth-child(2) { --d: 70ms; }
body.page-services .structure-grid > [data-reveal]:nth-child(3) { --d: 140ms; }
body.page-services .structure-grid > [data-reveal]:nth-child(4) { --d: 210ms; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  body.page-services .structure-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  body.page-services .page-hero h1 {
    max-width: 100%;
  }

  body.page-services .primary-grid {
    gap: 0;
  }

  body.page-services .service-block {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 24px 18px;
  }

  body.page-services .structure-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  body.page-services .structure-item {
    padding: 24px 20px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html.js-reveal body.page-services [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
