/* ============================================================
   APTR GLOBAL — Services v2
   Card grid + service detail modal.
   Loads AFTER styles.css + homepage-v2.css + pages-v2.css.
   Brand-locked: navy #00276A · blue #305FB0 · amber #FFA600.
   ============================================================ */

/* ---------- services intro head ---------- */
.svc-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.svc-page-head .section-head { max-width: 620px; }
.svc-page-head .shp-note { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.svc-page-head .shp-note .shp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; }

/* ---------- region toggle (segmented control) ---------- */
.svc-region-toggle {
  display: inline-flex; align-items: center;
  background: #f0f2f7; border-radius: 100px;
  padding: 4px; gap: 2px;
  margin-top: clamp(24px, 3vw, 36px);
}
.srt-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: 100px; border: none;
  background: transparent;
  font-size: 13.5px; font-weight: 600; color: #6b7280;
  cursor: pointer; transition: background .2s ease, color .2s ease, box-shadow .2s ease;
  font-family: var(--ff-text); white-space: nowrap;
}
.srt-pill:hover:not(.active) { color: var(--navy); background: rgba(255,255,255,.6); }
.srt-pill.active {
  background: var(--navy); color: #fff;
  box-shadow: 0 2px 8px rgba(0,39,106,.22);
}
.srt-flag { font-size: 15px; line-height: 1; }

/* ============================================================
   SERVICE CARD GRID
   ============================================================ */
.svc-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px;
  margin-top: clamp(16px, 2vw, 24px); position: relative; z-index: 2;
}

.svc-cat { margin-top: clamp(40px, 5vw, 64px); }
.svc-cat:first-of-type { margin-top: clamp(20px, 3vw, 32px); }
.svc-cat-heading {
  font-size: clamp(18px, 1.6vw, 21px); font-weight: 700; color: var(--navy);
  font-family: var(--ff-text);
}

.svc-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 14px 18px; min-height: 0; cursor: pointer;
  font-family: var(--ff-text); color: var(--ink);
  transition: transform .42s var(--ease), box-shadow .42s var(--ease), border-color .42s var(--ease);
}
/* cursor-following spotlight */
.svc-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(48,95,176,0.10), transparent 60%);
  transition: opacity .4s var(--ease);
}
/* top accent bar */
.svc-card::after {
  content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 0;
  background: var(--amber); transition: width .45s var(--ease); z-index: 3;
}
.svc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.svc-card:hover::before { opacity: 1; }
.svc-card:hover::after { width: 100%; }
.svc-card:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--blue-tint), var(--shadow-md); border-color: var(--blue); }

.svc-card .sc-ic {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  background: var(--blue-tint); color: var(--blue); display: grid; place-items: center;
  position: relative; z-index: 2;
  transition: background .42s var(--ease), color .42s var(--ease), transform .42s var(--ease);
}
.svc-card .sc-ic svg { width: 22px; height: 22px; }
.svc-card:hover .sc-ic { background: var(--navy); color: var(--amber); transform: rotate(-6deg); }

.svc-card h3 {
  font-size: 14.5px; line-height: 1.4; color: var(--navy); margin-top: 12px;
  position: relative; z-index: 2;
}

