/* =====================================================================
   SINGLE SERVICE PAGE (single-service.php)
   Flexible content layouts from template-parts/service/.
   Uses the theme tokens from theme.css (:root).
   ===================================================================== */

.svc {
  position: relative;
  z-index: 2;
}

/* ---------- Section shell ---------- */
.svc-sec {
  position: relative;
  padding: 140px 48px;
  /* clip, not hidden: keeps position:sticky working for rail / loop. */
  overflow-x: clip;
}

/* First section clears the fixed topbar + nav. */
.svc > .svc-sec:first-child {
  padding-top: 210px;
}

.svc-sec--grid {
  background-image:
    linear-gradient(rgba(10, 15, 30, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 15, 30, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
}

.svc-sec--soft {
  background: linear-gradient(180deg, var(--bg-0), var(--bg-1));
}

.svc-sec--tint {
  background: linear-gradient(135deg, #f8fbfc 0%, #f2faf6 48%, #f7f5ff 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.svc-sec::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 22%, rgba(0, 150, 107, 0.05), transparent 22%),
    radial-gradient(circle at 88% 18%, rgba(124, 58, 237, 0.045), transparent 22%);
}

.svc-wrap {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
}

/* ---------- Section head ---------- */
.svc-head {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.svc-head .section-eyebrow {
  justify-content: center;
}

.svc-head .section-title {
  margin-top: 20px;
}

.svc-head__h1 {
  font-size: clamp(46px, 6.4vw, 104px);
  line-height: 0.98;
}

.svc-lead {
  margin: 28px auto 0;
  max-width: 820px;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.7;
  color: var(--ink-dim);
}

.svc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Buttons ---------- */
.svc-btns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.svc-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px 16px 28px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg-1);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 18px 42px -14px rgba(10, 18, 38, 0.5);
  transition: background 0.3s, border-color 0.3s, color 0.3s, transform 0.3s;
}

.svc-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

.svc-btn .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: transform 0.3s;
}

.svc-btn:hover .arrow {
  transform: translateX(3px);
}

.svc-btn--ghost {
  background: var(--bg-1);
  border-color: var(--line-2);
  color: var(--ink);
  box-shadow: none;
}

.svc-btn--ghost .arrow {
  background: var(--glass-2);
}

.svc-btn--ghost:hover .arrow {
  background: rgba(255, 255, 255, 0.18);
}

/* ---------- Floating shapes (hero / cta) ---------- */
.svc-shapes {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.svc-shape {
  position: absolute;
  filter: drop-shadow(0 22px 30px rgba(63, 83, 126, 0.13));
  will-change: transform;
}

.svc-shape--gem {
  width: 104px;
  height: 104px;
  background: linear-gradient(135deg, rgba(0, 150, 107, 0.75), rgba(10, 115, 212, 0.68) 55%, rgba(124, 58, 237, 0.6));
  clip-path: polygon(50% 0, 94% 27%, 82% 80%, 35% 100%, 0 58%, 14% 17%);
  animation: svcGem 9s ease-in-out infinite;
}

.svc-shape--diamond {
  width: 78px;
  height: 78px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.5), rgba(10, 115, 212, 0.48), rgba(0, 150, 107, 0.45));
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  animation: svcDiamond 11s ease-in-out infinite;
}

.svc-shape--ring {
  width: 88px;
  height: 88px;
  border: 14px solid rgba(0, 150, 107, 0.14);
  border-radius: 50%;
  animation: svcRing 10s ease-in-out infinite;
}

.svc-shape--a { left: 6%; top: 24%; }
.svc-shape--b { right: 8%; top: 22%; animation-delay: -3s; }
.svc-shape--c { left: 13%; bottom: 10%; animation-delay: -5s; }
.svc-shape--d { right: 14%; bottom: 12%; width: 72px; height: 72px; animation-delay: -7s; }

@keyframes svcGem {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-5deg); }
  50% { transform: translate3d(0, -18px, 0) rotate(7deg); }
}

@keyframes svcDiamond {
  0%, 100% { transform: translateY(0) rotate(35deg); }
  50% { transform: translateY(-15px) rotate(48deg) scale(1.05); }
}

@keyframes svcRing {
  0%, 100% { transform: translateY(0) rotateY(0); }
  50% { transform: translateY(-14px) rotateY(28deg); }
}

/* ---------- Shared card ---------- */
.svc-card,
.svc-panel {
  position: relative;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
  box-shadow: var(--shadow-soft);
  transition: opacity 1s, transform 0.6s cubic-bezier(.18, .89, .32, 1.28), box-shadow 0.4s, border-color 0.4s;
}

.svc-card:hover,
.svc-panel:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 150, 107, 0.28);
  box-shadow: var(--shadow-card);
}

.svc-card h3,
.svc-panel h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(21px, 1.7vw, 26px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 26px 0 12px;
}

.svc-card p,
.svc-panel p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-dim);
}

/* reveal-up sets transform; keep hover lift working once revealed. */
.svc-card.reveal-up.in:hover,
.svc-panel.reveal-up.in:hover {
  transform: translateY(-6px);
}

