/* Services section — visual language per the reference image:
   dark rounded card + violet hairline border, eyebrow, two-tone heading,
   icon-chip list, pill CTA. Scoped under #services only. */

.svx-section {
  position: relative;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.5rem, 5vw, 72px);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

/* decorations */
.svx-dots {
  position: absolute;
  right: 6%;
  top: 8%;
  width: 150px;
  height: 130px;
  background-image: radial-gradient(rgba(139, 92, 246, 0.5) 1.6px, transparent 1.7px);
  background-size: 22px 22px;
  pointer-events: none;
}
.svx-glow {
  position: absolute;
  right: -10%;
  bottom: -30%;
  width: 60%;
  height: 80%;
  background: radial-gradient(closest-side, rgba(124, 92, 255, 0.14), transparent);
  pointer-events: none;
}

/* the section wrapper — container boundary REMOVED (user): the section
   flows naturally full-width; same grid, same content, no glass box. */
.svx-card {
  position: relative;
  width: min(1400px, 100%);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
}

/* ── left column ── */
.svx-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  z-index: 2;
}
.svx-eyebrow {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mv2-mono, ui-monospace, Menlo, monospace);
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  color: #8b7cf6;
}
.svx-eyebrow__dash { width: 46px; height: 1px; background: linear-gradient(90deg, #8b7cf6, transparent); }
.svx-heading {
  margin: 0;
  font-family: var(--font-red-hat-display, "Segoe UI", sans-serif);
  font-weight: 800;
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.svx-heading__white { color: #f5f6fa; }
.svx-heading__accent { color: #8b5cf6; }
.svx-intro {
  margin: 0;
  max-width: 44ch;
  font-family: var(--mv2-mono, ui-monospace, Menlo, monospace);
  font-size: 0.95rem;
  line-height: 1.75;
  color: #a9adc2;
}

/* services list */
.svx-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}
.svx-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 14px;
  background: rgba(21, 19, 34, 0.55);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.svx-item:hover {
  border-color: rgba(139, 92, 246, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(124, 92, 255, 0.12);
}
.svx-item__icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #a78bfa;
}
.svx-item__icon svg { width: 20px; height: 20px; }
.svx-item__title {
  margin: 0;
  font-family: var(--font-red-hat-display, "Segoe UI", sans-serif);
  font-weight: 700;
  font-size: 1rem;
  color: #f5f6fa;
}
.svx-item__desc {
  margin: 0;
  font-family: var(--mv2-mono, ui-monospace, Menlo, monospace);
  font-size: 0.78rem;
  color: #a9adc2;
}

/* CTA */
.svx-cta {
  margin-top: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 999px;
  background: rgba(10, 10, 18, 0.6);
  border: 1px solid #8b5cf6;
  color: #f5f6fa;
  font-family: var(--mv2-mono, ui-monospace, Menlo, monospace);
  font-size: 0.95rem;
  cursor: pointer;
  transition: box-shadow 0.3s, transform 0.3s, background 0.3s;
}
.svx-cta:hover {
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.4);
  background: rgba(124, 92, 255, 0.12);
  transform: translateY(-1px);
}
.svx-cta__arrow { transition: transform 0.3s; }
.svx-cta:hover .svx-cta__arrow { transform: translateX(4px); }

/* ── right column: the 3D component stage — pushed further RIGHT (user) ── */
.svx-visual {
  position: relative;
  min-height: 480px;
  height: 100%;
  z-index: 1;
}
/* EDIT (user round 4): keyboard OUT of the flex flow — absolutely positioned
   inside .svx-visual so top/right control it directly, and NOTHING else on
   the page can shift (fixes "margin moves the whole page" problem). */
.svx-kb {
  position: absolute;
  top: 110px;        /* EDIT (user-tuned) */
  right: -130px;     /* EDIT (user-tuned) */
  width: 100%;
  height: 100%;
  min-height: 420px;
}

/* entrance animation (outside the component — wraps only) */
.svx-card { animation: svx-in 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
@keyframes svx-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .svx-card { animation: none; }
  .svx-item, .svx-cta { transition: none; }
}

/* responsive */
@media (max-width: 1024px) {
  .svx-card { grid-template-columns: 1fr; }
  .svx-visual { min-height: 420px; order: 2; }
  .svx-content { order: 1; }
  .svx-dots { width: 110px; height: 96px; }
  /* EDIT (user): narrower screens — back to natural flow, centered under text */
  .svx-kb {
    position: relative;
    top: auto;
    right: auto;
    margin: 0 auto;
  }
}
/* TASK (user, final responsive pass) — SERVICES ON PHONES.
   Root cause of the mobile breakage: the single-column grid track was
   written as plain `1fr`, so it sized to its tallest min-content — the
   TypingKeyboard stage (a fixed 800px scene). Every row (the intro, the
   four .svx-item cards, the CTA) was therefore pinned to 800px and ran
   ~400px off each side of a 390px phone. minmax(0, 1fr) lets the track
   shrink; min-width:0 lets the two cells shrink with it; the decorative
   keyboard is then scaled down inside a clipped stage so the isometric
   3D scene (which is wider than its container by design) can't push the
   document. Desktop (>1024px) is untouched — same grid, same keyboard. */
@media (max-width: 1024px) {
  .svx-card { grid-template-columns: minmax(0, 1fr); }
  .svx-content, .svx-visual { min-width: 0; }
  /* NB: `#services` prefix is required, not cosmetic — services.css carries
     `#services .tk-container { height: 100% }` (id+class specificity) and
     `.tk-container` IS `.svx-kb`, so a bare `.svx-kb` rule loses to it. */
  #services .svx-kb { width: 100%; max-width: 100%; }
}
@media (max-width: 640px) {
  /* NB: specificity is deliberately (1,2,0), one class ABOVE services.css's
     `#services .tk-main` / `#services .tk-container` (1,1,0). Reason: about.js
     injects `/about/services.css` a SECOND time at runtime, so that sheet lands
     AFTER this one in cascade order — with equal specificity the later sheet
     would win and these rules would silently no-op (that is exactly what
     happened on the first attempt). Extra class beats order dependence.
     Computed transform/height were verified NOT inline.

     TASK (user, final 3 fixes) — the phone scene was too small. The isometric
     stage renders the keyboard/screen at scale 0.36 => 180x216. Raised to
     0.45 (=> 225x270, roughly +50px per side) and the clipping stage grown
     250 -> 300px to match, so nothing is cut off. The natural scene is a
     fixed 500x600, so the aspect is preserved and the growth is approximate,
     as requested. Desktop is untouched: everything here is <=640px only. */
  #services .svx-visual { min-height: 300px; }
  #services .svx-visual .svx-kb {
    height: 300px;
    min-height: 0;
    overflow: hidden;   /* clips the empty 3D margin, not the keyboard */
  }
  #services .svx-card .tk-main { transform: scale(0.50); }
}
@media (max-width: 400px) {
  #services .svx-card .tk-main { transform: scale(0.45); }
}