/* ---------- CTA band (full width, below the tile groups) ---------- */
.svc-cta-band {
  position: relative; overflow: hidden; width: 100%;
  display: flex; align-items: center; gap: 22px; text-align: left;
  margin-top: clamp(32px, 4vw, 52px);
  background: linear-gradient(165deg, var(--navy) 0%, #001b4a 100%);
  border: none; border-radius: var(--radius-xl);
  padding: 26px 30px; cursor: pointer;
  font-family: var(--ff-text); color: #fff;
  transition: transform .42s var(--ease), box-shadow .42s var(--ease);
}
.svc-cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 80%) var(--my, 0%), rgba(255,166,0,0.18), transparent 60%);
  transition: opacity .4s var(--ease);
}
.svc-cta-band:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.svc-cta-band:hover::before { opacity: 1; }
.svc-cta-band:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--blue-tint), var(--shadow-md); }
.svc-cta-band .cc-blob {
  position: absolute; right: -70px; bottom: -80px; width: 200px; height: 200px; z-index: 0;
  border-radius: 46% 54% 58% 42% / 52% 44% 56% 48%; background: var(--amber); opacity: .9;
  transition: transform .5s var(--ease);
}
.svc-cta-band:hover .cc-blob { transform: scale(1.12) rotate(-8deg); }
.svc-cta-band .ctb-ic {
  width: 52px; height: 52px; border-radius: 15px; flex: none;
  background: rgba(255,255,255,0.12); color: var(--amber);
  display: grid; place-items: center; position: relative; z-index: 2;
}
.svc-cta-band .ctb-ic svg { width: 25px; height: 25px; }
.svc-cta-band .ctb-copy { flex: 1; min-width: 240px; position: relative; z-index: 2; }
.svc-cta-band h3 { font-size: clamp(18px, 1.8vw, 21px); color: #fff; }
.svc-cta-band p { font-size: 14.5px; line-height: 1.55; color: rgba(255,255,255,0.74); margin-top: 6px; }
.svc-cta-band .ctb-go {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-display); font-weight: 600; font-size: 14.5px; color: var(--amber);
  white-space: nowrap; position: relative; z-index: 2;
}
.svc-cta-band .ctb-go .sc-arr {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.3);
  display: grid; place-items: center; color: #fff;
  transition: background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), transform .4s var(--ease);
}
.svc-cta-band .ctb-go .sc-arr svg { width: 15px; height: 15px; }
.svc-cta-band:hover .ctb-go { color: #fff; }
.svc-cta-band:hover .ctb-go .sc-arr { background: var(--amber); border-color: var(--amber); color: var(--navy); transform: rotate(-45deg); }

/* ============================================================
   SERVICE DETAIL MODAL
   ============================================================ */
.modal-root {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(16px, 4vw, 56px) clamp(14px, 4vw, 40px);
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s var(--ease), visibility .35s;
}
.modal-root.open { opacity: 1; visibility: visible; pointer-events: auto; }

.modal-overlay {
  position: fixed; inset: 0;
  background: radial-gradient(120% 120% at 70% -10%, rgba(10,63,160,0.55), rgba(0,18,48,0.66));
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
}

.modal {
  position: relative; z-index: 2; width: min(900px, 100%); margin: auto;
  background: #fff; border-radius: var(--radius-xl);
  box-shadow: 0 50px 100px -30px rgba(0,18,48,0.6);
  padding: clamp(28px, 3.4vw, 46px);
  transform: translateY(26px) scale(.965); opacity: 0;
  transition: transform .5s var(--ease), opacity .4s var(--ease);
  overflow: hidden;
}
.modal-root.open .modal { transform: translateY(0) scale(1); opacity: 1; }
/* soft amber corner accent */
.modal .modal-glow {
  position: absolute; top: -90px; right: -90px; width: 240px; height: 240px;
  border-radius: 50%; background: var(--amber); opacity: .1; filter: blur(20px); pointer-events: none; z-index: 0;
}

.modal-close {
  position: absolute; top: 20px; right: 20px; z-index: 5;
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line);
  background: #fff; color: var(--navy); cursor: pointer; display: grid; place-items: center;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .35s var(--ease);
}
.modal-close svg { width: 18px; height: 18px; }
.modal-close:hover { background: var(--navy); color: var(--amber); border-color: var(--navy); transform: rotate(90deg); }
.modal-close:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--blue-tint); }

