/* /services: "The map". A metro line of six capabilities, with a terminus at the end. Scoped under .pg-services. */
.pg-services {
  --sv-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sv-gutter: clamp(20px, 5vw, 48px);
  --sv-rule: rgba(var(--ink-rgb), 0.13);
  --sv-dot: 56px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(15px, 0.5vw + 13.8px, 17px);
  line-height: 1.6;
  padding-top: 104px;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
:where(.pg-services) *, :where(.pg-services) *::before, :where(.pg-services) *::after { box-sizing: border-box; }
:where(.pg-services) p, :where(.pg-services) h1, :where(.pg-services) h2, :where(.pg-services) h3, :where(.pg-services) ul, :where(.pg-services) ol { margin: 0; padding: 0; }
:where(.pg-services) ul, :where(.pg-services) ol { list-style: none; }
:where(.pg-services) a { color: inherit; text-decoration: none; }
:where(.pg-services) a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
.sv-wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--sv-gutter); }
.sv-mono { font-family: var(--sv-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; }
.sv-label { font-family: var(--sv-mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.sv-h2 { font-size: clamp(1.7rem, 2.8vw + 0.6rem, 2.7rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; max-width: 20ch; }
.sv-h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }

/* ---------- 1. Hero + map ---------- */
.sv-hero { padding-block: clamp(20px, 3vw, 40px) clamp(56px, 8vw, 104px); background: radial-gradient(circle at 1px 1px, rgba(var(--ink-rgb), 0.075) 1px, transparent 0) 0 0 / 24px 24px, linear-gradient(180deg, var(--surface), var(--bg) 85%); }
.sv-crumb { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--sv-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 24px; }
.sv-crumb a:hover { color: var(--accent); }
.sv-crumb [aria-current] { color: var(--ink); }
.sv-h1 { font-size: clamp(2.3rem, 4.8vw + 0.6rem, 4.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.03; max-width: 15ch; }
.sv-lede { margin-top: 22px; color: var(--muted); max-width: 52ch; font-size: 1.05em; }
.sv-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.sv-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 0.94rem; border: 1.5px solid transparent; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s; }
.pg-services .sv-btn--solid { background: var(--accent-fill, var(--accent)); color: #fff; }
.pg-services .sv-btn--solid:hover { background: var(--navy); transform: translateY(-1px); }
.pg-services .sv-btn--line { border-color: var(--sv-rule); background: var(--card); }
.pg-services .sv-btn--line:hover { border-color: var(--accent); color: var(--accent); }

.sv-map { position: relative; margin-top: clamp(48px, 7vw, 88px); padding: 76px 0 52px; }
.sv-branch { position: absolute; left: 0; top: 0; width: 100%; height: 104px; overflow: visible; pointer-events: none; }
.sv-branch path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 7 7; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.sv-branch__label { position: absolute; left: 3%; top: 4px; margin: 0; padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); }
html[data-theme="dark"] .sv-branch__label { color: #8fb4ff; }
.sv-line { position: absolute; left: calc(100% / 12); right: calc(100% / 12); top: 102px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent), rgba(var(--accent-rgb), 0.4)); }
.sv-train { position: absolute; left: 0; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; border: 4px solid var(--accent); box-shadow: 0 0 0 7px rgba(var(--accent-rgb), 0.2), 0 0 22px rgba(var(--accent-rgb), 0.6); opacity: 0; }
@media (prefers-reduced-motion: no-preference) { .sv-train { animation: sv-ride 3.6s cubic-bezier(0.55, 0.05, 0.25, 1) 0.5s both; } }
@keyframes sv-ride { 0% { left: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.sv-stations { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.sv-station { position: relative; text-align: center; }
.sv-station a { display: grid; justify-items: center; gap: 14px; padding-inline: 6px; }
.sv-dot { position: relative; z-index: 1; display: grid; place-items: center; width: var(--sv-dot); height: var(--sv-dot); border-radius: 50%; background: var(--card); border: 4px solid var(--accent); font-family: var(--sv-mono); font-weight: 700; font-size: 1.05rem; color: var(--accent); transition: background 0.2s, color 0.2s, transform 0.2s; box-shadow: 0 0 0 6px var(--bg); }
.sv-station--start .sv-dot, .sv-station a:hover .sv-dot, .sv-station a:focus-visible .sv-dot { background: var(--accent-fill, var(--accent)); color: #fff; transform: scale(1.06); }
.sv-name { font-weight: 600; font-size: 0.97rem; line-height: 1.3; max-width: 13ch; }
.sv-flag { position: absolute; left: 50%; bottom: -38px; transform: translateX(-50%); white-space: nowrap; padding: 5px 12px 5px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; }
.sv-flag::before { content: "⚑ "; }

/* ---------- 2. Rows ---------- */
.sv-rows { padding-block: clamp(56px, 8vw, 104px) clamp(32px, 5vw, 56px); }
.sv-list { position: relative; margin-top: 40px; }
.sv-row:not(:last-child)::before { content: ""; position: absolute; left: 20.5px; top: 72px; height: calc(100% - 44px); width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--accent), rgba(var(--accent-rgb), 0.45)); }
.sv-row { position: relative; display: grid; grid-template-columns: 44px minmax(0, 4fr) minmax(0, 8fr); column-gap: clamp(16px, 3vw, 36px); align-items: baseline; padding-block: 28px; scroll-margin-top: 120px; }
.sv-row::after { content: ""; position: absolute; left: 64px; right: 0; bottom: 0; height: 1px; background: var(--sv-rule); }
.sv-row:last-child::after { display: none; }
.sv-row__dot { align-self: start; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--card); border: 3px solid var(--accent); font-family: var(--sv-mono); font-weight: 700; color: var(--accent); z-index: 1; box-shadow: 0 0 0 6px var(--bg); transition: background 0.2s, color 0.2s; }
.sv-row:target .sv-row__dot, .sv-row:hover .sv-row__dot { background: var(--accent-fill, var(--accent)); color: #fff; }
.sv-row__body p { color: var(--muted); max-width: 56ch; }
.sv-more { display: inline-block; margin-top: 12px; font-weight: 600; color: var(--accent); }
.sv-more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 3. Fit: three overlapping circles ---------- */
.sv-fit { padding-block: clamp(48px, 7vw, 96px) clamp(48px, 7vw, 88px); background: var(--surface); border-block: 1px solid var(--sv-rule); }
.sv-fit__lede { margin-top: 18px; color: var(--muted); max-width: 56ch; }
.sv-venn { display: flex; justify-content: center; margin-top: clamp(36px, 5vw, 64px); }
.sv-circle { width: clamp(250px, 31vw, 372px); aspect-ratio: 1; margin-left: -4.5%; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 clamp(34px, 4.6vw, 62px); border: 1.5px solid rgba(var(--accent-rgb), 0.55); }
.sv-circle:first-child { margin-left: 0; }
.sv-circle--1 { background: rgba(var(--accent-rgb), 0.1); }
.sv-circle--2 { background: rgba(var(--accent-rgb), 0.16); }
.sv-circle--3 { background: rgba(var(--accent-rgb), 0.22); }
.sv-circle .sv-h3 { font-size: 1.15rem; }
.sv-circle p { margin-top: 10px; font-size: 0.92rem; line-height: 1.5; color: var(--ink); opacity: 0.85; }

/* ---------- 4. Terminus ---------- */
.sv-end { padding-block: 0 clamp(64px, 9vw, 120px); background: var(--surface); }
.sv-end__inner { display: flex; flex-direction: column; align-items: center; }
.sv-end__stem { width: 4px; height: 64px; background: linear-gradient(180deg, var(--accent), rgba(var(--accent-rgb), 0.2)); border-radius: 4px; }
.sv-terminus { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "dot lab go" "dot ttl go"; column-gap: 18px; align-items: center; padding: 22px 34px 22px 26px; border-radius: 999px; background: var(--navy); color: #fff; box-shadow: 0 24px 48px -26px rgba(var(--ink-rgb), 0.55); transition: background 0.2s, transform 0.2s; }
.pg-services .sv-terminus:hover { background: var(--accent-fill, var(--accent)); transform: translateY(-2px); color: #fff; }
.sv-terminus__dot { grid-area: dot; width: 40px; height: 40px; border-radius: 50%; border: 5px solid #fff; background: var(--accent); }
.sv-terminus .sv-mono { grid-area: lab; color: rgba(255, 255, 255, 0.78); }
.sv-terminus strong { grid-area: ttl; font-size: clamp(1.15rem, 1.6vw + 0.7rem, 1.7rem); font-weight: 600; letter-spacing: -0.02em; }
.sv-terminus__go { grid-area: go; font-size: 1.5rem; }

/* ---------- Responsive: the line turns vertical ---------- */
@media (max-width: 900px) {
  .sv-map { padding: 0; margin-top: 44px; }
  .sv-branch, .sv-branch__label { display: none; }
  .sv-line { left: calc(var(--sv-dot) / 2 - 2px); right: auto; top: calc(var(--sv-dot) / 2); bottom: calc(var(--sv-dot) / 2); width: 4px; height: auto; background: linear-gradient(180deg, var(--accent), rgba(var(--accent-rgb), 0.4)); }
  .sv-train { left: 50%; top: 0; margin: -8px 0 0 -8px; }
  @keyframes sv-ride { 0% { top: 0; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
  .sv-stations { grid-template-columns: 1fr; row-gap: 22px; }
  .sv-station { text-align: left; display: flex; flex-wrap: wrap; align-items: center; }
  .sv-station a { order: 1; grid-template-columns: var(--sv-dot) minmax(0, 1fr); justify-items: start; align-items: center; column-gap: 18px; row-gap: 2px; padding: 0; }
  .sv-dot { grid-row: 1 / span 2; }
  .sv-name { grid-column: 2; grid-row: 1 / span 2; max-width: none; font-size: 1.05rem; align-self: center; }
  .sv-flag { order: 2; position: static; transform: none; margin: 8px 0 0 calc(var(--sv-dot) + 18px); }
  .sv-station:nth-child(3) a::after { content: "Or start with one automation"; grid-column: 2; grid-row: 2; align-self: start; font-size: 0.8rem; font-weight: 600; color: var(--accent); }
  .sv-station:nth-child(3) .sv-name { grid-row: 1; align-self: end; }
  .sv-row { grid-template-columns: 44px minmax(0, 1fr); row-gap: 8px; }
  .sv-row .sv-h3 { grid-column: 2; }
  .sv-row__body { grid-column: 2; }
  .sv-row__dot { grid-row: 1 / span 2; }
  .sv-row::after { left: 62px; }
  .sv-venn { flex-direction: column; align-items: stretch; }
  .sv-circle { width: 100%; aspect-ratio: auto; border-radius: 30px; margin: 0; padding: 30px 24px; align-items: flex-start; text-align: left; }
  .sv-circle + .sv-circle { margin-top: -16px; padding-top: 44px; }
  .sv-circle--3 { margin-bottom: 0; }
}
@media (max-width: 480px) {
  .sv-actions .sv-btn { width: 100%; }
  .sv-terminus { grid-template-columns: auto 1fr; padding: 18px 22px 18px 18px; border-radius: 28px; }
  .sv-terminus__go { display: none; }
}