/* ---------- Problems: 4-up grid ---------- */
.svc-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 64px;
}

/* ---------- Comparison table ---------- */
.svc-compare {
  margin-top: 60px;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-1);
  box-shadow: var(--shadow-soft);
}

.svc-compare__head,
.svc-compare__row {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.15fr;
}

.svc-compare__head > div,
.svc-compare__row > div {
  padding: 22px 28px;
  border-right: 1px solid var(--line);
}

.svc-compare__head > div:last-child,
.svc-compare__row > div:last-child {
  border-right: 0;
}

.svc-compare__row {
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.6;
}

.svc-compare__head {
  background: var(--bg-0);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.svc-compare__head .is-ours {
  color: var(--accent);
  background: rgba(0, 150, 107, 0.05);
}

.svc-compare__row .is-criterion {
  font-weight: 600;
  color: var(--ink);
}

.svc-compare__row .is-traditional {
  color: var(--ink-dim);
}

.svc-compare__row .is-ours {
  display: flex;
  gap: 12px;
  background: rgba(0, 150, 107, 0.035);
  color: var(--ink);
  font-weight: 500;
}

.svc-compare__row .is-ours::before {
  content: '✓';
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Note box ---------- */
.svc-note {
  max-width: 1120px;
  margin: 28px auto 0;
  padding: 26px 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 249, 0.94));
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-dim);
}

.svc-note strong {
  color: var(--ink);
}

.svc-note p + p {
  margin-top: 14px;
}

/* ---------- Sub-services rail ----------
   Default: native swipe rail. service.js adds .is-pinned to turn vertical
   scroll into horizontal travel and sets the wrapper height. */
.svc-rail {
  position: relative;
  margin-top: 48px;
  /* Full-bleed: cards may run past the 1320px container. */
  margin-inline: calc(50% - 50vw);
}

.svc-rail__track {
  display: flex;
  gap: 20px;
  padding: 12px max(48px, calc(50vw - 660px)) 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.svc-rail__track::-webkit-scrollbar {
  display: none;
}

.svc-rail__card {
  flex: 0 0 clamp(320px, 31vw, 500px);
  scroll-snap-align: start;
}

.svc-rail__lead {
  color: var(--ink) !important;
  font-weight: 600;
  margin-bottom: 14px;
}

.svc-rail__progress {
  display: none;
}

.svc-rail.is-pinned .svc-rail__sticky {
  position: sticky;
  top: 110px;
  overflow: hidden;
}

.svc-rail.is-pinned .svc-rail__track {
  width: max-content;
  overflow: visible;
  scroll-snap-type: none;
  will-change: transform;
}

.svc-rail.is-pinned .svc-rail__progress {
  display: block;
  position: relative;
  height: 2px;
  max-width: 1320px;
  margin: 4px auto 0;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.svc-rail__progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: var(--grad-1);
  transform: scaleX(0);
  transform-origin: left center;
}

/* ---------- Scroll loop (step pills) ----------
   Without JS every step shows as active. service.js adds .is-ready and,
   above 900px, sets the pin styles inline (full-screen sticky stage +
   scroll runway) so cache / unused-CSS plugins cannot strip them. */
.svc-loop {
  position: relative;
}

.svc-loop__track {
  display: grid;
  grid-template-columns: repeat(var(--n, 5), 1fr);
  align-items: center;
  gap: 24px;
  min-height: 160px;
  margin-top: 40px;
  padding: 0 48px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(90deg, rgba(240, 250, 246, 0.92), rgba(246, 245, 255, 0.92));
  list-style: none;
}

.svc-loop__step {
  position: relative;
  transition: opacity 0.35s, transform 0.35s;
}

.svc-loop.is-ready .svc-loop__step {
  opacity: 0.45;
}

.svc-loop.is-ready .svc-loop__step.is-active {
  opacity: 1;
  transform: translateY(-3px);
}

/* Connector line in the gap between pills only. */
.svc-loop__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 150, 107, 0.45), rgba(10, 115, 212, 0.4));
}

.svc-loop__pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-1);
  box-shadow: 0 8px 24px rgba(35, 46, 72, 0.05);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}

.svc-loop__num {
  color: var(--accent);
}

/* Gradient ring on the active pill. */
.svc-loop__step.is-active .svc-loop__pill {
  border-color: transparent;
}

.svc-loop__step.is-active .svc-loop__pill::after {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1.5px;
  border-radius: 999px;
  background: var(--grad-1);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.svc-loop__step.is-active .svc-loop__pill {
  color: var(--accent);
}

.svc-loop__step:last-child.is-active .svc-loop__pill,
.svc-loop__step:last-child .svc-loop__num {
  color: var(--accent-3);
}

/* ---------- Split panels ---------- */
.svc-split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.svc-panel {
  overflow: hidden;
}

.svc-panel__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(0, 150, 107, 0.2);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(0, 150, 107, 0.09), rgba(255, 255, 255, 0.9));
  color: var(--accent);
}

.svc-panel:nth-child(even) .svc-panel__icon {
  border-color: rgba(124, 58, 237, 0.18);
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.08), rgba(255, 255, 255, 0.9));
  color: var(--accent-3);
}

