/* v14: fixed-height service stages. All layout rules are scoped to #services.
   Edge-light/hover ideas researched in Aceternity UI and Magic UI; implementation
   is original vanilla CSS and requires no framework or network dependency. */
#services {
  --svc-ink: #f2fbff;
  --svc-muted: #c3d8e9;
  --svc-accent: #6be2ea;
  --svc-line: rgba(163, 221, 242, .24);
  --svc-surface: rgba(16, 48, 80, .86);
  --svc-raised: rgba(22, 67, 101, .94);
  --svc-selected: rgba(23, 85, 111, .94);
  --svc-detail: rgba(8, 30, 58, .45);
  --svc-glow: rgba(74, 206, 226, .12);
  z-index: 24; isolation: isolate;
  display: flex; flex-direction: column; align-items: stretch;
  height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; box-sizing: border-box;
  padding: 0 clamp(20px, 4.5vw, 76px) clamp(18px, 3vh, 34px);
  color: var(--svc-ink); font-family: Hanimation, system-ui, sans-serif;
  line-height: 1.55; overscroll-behavior: none;
}
#services[hidden], #services:not(.active), #services [hidden] { display: none !important; }
#services::before { background: linear-gradient(110deg, rgba(10, 32, 60, .42), rgba(8, 34, 65, .38) 55%, rgba(9, 33, 61, .18)); z-index: -1; }
#services button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
#services svg { display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#services button:focus-visible { outline: 3px solid var(--svc-accent); outline-offset: 4px; }
#services #servicesTitle:focus, #services #svcFamilyTitle:focus { outline: none; }
#services button:disabled { cursor: default; }
#services h1, #services h2, #services h3, #services p { margin: 0; }

#services .svc-header { flex: 0 0 auto; width: min(1440px,100%); margin-left: auto; margin-right: auto; min-height: 82px; padding-top: 18px; padding-bottom: 14px; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
#services .svc-brand { display: flex; align-items: center; gap: 10px; font-size: 21px; line-height: 1.4; }
#services .svc-brand img { width: 46px; height: 38px; object-fit: contain; }
#services .svc-back, #services .svc-map-return { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 8px 17px; color: var(--svc-ink); border: 1px solid var(--svc-line); border-radius: 99px; background: var(--svc-detail); transition: background .2s, border-color .2s; }
#services .svc-back { font-size: 14px; }
#services .svc-back svg, #services .svc-map-return svg { width: 20px; height: 20px; flex: 0 0 20px; }
#services .svc-back:hover, #services .svc-map-return:hover { border-color: var(--svc-accent); background: var(--svc-selected); }
#services .svc-map-return { display: none; font-size: 13px; flex-shrink: 0; }

#services .svc-viewport { flex: 1 1 auto; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr); gap: clamp(10px,2vh,24px); width: min(1440px,100%); margin-left: auto; margin-right: auto; overflow: hidden; }
#services .svc-intro { padding-top: 8px; padding-bottom: 8px; text-align: center; }
#services .svc-intro h1 { color: var(--svc-ink); font-size: clamp(27px,2.8vw,40px); font-weight: 500; line-height: 1.4; }
#services .svc-intro p { margin-top: 6px; color: var(--svc-muted); font-size: 16px; }
#services .svc-workspace { width: 100%; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: clamp(24px,3.5vw,60px); }
#services .svc-map-wrap { min-height: 0; min-width: 0; height: 100%; display: grid; place-items: center; }
#services .svc-map { position: relative; width: min(100%, calc(100vh - 234px)); width: min(100%, calc(100dvh - 234px)); max-width: 640px; aspect-ratio: 1; direction: ltr; isolation: isolate; }
#services .svc-map::before { content: ''; position: absolute; top: 5%; right: 5%; bottom: 5%; left: 5%; inset: 5%; border-radius: 50%; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, rgba(40, 155, 194, .14), transparent 67%); }
#services .svc-connections { position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
#services .svc-orbit { stroke: var(--svc-line); stroke-width: 1; stroke-dasharray: 3 14; }
#services .svc-map-ring { stroke: var(--svc-line); stroke-width: 1; }
#services .svc-connection { stroke: rgba(145, 206, 230, .3); stroke-width: 2; transition: stroke .25s; }
#services .svc-connection.is-selected { stroke: var(--svc-accent); stroke-width: 3; stroke-dasharray: 7 10; animation: svc-connection-flow 4s linear infinite; }
#services .svc-core { position: absolute; top: 47%; left: 50%; transform: translate(-50%,-50%); width: 26%; aspect-ratio: 1; display: grid; place-items: center; }
#services .svc-core-orbit { position: absolute; inset: -14%; border: 1px solid var(--svc-line); border-radius: 50%; }
#services .svc-core-orbit::after { content: ''; position: absolute; width: 6px; height: 6px; top: 7%; left: 20%; border-radius: 50%; background: var(--svc-accent); box-shadow: 0 0 18px var(--svc-accent); }
#services .svc-core-disc { width: 100%; height: 100%; border: 1px solid var(--svc-line); border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 15%, #1c5678, #123757 77%); box-shadow: 0 20px 48px rgba(0, 15, 37, .16), inset 0 1px rgba(211, 250, 255, .3); }
#services .svc-core-disc img { width: 58%; height: 44%; object-fit: contain; margin-bottom: 3%; }
#services .svc-core-disc span { color: #edfaff; font-size: clamp(15px,1.9vw,27px); line-height: 1.4; }

