/* OptiPath "Services" page: one service per screen. Sits on top of home.css (type, buttons, FAQ).
   Everything specific to this page is prefixed sp-.

   After the headline, each service gets a full screen to itself: its name, one sentence, a button,
   and one large real example. The screens change color and swap sides as you go, like turning
   the pages of a magazine. */

/* ---------- Headline and the list of services ---------- */

.sp-hero { display: grid; align-items: center; min-height: min(72vh, 700px); padding: calc(80px + clamp(2.5rem, 5vw, 4.5rem)) 0 clamp(3rem, 6vw, 5rem); text-align: center; color: #fff; }
.sp-hero .hx-h1 { font-size: clamp(2.6rem, 6vw, 5.25rem); }
.sp-sub { max-width: 34rem; margin: clamp(1.25rem, 2.2vw, 1.75rem) auto 0 !important; font-size: clamp(1.0625rem, 1.4vw, 1.3rem); line-height: 1.5; color: rgba(255, 255, 255, 0.7); }
/* The services by name, as one plain line with a thin stroke between them. Choosing one goes to its screen. */
.sp-index { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.55rem 0; max-width: 76rem; margin: clamp(2rem, 4vw, 3.25rem) auto 0; padding: 0; list-style: none; }
.sp-index li { display: flex; align-items: center; }
.sp-index li + li::before { content: ""; width: 1px; height: 1.05em; margin: 0 clamp(0.8rem, 1.5vw, 1.4rem); background: rgba(255, 255, 255, 0.28); transform: rotate(18deg); }
.sp-index a { position: relative; padding: 0.3rem 0; font-family: var(--font-heading); font-size: clamp(1rem, 1.3vw, 1.2rem); font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; color: rgba(255, 255, 255, 0.78); transition: color 0.3s; }
.sp-index a::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; background: var(--hx-sky); transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--hx-ease); }
.sp-index a:hover, .sp-index a:focus-visible { color: #fff; }
.sp-index a:hover::after, .sp-index a:focus-visible::after { transform: scaleX(1); }

/* ---------- A screen ---------- */

.sp-screen { display: grid; align-items: center; min-height: min(100vh, 940px); padding: clamp(5rem, 9vw, 8rem) 0; overflow: hidden; scroll-margin-top: 0; }
.sp-light { background: #fff; color: var(--hx-text); }
.sp-tint { background: var(--hx-tint); color: var(--hx-text); }
.sp-dark { background: radial-gradient(110% 80% at 85% 10%, #15275a 0%, #0b1430 45%, var(--hx-night) 100%); color: #fff; }
.sp-blue { background: radial-gradient(120% 110% at 100% 0%, #2f6bff 0%, #1d4ed8 42%, #112a78 100%); color: #fff; }

.sp-grid { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); align-items: center; gap: clamp(2.5rem, 6vw, 6.5rem); }
.is-flip .sp-text { order: 2; }
.is-flip .sp-grid { grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.78fr); }
.sp-text h2 { font-size: clamp(2.25rem, 4.3vw, 3.9rem); font-weight: 700; line-height: 1.03; letter-spacing: -0.04em; color: inherit; }
.sp-text p { max-width: 27rem; margin-top: clamp(1.1rem, 2vw, 1.6rem); font-size: clamp(1.0625rem, 1.4vw, 1.3rem); line-height: 1.55; color: var(--hx-mute); }
.sp-dark .sp-text p { color: rgba(255, 255, 255, 0.72); }
.sp-text .hx-btn { margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.sp-vis { min-width: 0; }
.sp-note { margin-top: 1rem !important; font-size: 0.9375rem; color: var(--hx-mute); }
.sp-dark .sp-note { color: rgba(255, 255, 255, 0.6); }

/* ---------- The example on each screen ---------- */

/* A real site, large. As the screen passes, the site scrolls inside its frame. */
.sp-shot { aspect-ratio: 16 / 10.6; overflow: hidden; border: 1px solid var(--hx-line); border-radius: clamp(14px, 1.6vw, 22px); background: #0b1220; box-shadow: 0 60px 110px -50px rgba(12, 20, 36, 0.55); }
.sp-dark .sp-shot { border-color: rgba(255, 255, 255, 0.16); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.05), 0 70px 130px -50px rgba(0, 0, 0, 0.85); }
.sp-shot img { display: block; width: 100%; height: auto; will-change: transform; }

.sp-logos { display: grid; gap: clamp(10px, 1.2vw, 18px); }
.sp-logos-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-logos-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sp-logo { position: relative; display: block; aspect-ratio: 1 / 1.05; border-radius: clamp(14px, 1.6vw, 22px); background: var(--c); box-shadow: 0 40px 70px -40px rgba(12, 20, 36, 0.5); }
.sp-logos-2 .sp-logo { aspect-ratio: 1 / 0.8; }
.sp-logo img { position: absolute; inset: 22% 14%; display: block; width: 72%; height: 56%; object-fit: contain; }
.sp-logos-2 .sp-logo img { inset: 20% 22%; width: 56%; height: 60%; }

.sp-goog .hx-goog { width: 100%; max-width: none; border: 1px solid var(--hx-line); opacity: 1; transform: none; box-shadow: 0 60px 110px -50px rgba(12, 20, 36, 0.55); }
.sp-vis.is-in .hx-goog-hit { background: #f3f7ff; box-shadow: 0 0 0 1.5px #1a73e8; transition-delay: 0.5s; }
.sp-vis.is-in .hx-goog-ai { background: #f3f7ff; box-shadow: 0 0 0 1.5px #1a73e8; transition-delay: 1.5s; }

.sp-gbp { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 4vw, 4rem); }
.sp-rating { display: grid; justify-items: center; gap: 0.35rem; }
.sp-rating-g { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 0.4rem; border-radius: 50%; background: #fff; }
.sp-rating-g .hx-g { width: 27px; height: 27px; }
.sp-rating strong { font-family: var(--font-heading); font-size: clamp(4rem, 7.4vw, 6.5rem); font-weight: 700; line-height: 0.92; letter-spacing: -0.055em; color: #fff; }
.sp-rating .hx-stars { margin: 0; font-size: clamp(1.4rem, 2vw, 1.9rem); letter-spacing: 0.14em; }
.sp-reviews { display: grid; gap: 0.9rem; }
.sp-reviews .hx-rcard { width: auto; gap: 0.8rem; padding: 1.3rem 1.5rem; border-radius: 20px; box-shadow: none; }
.sp-reviews .hx-rcard blockquote { display: -webkit-box; overflow: hidden; font-size: 1rem; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; }

.sp-doc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(0.9rem, 1.8vw, 1.5rem); padding-top: 1rem; }
.sp-doc .hx-art, .sp-doc .hx-cite { position: relative; top: auto; right: auto; bottom: auto; left: auto; width: auto; margin: 0; zoom: 1; opacity: 1; transform: none; box-shadow: 0 50px 90px -45px rgba(12, 20, 36, 0.5); }
.sp-doc .hx-cite { margin-top: clamp(2rem, 5vw, 4.5rem); }
.sp-doc mark { padding: 0.05em 0; background: linear-gradient(rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.2)) 0 0 / 0% 100% no-repeat; color: inherit; transition: background-size 1.1s cubic-bezier(0.3, 0, 0.2, 1); }
.sp-vis.is-in .hx-art mark { background-size: 100% 100%; transition-delay: 0.5s; }
.sp-vis.is-in .hx-cite mark { background-size: 100% 100%; transition-delay: 1.4s; }

/* ---------- The last screen: the free consultation, beside our Google reviews ---------- */

.sp-last { min-height: 0; padding: clamp(5rem, 9vw, 8rem) 0; }
.sp-blue .sp-text p { color: rgba(255, 255, 255, 0.85); }
/* Our Google rating on one line, with the reviews stacked under it. */
.sp-proof { display: block; color: inherit; }
.sp-score { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.25rem; }
.sp-score .sp-rating-g { width: 46px; height: 46px; margin: 0; }
.sp-score strong { font-family: var(--font-heading); font-size: clamp(2rem, 2.8vw, 2.6rem); font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: #fff; }
.sp-score .hx-stars { margin: 0; font-size: clamp(1.25rem, 1.7vw, 1.6rem); letter-spacing: 0.12em; }
.sp-score small { font-size: 1.0625rem; color: rgba(255, 255, 255, 0.85); }
.sp-blue .sp-reviews .hx-rcard { box-shadow: 0 30px 60px -34px rgba(4, 12, 40, 0.7); transition: transform 0.6s var(--hx-ease); }
.sp-proof:hover .hx-rcard { transform: translateY(-4px); }
.sp-proof:hover .hx-rcard:nth-child(2) { transition-delay: 0.06s; }

/* Examples that are white cards get a thin edge on the white and grey screens. */
.sp-light .sp-doc .hx-art, .sp-light .sp-doc .hx-cite, .sp-tint .sp-doc .hx-art, .sp-tint .sp-doc .hx-cite { border: 1px solid var(--hx-line); }
/* A navy logo tile on the navy screen needs an edge to stand off it. */
.sp-dark .sp-logo { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }

/* ---------- Phones and tablets ---------- */

@media (max-width: 899px) {
  .sp-hero { padding: calc(80px + 2.5rem) 0 2.75rem; }
  .sp-hero .hx-h1 { font-size: clamp(2.3rem, 10.5vw, 3.6rem); }
  .sp-sub { margin-left: 0 !important; }
  .sp-index { justify-content: flex-start; margin-top: 1.75rem; }
  /* When the names wrap onto several lines the strokes are dropped, so no line starts with one. */
  .sp-index { gap: 0.35rem 1.3rem; }
  .sp-index li + li::before { content: none; }
  .sp-index a { font-size: 0.9375rem; }
  .sp-screen { min-height: 0; padding: 4rem 0 4.25rem; }
  .sp-grid, .is-flip .sp-grid { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  /* On a phone the example comes first, then the name and the button. */
  .sp-vis { order: -1; }
  .is-flip .sp-text { order: 0; }
  .sp-text h2 { font-size: clamp(1.9rem, 8.6vw, 2.6rem); }
  .sp-text p { max-width: none; margin-top: 0.8rem; font-size: 1.0625rem; }
  .sp-text .hx-btn { margin-top: 1.4rem; }
  .sp-shot { aspect-ratio: 4 / 3.3; border-radius: 16px; }
  .sp-logo { border-radius: 14px; }
  .sp-goog .hx-goog { zoom: 0.84; }
  .sp-goog .hx-goog-ai { display: none; }
  .sp-gbp { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .sp-reviews .hx-rcard:nth-child(2) { display: none; }
  .sp-doc { grid-template-columns: minmax(0, 1fr); padding-top: 0.6rem; }
  .sp-doc .hx-art { display: none; }
  .sp-doc .hx-cite { margin-top: 0; }
  .sp-last { padding: 4rem 0 4.5rem; }
  .sp-last .sp-vis { order: 2; }
  .sp-hero { min-height: 0; text-align: left; }
}