.svc-panel__icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Step list ---------- */
.svc-steps {
  max-width: 1200px;
  margin: 56px auto 0;
  list-style: none;
}

.svc-step {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 34px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.svc-step:last-child {
  border-bottom: 1px solid var(--line);
}

.svc-step .svc-num {
  padding-top: 8px;
  line-height: 1.5;
}

.svc-step h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 8px;
}

.svc-step p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-dim);
}

/* ---------- Question cards ---------- */
.svc-qs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 56px;
}

.svc-q {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 86px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 251, 0.96));
  box-shadow: var(--shadow-soft);
  transition: opacity 1s, transform 0.6s, box-shadow 0.4s;
}

.svc-q.reveal-up.in:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.svc-q__icon {
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  height: 54px;
  border: 1px solid rgba(0, 150, 107, 0.22);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(0, 150, 107, 0.1), rgba(255, 255, 255, 0.88));
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
}

.svc-q strong {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

/* ---------- Pricing table ---------- */
.svc-price {
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--bg-1);
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
}

.svc-price table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.svc-price th,
.svc-price td {
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 15px;
  color: var(--ink-dim);
}

.svc-price th:last-child,
.svc-price td:last-child {
  border-right: 0;
}

.svc-price thead th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.svc-price tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
}

.svc-price thead th:first-child {
  text-align: left;
  color: var(--ink-mute);
}

.svc-price .is-hi {
  background: rgba(0, 150, 107, 0.04);
}

.svc-price .is-tick {
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.svc-price tr:last-child td,
.svc-price tr:last-child th {
  border-bottom: 0;
}

.svc-price__cta-row td {
  padding: 20px 16px 22px;
}

.svc-price__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-1);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
  transition: transform 0.25s, border-color 0.25s, background 0.25s, color 0.25s;
}

.svc-price__cta:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.svc-price__cta.is-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.svc-price__cta.is-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
}

/* ---------- FAQ accordion ---------- */
.svc-faq {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 18px;
  align-items: start;
  margin-top: 56px;
}

.svc-faq__item {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s, opacity 1s, transform 1s cubic-bezier(.18, .89, .32, 1);
}

.svc-faq__item.is-open {
  border-color: rgba(0, 150, 107, 0.32);
  box-shadow: var(--shadow-soft);
}

.svc-faq__btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: 92px;
  padding: 22px 26px;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.svc-faq__plus {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 400;
  transition: transform 0.35s, color 0.35s, border-color 0.35s;
}

.svc-faq__item.is-open .svc-faq__plus {
  transform: rotate(45deg);
  color: var(--accent);
  border-color: rgba(0, 150, 107, 0.32);
}

.svc-faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.42s cubic-bezier(.2, .7, .2, 1);
}

.svc-faq__answer > div {
  overflow: hidden;
}

.svc-faq__item.is-open .svc-faq__answer {
  grid-template-rows: 1fr;
}

.svc-faq__body {
  padding: 0 26px 24px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-dim);
}

.svc-faq__body p + p {
  margin-top: 12px;
}

.svc-faq__body strong {
  color: var(--ink);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .svc-cards,
  .svc-qs {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .svc-sec {
    padding: 100px 24px;
  }

  .svc > .svc-sec:first-child {
    padding-top: 150px;
  }

  .svc-split,
  .svc-faq {
    grid-template-columns: 1fr;
  }

  .svc-shapes {
    opacity: 0.5;
  }

  .svc-rail__track {
    padding-inline: 24px;
  }

  .svc-rail__card {
    flex-basis: 82vw;
  }

  .svc-rail.is-pinned .svc-rail__sticky {
    top: 90px;
  }

  .svc-compare {
    overflow-x: auto;
  }

  .svc-compare__inner {
    min-width: 760px;
  }

  .svc-compare__head > div,
  .svc-compare__row > div {
    padding: 18px 20px;
  }

  /* Loop: vertical list of pills, no pinning (head + list exceed a phone
     viewport). service.js skips the pin here and shows every step. */
  .svc-loop__track {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 28px 20px;
  }

  .svc-loop__step:not(:last-child)::after {
    top: 100%;
    left: 50%;
    width: 1px;
    height: 14px;
  }
}

@media (max-width: 600px) {
  .svc-sec {
    padding: 80px 16px;
  }

  .svc > .svc-sec:first-child {
    padding-top: 130px;
  }

  .svc-sec--grid {
    background-size: 44px 44px;
  }

  .svc-cards,
  .svc-qs {
    grid-template-columns: 1fr;
  }

  .svc-card,
  .svc-panel {
    padding: 26px;
  }

  .svc-step {
    grid-template-columns: 1fr;
    gap: 8px;
  }


  .svc-rail__track {
    padding-inline: 16px;
  }

  .svc-faq__btn {
    min-height: 80px;
    padding: 18px 20px;
  }

  .svc-faq__body {
    padding: 0 20px 20px;
  }

  .svc-shapes {
    opacity: 0.3;
  }

  .svc-btn {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .svc-shape {
    animation: none;
  }

  .svc-faq__answer {
    transition: none;
  }
}