#services .svc-family { position: absolute; top: var(--node-y); left: var(--node-x); transform: translate(-50%,-50%); display: flex; align-items: center; justify-content: center; gap: 10px; width: 33%; min-height: 88px; padding: 15px 12px; direction: rtl; text-align: right; color: var(--svc-ink); background: var(--svc-surface); border: 1px solid var(--svc-line); border-radius: 25px 25px 13px 25px; box-sizing: border-box; overflow: hidden; box-shadow: 0 14px 24px rgba(1, 14, 33, .14), inset 0 1px rgba(218, 253, 255, .12); transition: background .25s, border-color .25s, box-shadow .25s; }
#services .svc-family::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg,transparent 20%,rgba(156,242,253,.13) 48%,transparent 70%); transform: translateX(130%); transition: transform .65s ease; }
#services .svc-family:hover::before, #services .svc-family:focus-visible::before { transform: translateX(-130%); }
#services .svc-family:hover { background: var(--svc-raised); border-color: var(--svc-accent); }
#services .svc-family[aria-selected="true"] { background: var(--svc-selected); border-color: var(--svc-accent); box-shadow: 0 14px 26px rgba(1, 18, 35, .16), 0 0 0 4px var(--svc-glow), inset 0 1px rgba(224, 255, 255, .25); }
#services .svc-family-icon { display: grid; place-items: center; width: 33px; min-width: 33px; height: 36px; color: var(--svc-accent); }
#services .svc-family-icon svg { width: 33px; height: 33px; }
#services .svc-family-words { min-width: 0; font-size: clamp(12px,1.05vw,16px); font-weight: 500; line-height: 1.6; }
#services .svc-node-arrow { display: none; }

#services .svc-panel { min-width: 0; width: 100%; max-width: 640px; margin-inline: auto; box-sizing: border-box; padding: clamp(22px,2.5vw,36px); background: var(--svc-surface); border: 1px solid var(--svc-line); border-radius: 30px; box-shadow: 0 24px 60px rgba(0,18,40,.15), inset 0 1px rgba(226,253,255,.12); }
#services .svc-panel-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 25px; }
#services .svc-family-heading { display: flex; align-items: center; gap: 13px; min-width: 0; }
#services .svc-panel-icon { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; color: var(--svc-accent); }
#services .svc-panel-icon svg { width: 39px; height: 39px; }
#services #svcFamilyTitle { color: var(--svc-ink); font-size: clamp(20px,1.85vw,27px); font-weight: 500; line-height: 1.45; }
#services .svc-panel-body { display: grid; grid-template-columns: minmax(0,1fr); gap: 22px; }
#services .svc-products { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; align-content: start; }
#services .svc-product { display: flex; flex-direction: column; justify-content: center; gap: 7px; position: relative; min-width: 0; min-height: 80px; border: 1px solid var(--svc-line); border-radius: 15px; padding: 13px 15px; color: var(--svc-ink); background: var(--svc-detail); text-align: right; transition: background .2s, border-color .2s, transform .2s; }
#services .svc-product:hover { border-color: var(--svc-accent); background: var(--svc-raised); transform: translateY(-2px); }
#services .svc-product[aria-pressed="true"] { border-color: var(--svc-accent); background: var(--svc-selected); }
#services .svc-product-top { width: 100%; display: flex; align-items: center; gap: 8px; line-height: 1.3; }
#services .svc-product-top bdi { font-family: Arial,sans-serif; font-size: 16px; font-weight: 600; }
#services .svc-product-title { color: var(--svc-muted); font-size: 12px; line-height: 1.5; }
#services .svc-product-check { display: grid; place-items: center; border: 1px solid var(--svc-line); border-radius: 50%; width: 17px; height: 17px; flex: 0 0 17px; margin-inline-start: auto; color: transparent; }
#services .svc-product-check svg { width: 13px; height: 13px; stroke-width: 2.2; }
#services .svc-product[aria-pressed="true"] .svc-product-check { color: #063147; border-color: var(--svc-accent); background: var(--svc-accent); }
#services .svc-detail { padding: 19px 3px 2px; border-top: 1px solid var(--svc-line); min-width: 0; }
#services .svc-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 9px; }
#services .svc-selected-name { color: var(--svc-accent); font-size: 13px; font-family: Arial,sans-serif; }
#services .svc-detail-badge { font-size: 11px; color: var(--svc-accent); border: 1px solid var(--svc-line); border-radius: 6px; padding: 2px 6px; }
#services .svc-detail-title { color: var(--svc-ink); font-size: 23px; font-weight: 500; line-height: 1.5; margin-bottom: 10px; }
#services .svc-detail-description { color: var(--svc-muted); font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
#services .svc-live { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#services.is-paused *, #services:not(.active) * { animation-play-state: paused !important; }

