/* ==========================================================================
   JBT — Services: three service cards beside the solved Rubik's cube
   (homepage + Services page). The cube and the section frame come from
   services.css; this file styles the card slider that replaces the old
   four-discipline copy. Card look: white, 1.5px ink outline, 18px corners,
   a bar in the service's colour along the top.
   ========================================================================== */
.svc { width: min(520px, 42vw); }
.svc .svx__title { margin-top: 18px; font-size: clamp(36px, 3.4vw, 56px); }
.svc__lede { margin-top: 14px; font-size: clamp(15px, 1.1vw, 16.5px); line-height: 1.55; color: #3a3a38; max-width: 46ch; }

/* Tabs: one per card, in its colour — where you are, and a way to jump */
.svc__tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; }
.svc__tab {
  appearance: none; border: 0; background: none; padding: 12px 0 0; cursor: pointer; text-align: left; position: relative;
  font: 600 11px/1.2 "Instrument Sans", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #8a877f; transition: color .3s;
}
.svc__tab::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--c) 24%, #e3dfd6); transition: background .4s, height .3s, top .3s; }
.svc__tab:hover { color: #111; }
.svc__tab.is-active { color: #111; }
.svc__tab.is-active::before { background: var(--c); height: 6px; top: -1px; }
.svc__tab:focus-visible { outline: 2px solid #111; outline-offset: 4px; border-radius: 4px; }

/* The slider: one card in view; the rest wait off to the side */
.svc__viewport { margin-top: 18px; overflow: hidden; border-radius: 20px; padding: 4px 2px 14px; margin-left: -2px; margin-right: -2px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.svc__viewport:active { cursor: grabbing; }
.svc__track { display: flex; transition: transform .6s cubic-bezier(.22, 1, .36, 1); will-change: transform; }
.svc__track.is-dragging { transition: none; }
.svc__card {
  position: relative; flex: 0 0 100%; display: flex; flex-direction: column; min-height: 100%;
  padding: 26px 26px 24px; background: #fff; border: 1.5px solid #111; border-radius: 18px; color: #111;
  opacity: .35; transform: scale(.97); transition: opacity .5s, transform .6s cubic-bezier(.22, 1, .36, 1), box-shadow .35s;
  -webkit-user-drag: none;
}
.svc__card.is-active { opacity: 1; transform: none; box-shadow: 0 30px 50px -32px rgba(17, 17, 17, .45); }
.svc__card::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1.5px; height: 6px; border-radius: 0 0 5px 5px; background: var(--c); }
.svc__num { display: flex; align-items: center; gap: 10px; font: 500 12px/1 "Instrument Sans", sans-serif; letter-spacing: .16em; color: #6b6a66; }
.svc__num i { width: 11px; height: 11px; border-radius: 2px; background: var(--c); }
.svc__card h3 { margin-top: 18px; font-size: clamp(34px, 2.8vw, 46px); }
.svc__card p { margin-top: 12px; font-size: clamp(15px, 1.15vw, 17px); line-height: 1.55; color: #3a3a38; }
.svc__go { margin-top: auto; padding-top: 20px; font: 600 14px/1 "Instrument Sans", sans-serif; letter-spacing: .04em; display: inline-flex; align-items: center; gap: 8px; }
.svc__go::after { content: "→"; transition: transform .3s; }
.svc__card:hover .svc__go::after { transform: translateX(4px); }
.svc__card:focus-visible { outline: 2px solid #111; outline-offset: 4px; }

/* Arrows + counter */
.svc__nav { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.svc__arrow {
  flex: none; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid #111; background: #fff; color: #111; cursor: pointer;
  font-size: 15px; display: inline-grid; place-items: center; transition: background .25s, color .25s, border-color .25s, transform .25s;
  box-shadow: 0 10px 24px -14px rgba(17, 17, 17, .5);
}
.svc__arrow:hover { background: var(--svx-accent, #111); border-color: var(--svx-accent, #111); color: #fff; transform: translateY(-2px); }
.svc__arrow:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
.svc__meta { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.svc__count { font: 600 13px/1 "Instrument Sans", sans-serif; letter-spacing: .14em; }
.svc__hint { font-size: 12.5px; color: #6b6a66; }
.svc__hint kbd { font: 600 11px/1 "Instrument Sans", sans-serif; padding: 2px 5px; border: 1px solid #b9b5ab; border-bottom-width: 2px; border-radius: 4px; background: #fff; color: #111; }
.svc__hint-touch { display: none; }


/* Shorter laptop screens */
@media (min-width: 900px) and (max-height: 800px) {
  .svc .svx__title { margin-top: 12px; font-size: clamp(32px, 3vw, 46px); }
  .svc__lede { display: none; }
  .svc__tabs { margin-top: 18px; }
  .svc__card { padding: 22px 22px 20px; }
  .svc__card h3 { margin-top: 12px; font-size: clamp(30px, 2.4vw, 38px); }
  .svc__card p { font-size: 15px; }
  .svc__arrow { width: 46px; height: 46px; }
}
@media (min-width: 1240px) { .svc { right: calc(var(--gutter) + 70px); } }

/* Phones: cube on top, the card underneath; swipe the card to turn the cube */
@media (max-width: 899px) {
  .svc { width: auto; padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .svc .svx__eyebrow { display: none; }
  .svc .svx__title { margin-top: 0; font-size: clamp(26px, 7.4vw, 32px); }
  .svc__lede { display: none; }
  .svc__tabs { margin-top: 12px; gap: 8px; }
  .svc__tab { font-size: 10px; letter-spacing: .06em; padding-top: 10px; }
  .svc__viewport { margin-top: 12px; padding-bottom: 10px; cursor: auto; }
  /* the next card peeks in from the right, so it's clear there's more to swipe */
  .svc__track { gap: 10px; }
  .svc__card { flex-basis: 88%; padding: 20px 18px 18px; transform: none; }
  .svc__card:not(.is-active) { opacity: .45; }
  .svc__card h3 { margin-top: 10px; font-size: 30px; }
  .svc__card p { margin-top: 8px; font-size: 14.5px; line-height: 1.5; }
  .svc__go { padding-top: 14px; }
  .svc__nav { margin-top: 4px; }
  .svc__arrow { width: 44px; height: 44px; }
  .svc__hint { font-size: 11.5px; }
  .svc__hint-keys { display: none; }
  .svc__hint-touch { display: inline; }
}
@media (max-width: 899px) and (max-height: 760px) {
  .svc__card p { font-size: 13.5px; }
  .svc__card h3 { font-size: 26px; }
}

/* No 3D, or no JavaScript: all three cards listed one under another */
html:not(.js) .svc__track { flex-direction: column; gap: 16px; transform: none !important; }
html:not(.js) .svc__card { opacity: 1; transform: none; }
html:not(.js) .svc__nav, html:not(.js) .svc__tabs { display: none; }
@media (prefers-reduced-motion: reduce) { .svc__track, .svc__card, .svc__tab::before { transition: none; } }
