/* RIDGE adaptation of Website Elements / Scroll collection. */
@property --service-glow-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.service-scroll {
  --scroll-gutter: clamp(20px, 3.5vw, 64px);
  --scroll-gap: 22px;
  --scroll-card-width: clamp(320px, 28vw, 400px);
  position: relative;
  margin: var(--ridge-frame-gutter);
  border-radius: var(--ridge-frame-radius);
  color: #10293d;
}
.service-scroll [hidden] { display: none !important; }
.service-scroll__stage {
  padding: 28px 0 22px;
  border-radius: inherit;
  overflow: clip;
  background: #dce8f6 url('./assets/services/scroll-background.webp') center / cover no-repeat;
}
.service-scroll[data-pinned='true'] .service-scroll__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.service-scroll__top, .service-scroll__footer {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-inline: var(--scroll-gutter);
}
.service-scroll__top { justify-content: space-between; margin-bottom: 16px; }
.service-scroll__top .eyebrow { margin: 0; color: #435769; }
.service-scroll__skip { color: #435769; font-size: 13px; min-height: 44px; display: inline-flex; align-items: center; }
.service-scroll__skip:empty { display: none; }
.service-scroll__top .eyebrow, .service-scroll__skip:not(:empty) { padding: 10px 14px; background: #edf4fdf2; border-radius: 99px; }
.service-scroll__window {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #006be5 transparent;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--scroll-gutter);
  overscroll-behavior-x: contain;
}
.service-scroll[data-pinned='true'] .service-scroll__window { overflow: clip; scroll-snap-type: none; }
.service-scroll__window:focus-visible { outline: 3px solid #006be5; outline-offset: -3px; }
.service-scroll__track {
  position: relative;
  width: max-content;
  display: flex;
  align-items: stretch;
  gap: var(--scroll-gap);
  padding: 7px var(--scroll-gutter) 12px;
}
.service-scroll[data-pinned='true'] .service-scroll__track { will-change: transform; }
.service-scroll__card {
  position: relative;
  flex: 0 0 var(--scroll-card-width);
  width: var(--scroll-card-width);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #315472;
  border-radius: 22px;
  background: #081723;
  color: #fff;
  scroll-snap-align: start;
  transition: border-color .25s;
}
.service-scroll__card:hover, .service-scroll__card:focus-within { border-color: #24b5ff; }
.service-scroll__media { height: clamp(180px, 27svh, 280px); overflow: hidden; flex: none; position: relative; }
.service-scroll__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 65%, #081723); pointer-events: none; }
.service-scroll__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 53%; transform: scale(1.04); transition: transform 1s cubic-bezier(.16,1,.3,1); }
.service-scroll__card:hover .service-scroll__media img { transform: scale(1); }
.service-scroll__body { padding: 20px 28px 26px; display: flex; flex-direction: column; flex: 1; }
.service-scroll__label { color: #65ceff; font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
.service-scroll__card h3 { color: #fff; font-size: clamp(25px, 2vw, 29px); line-height: 1.13; margin: 0 0 16px; text-wrap: balance; }
.service-scroll__body > p:not(.service-scroll__label) { font-size: 16px; line-height: 1.55; color: #c3d1df; margin-bottom: 24px; }
.service-scroll__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: auto;
  padding: 13px 16px;
  border: 1px solid #4d90bf;
  border-radius: 12px;
  background: #12344d;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.service-scroll__link:hover { background: #1b4c6e; border-color: #65ceff; color: #fff; text-decoration: none; }
.service-scroll__card a:focus-visible { outline: 3px solid #65ceff; outline-offset: 4px; }
.service-scroll__intro {
  padding: 34px 30px 30px;
  background: radial-gradient(ellipse at 100% 105%, #006be577, transparent 52%), linear-gradient(135deg, #102f4c, #081723 60%);
  justify-content: center;
}
.service-scroll__intro::before { content: ''; position: absolute; width: 280px; height: 280px; border: 1px solid #21618b66; border-radius: 50%; right: -180px; top: -140px; pointer-events: none; }
/* A masked highlight makes one quiet lap around the edge, leaving the text untouched. */
.service-scroll__intro::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 2px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: conic-gradient(from var(--service-glow-angle), transparent 0deg 265deg, #168ce566 295deg, #54ccff 325deg, #d7f5ff 340deg, transparent 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  filter: drop-shadow(0 0 3px #36b5ff88);
}
.service-scroll__intro.is-glowing::after { animation: service-intro-glow 2.8s linear 1; }
@keyframes service-intro-glow {
  0% { --service-glow-angle: 0deg; opacity: 0; }
  12%, 80% { opacity: .9; }
  100% { --service-glow-angle: 360deg; opacity: 0; }
}
.service-scroll__intro h2 { color: #fff; font-size: clamp(36px, 3.1vw, 45px); line-height: 1.08; margin: 20px 0 24px; letter-spacing: -.04em; }
.service-scroll__intro h2 span { color: #29b5ff; }
.service-scroll__intro > p:not(.service-scroll__label) { font-size: 17px; line-height: 1.6; color: #c3d1df; margin-bottom: 32px; }
.service-scroll__intro .service-scroll__link { background: #006be5; border: 0; border-radius: 16px; padding: 16px 20px; }
.service-scroll__intro .service-scroll__link:hover { background: #005cc6; color: #fff; }
.service-scroll__footer { margin-top: 12px; }
.service-scroll__hint { font-size: 13px; color: #24425c; margin: 0; padding: 8px 12px; border-radius: 99px; background: #edf4fdf2; }
.service-scroll__meter { flex: 1; height: 2px; background: #becbd8; }
.service-scroll__meter span { display: block; height: 100%; background: #006be5; transform: scaleX(0); transform-origin: left; }
.service-scroll__nav { display: flex; gap: 8px; }
.service-scroll__nav button { min-height: 46px; padding: 10px 16px; border-radius: 99px; border: 1px solid #99afc3; background: #edf4fdf2; color: #10293d; font-size: 13px; font-weight: 700; }
.service-scroll__nav button:hover:not(:disabled) { background: #006be5; color: #fff; border-color: #006be5; }
.service-scroll__nav button:disabled { opacity: .35; cursor: default; }
@media (max-width: 800px) {
  .service-scroll { --scroll-gutter: 20px; --scroll-card-width: min(84vw, 380px); --scroll-gap: 14px; }
  .service-scroll__stage { padding-top: 14px; }
  .service-scroll__media { height: 220px; }
  .service-scroll__body { padding: 18px 24px 24px; }
  .service-scroll__intro { padding: 28px 26px; }
  .service-scroll__intro h2 { font-size: 38px; }
  .service-scroll__footer { gap: 12px; flex-wrap: wrap; }
  .service-scroll__hint { font-size: 12px; }
  .service-scroll__meter { min-width: 32px; }
  .service-scroll__nav { margin-left: auto; }
}
@media (max-width: 360px) {
  .service-scroll { --scroll-card-width: 86vw; --scroll-gutter: 16px; }
  .service-scroll__body { padding-inline: 20px; }
  .service-scroll__intro { padding-inline: 22px; }
  .service-scroll__intro h2 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .service-scroll *, .service-scroll *::after { transition: none !important; }
  .service-scroll__media img { transform: none; }
  .service-scroll__intro.is-glowing::after { animation: none; opacity: 0; }
}
@media print {
  .service-scroll { height: auto !important; }
  .service-scroll .service-scroll__stage { position: static !important; height: auto !important; }
  .service-scroll .service-scroll__window { overflow: visible !important; }
  .service-scroll__track { width: auto; flex-wrap: wrap; transform: none !important; }
  .service-scroll__card { break-inside: avoid; }
  .service-scroll__top, .service-scroll__footer { display: none; }
}