body.light #services { --svc-ink: #163d5d; --svc-muted: #486b82; --svc-accent: #087b98; --svc-line: rgba(22, 104, 143, .2); --svc-surface: rgba(246, 253, 255, .88); --svc-raised: #fff; --svc-selected: #dff6fa; --svc-detail: rgba(218, 239, 247, .48); --svc-glow: rgba(22, 164, 192, .09); }
/* The instruction sits directly on the blue sky, outside the pale panel. */
body.light #services .svc-intro p { color:var(--svc-ink); }
body.light #services::before { background: linear-gradient(110deg,rgba(225,245,253,.36),rgba(236,249,255,.32) 55%,rgba(235,249,255,.18)); }
body.light #services .svc-core-disc { background: radial-gradient(circle at 35% 15%,#fff,#d4edf6 85%); box-shadow: 0 20px 48px rgba(13,75,105,.1),inset 0 1px #fff; }
body.light #services .svc-core-disc span { color: #164e71; }
body.light #services .svc-family::before { background: linear-gradient(110deg,transparent 20%,rgba(255,255,255,.65) 48%,transparent 70%); }
body.light #services .svc-product[aria-pressed="true"] .svc-product-check { color: #fff; }

@keyframes svc-connection-flow { to { stroke-dashoffset: -68; } }

/* Narrow, short, and portrait windows use one stage. JS toggles hidden/inert
   alongside this exact media query, including large 9:16 kiosk displays. */
@media (max-width: 999px), (max-height: 639px), (max-aspect-ratio: 4/5) {
  #services .svc-workspace { grid-template-columns: minmax(0,1fr); }
  #services .svc-panel { max-width: 680px; }
  #services .svc-map-return { display: inline-flex; }
  #services .svc-map { width: min(100%,calc(100dvh - 226px)); max-width: 640px; }
  #services .svc-family-words { font-size: 16px; }
  #services .svc-panel-top { margin-bottom: 22px; }
}
/* Large portrait kiosks need the same readable hierarchy at 720 and 1080px.
   The map and detail panel replace one another; they never stack or scroll. */