.modal-head { display: flex; align-items: center; gap: 20px; position: relative; z-index: 2; padding-right: 48px; }
.modal-ic {
  width: 66px; height: 66px; border-radius: 18px; flex: none;
  background: var(--navy); color: var(--amber); display: grid; place-items: center;
  box-shadow: var(--shadow-md);
}
.modal-ic svg { width: 31px; height: 31px; }
.modal-head .mh-kicker { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); }
.modal-head h2 { font-size: clamp(25px, 2.8vw, 35px); color: var(--navy); margin-top: 7px; line-height: 1.08; }

.modal-lede {
  position: relative; z-index: 2; margin-top: 22px;
  font-size: clamp(16.5px, 1.6vw, 19px); line-height: 1.55; color: var(--ink); font-weight: 500;
  max-width: 60ch;
}

.modal-body {
  position: relative; z-index: 2; margin-top: 26px;
  display: grid; grid-template-columns: 1fr 0.86fr; gap: clamp(24px, 3vw, 40px); align-items: start;
}
.modal-main p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.7; }
.modal-main p + p { margin-top: 14px; }
.modal-ideal { margin-top: 24px; }
.modal-ideal .mi-label,
.modal-side h4 {
  font-family: var(--ff-text); font-weight: 700; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-2); margin: 0 0 14px;
}
.modal-ideal .mi-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-ideal .mi-chips span {
  font-size: 13px; font-weight: 600; color: var(--navy); background: var(--paper);
  border: 1px solid var(--line); padding: 7px 14px; border-radius: 100px;
}

.modal-side {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 26px 24px;
}
.modal-side h4 { color: var(--navy); }
.modal-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.modal-side li {
  display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink); line-height: 1.4;
  opacity: 0; transform: translateY(8px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.modal-root.open .modal-side li { opacity: 1; transform: none; }
.modal-root.open .modal-side li:nth-child(1) { transition-delay: .16s; }
.modal-root.open .modal-side li:nth-child(2) { transition-delay: .22s; }
.modal-root.open .modal-side li:nth-child(3) { transition-delay: .28s; }
.modal-root.open .modal-side li:nth-child(4) { transition-delay: .34s; }
.modal-root.open .modal-side li:nth-child(5) { transition-delay: .40s; }
.modal-root.open .modal-side li:nth-child(6) { transition-delay: .46s; }
.modal-side .mk {
  flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--blue-tint);
  display: grid; place-items: center; color: var(--blue); margin-top: 1px;
}
.modal-side .mk svg { width: 14px; height: 14px; }

.modal-foot {
  position: relative; z-index: 2; margin-top: clamp(26px, 3vw, 36px); padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px 22px; flex-wrap: wrap;
}
.modal-foot .mf-phone { display: inline-flex; align-items: center; gap: 11px; margin-left: auto; }
.modal-foot .mf-phone .mfp-ic { width: 42px; height: 42px; border-radius: 50%; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; flex: none; }
.modal-foot .mf-phone .mfp-ic svg { width: 19px; height: 19px; }
.modal-foot .mf-phone .mfp-num { font-family: var(--ff-display); font-weight: 700; font-size: 16px; color: var(--navy); }
.modal-foot .mf-phone .mfp-lbl { font-size: 12px; color: var(--muted); }

/* ---------- engagement process tweak (uses .steps) ---------- */
.svc-process .section-head { max-width: 600px; }
.steps .step::after {
  content: ""; position: absolute; top: 50px; right: -9px; width: 18px; height: 2px;
  background: var(--line); display: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .modal-body { grid-template-columns: 1fr; }
  .modal-side { order: -1; }
}
@media (max-width: 620px) {
  .svc-cards { grid-template-columns: repeat(2, 1fr); }
  .svc-cta-band { flex-wrap: wrap; padding: 24px; }
  .modal-foot .mf-phone { margin-left: 0; }
}

/* ---------- motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  .modal { transition: opacity .2s; transform: none; }
  .modal-root.open .modal { transform: none; }
  .modal-side li { opacity: 1 !important; transform: none !important; transition: none; }
  .svc-card, .svc-card::before, .svc-card::after,
  .svc-cta-band, .svc-cta-band::before { transition: none; }
}