@media (min-width: 600px) and (max-aspect-ratio: 4/5) {
  #services { padding-bottom: clamp(32px,4vh,64px); }
  #services .svc-header { min-height: clamp(86px,10.5vw,128px); padding-block: clamp(18px,2.5vw,30px) clamp(12px,1.7vw,22px); }
  #services .svc-brand { gap: clamp(10px,1.5vw,18px); font-size: clamp(23px,3vw,34px); }
  #services .svc-brand img { width: clamp(45px,5.4vw,64px); height: auto; }
  #services .svc-back, #services .svc-map-return { min-height: clamp(48px,6.2vw,72px); padding: clamp(9px,1.3vw,15px) clamp(17px,2.3vw,28px); gap: clamp(9px,1.3vw,15px); font-size: clamp(16px,2vw,23px); }
  #services .svc-back svg, #services .svc-map-return svg { width: clamp(22px,2.6vw,30px); height: clamp(22px,2.6vw,30px); flex-basis: clamp(22px,2.6vw,30px); }
  #services .svc-viewport { gap: clamp(24px,3.8vh,64px); }
  #services .svc-intro { padding-block: clamp(16px,2vw,28px); }
  #services .svc-intro h1 { font-size: clamp(32px,5vw,64px); font-weight: 700; line-height: 1.3; }
  #services .svc-intro p { margin-top: clamp(9px,1.3vw,16px); font-size: clamp(18px,2.4vw,28px); line-height: 1.7; }
  #services .svc-map { width: min(86vw,920px); max-width: 920px; }
  #services .svc-family { min-height: clamp(110px,16vw,180px); padding: clamp(14px,2vw,24px); gap: clamp(9px,1.35vw,15px); border-radius: clamp(22px,3.2vw,36px); }
  #services .svc-family-icon { width: clamp(30px,4.4vw,50px); min-width: clamp(30px,4.4vw,50px); height: clamp(30px,4.4vw,50px); }
  #services .svc-family-icon svg { width: 100%; height: 100%; }
  #services .svc-family-words { font-size: clamp(18px,2.6vw,30px); line-height: 1.5; }
  #services .svc-core-disc span { font-size: clamp(24px,3.6vw,42px); }
  #services .svc-panel { width: min(88vw,920px); max-width: 920px; padding: clamp(26px,4vw,48px); border-radius: clamp(26px,4vw,44px); }
  #services .svc-panel-top { gap: clamp(14px,2vw,24px); margin-bottom: clamp(22px,3.2vw,40px); }
  #services .svc-family-heading { gap: clamp(12px,1.8vw,22px); }
  #services .svc-panel-icon { width: clamp(40px,5.8vw,64px); height: clamp(40px,5.8vw,64px); flex-basis: clamp(40px,5.8vw,64px); }
  #services .svc-panel-icon svg { width: 100%; height: 100%; }
  #services #svcFamilyTitle { font-size: clamp(26px,3.5vw,40px); }
  #services .svc-panel-body { gap: clamp(20px,3vw,36px); }
  #services .svc-products { gap: clamp(12px,2vw,24px); }
  #services .svc-product { min-height: clamp(110px,16.5vw,190px); padding: clamp(16px,2.3vw,28px); gap: clamp(8px,1.2vw,14px); border-radius: clamp(18px,2.6vw,30px); }
  #services .svc-product-top { gap: clamp(8px,1.3vw,15px); }
  #services .svc-product-top bdi { font-size: clamp(20px,2.8vw,32px); }
  #services .svc-product-title { font-size: clamp(16px,2.1vw,24px); line-height: 1.55; }
  #services .svc-product-check { width: clamp(19px,2.5vw,30px); height: clamp(19px,2.5vw,30px); flex-basis: clamp(19px,2.5vw,30px); }
  #services .svc-product-check svg { width: 75%; height: 75%; }
  #services .svc-detail { padding-top: clamp(18px,2.5vw,30px); }
  #services .svc-detail-heading { margin-bottom: clamp(10px,1.4vw,16px); }
  #services .svc-selected-name { font-size: clamp(16px,2.1vw,24px); }
  #services .svc-detail-badge { font-size: clamp(13px,1.65vw,20px); }
  #services .svc-detail-title { font-size: clamp(24px,3.6vw,42px); margin-bottom: clamp(12px,1.8vw,22px); }
  #services .svc-detail-description { font-size: clamp(20px,2.8vw,32px); line-height: 1.8; }
}
@media (max-width: 599px) and (min-height: 640px) {
  #services { padding-inline: 19px; padding-bottom: 20px; }
  #services .svc-header { min-height: 72px; padding-block: 15px 10px; gap: 14px; }
  #services .svc-brand { font-size: 19px; gap: 7px; }
  #services .svc-brand img { width: 37px; height: 32px; }
  #services .svc-back { padding-inline: 13px; font-size: 12px; }
  #services .svc-viewport { gap: 10px; }
  #services .svc-intro h1 { font-size: 27px; }
  #services .svc-intro p { font-size: 14px; margin-top: 5px; }
  #services .svc-map { display: grid; grid-template-columns: 1fr; gap: 12px; width: 100%; max-width: 390px; aspect-ratio: auto; }
  #services .svc-connections, #services .svc-core, #services .svc-map::before { display: none; }
  #services .svc-family { position: relative; top: auto; left: auto; transform: none; width: 100%; min-height: 73px; justify-content: flex-start; gap: 16px; padding: 13px 19px; border-radius: 23px 23px 12px 23px; }
  #services .svc-family-words { font-size: 16px; }
  #services .svc-node-arrow { margin-inline-start: auto; display: block; color: var(--svc-accent); }
  #services .svc-node-arrow svg { width: 19px; height: 19px; transform: rotate(180deg); }
  #services .svc-panel { padding: 20px 18px 23px; border-radius: 26px; }
  #services .svc-family-heading { gap: 9px; }
  #services .svc-panel-icon { flex-basis: 31px; width: 31px; height: 38px; }
  #services .svc-panel-icon svg { width: 30px; height: 30px; }
  #services #svcFamilyTitle { font-size: 20px; }
  #services .svc-map-return { padding-inline: 10px; font-size: 12px; gap: 4px; }
  #services .svc-map-return svg { width: 16px; height: 16px; flex-basis: 16px; }
  #services .svc-panel-top { margin-bottom: 20px; }
  #services .svc-panel-body { gap: 18px; }
  #services .svc-product { padding: 11px 10px; min-height: 77px; gap: 6px; }
  #services .svc-product-top bdi { font-size: 14px; }
  #services .svc-product-title { font-size: 11px; }
  #services .svc-detail-title { font-size: 21px; }
  #services .svc-detail-description { font-size: 15px; line-height: 1.9; }
}
@media (max-height: 639px) {
  #services { padding: 0 22px 13px; }
  #services .svc-header { min-height: 55px; padding-block: 8px 4px; }
  #services .svc-brand { font-size: 18px; }
  #services .svc-brand img { width: 36px; height: 29px; }
  #services .svc-back { min-height: 42px; padding: 6px 13px; font-size: 12px; }
  #services .svc-viewport { gap: 8px; }
  #services .svc-intro { padding-block: 2px; }
  #services .svc-intro h1 { font-size: 24px; }
  #services .svc-intro p { margin-top: 1px; font-size: 13px; }
  #services .svc-map { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; width: 100%; max-width: 980px; aspect-ratio: auto; }
  #services .svc-connections, #services .svc-core, #services .svc-map::before { display: none; }
  #services .svc-family { position: relative; top: auto; left: auto; transform: none; width: 100%; min-height: 76px; padding: 12px; gap: 10px; }
  #services .svc-family-words { font-size: 14px; }
  #services .svc-family-icon, #services .svc-family-icon svg { width: 28px; min-width: 28px; height: 30px; }
  #services .svc-panel { max-width: 1080px; padding: 13px 18px; border-radius: 23px; }
  #services .svc-panel-top { margin-bottom: 9px; }
  #services .svc-family-heading { gap: 9px; }
  #services .svc-panel-icon, #services .svc-panel-icon svg { width: 28px; height: 28px; }
  #services .svc-panel-icon { flex-basis: 28px; }
  #services #svcFamilyTitle { font-size: 19px; }
  #services .svc-map-return { min-height: 40px; padding: 5px 11px; font-size: 12px; }
  #services .svc-panel-body { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 22px; align-items: center; }
  #services .svc-products { gap: 8px; }
  #services .svc-product { min-height: 62px; padding: 8px 10px; gap: 4px; }
  #services .svc-product-top bdi { font-size: 13px; }
  #services .svc-product-title { font-size: 10px; }
  #services .svc-detail { border-top: 0; border-right: 1px solid var(--svc-line); padding: 3px 16px 3px 0; }
  #services .svc-detail-heading { margin-bottom: 5px; }
  #services .svc-selected-name { font-size: 11px; }
  #services .svc-detail-title { font-size: 18px; margin-bottom: 6px; }
  #services .svc-detail-description { font-size: 13px; line-height: 1.7; }
}
@media (max-width: 599px) and (max-height: 639px) {
  #services { padding-inline: 14px; }
  #services .svc-intro h1 { font-size: 22px; }
  #services .svc-map { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  #services .svc-family { min-height: 65px; padding: 9px; gap: 7px; }
  #services .svc-family-words { font-size: 12px; }
  #services .svc-panel { padding: 12px; }
  #services #svcFamilyTitle { font-size: 16px; }
  #services .svc-panel-body { grid-template-columns: 1fr; gap: 10px; }
  #services .svc-product { min-height: 55px; padding-block: 7px; }
  #services .svc-detail { border-right: 0; border-top: 1px solid var(--svc-line); padding: 10px 0 0; }
  #services .svc-detail-title { font-size: 17px; }
  #services .svc-detail-description { font-size: 12px; line-height: 1.6; }
}
@media (prefers-reduced-motion: reduce) {
  #services *, #services *::before, #services *::after { animation: none !important; transition: none !important; }
}
