/* Polish: four small effects, ported to plain CSS and JS from ideas in Magic UI (MIT):
   blur fade on scroll reveals, a border beam on the featured price card, a number ticker, a reading progress bar.
   Loaded last. Every effect has a reduced-motion fallback and works with scripting off. */

/* ---------- Blur fade: the existing reveal also eases out of a soft blur ---------- */
.js .reveal { filter: blur(6px); transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { filter: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { filter: none; transition: none; } }

/* ---------- Border beam: a soft light travels once round the featured price card ---------- */
@property --beam-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.price.featured::after {
  content: ""; position: absolute; inset: -2px; padding: 2px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--beam-angle), transparent 0deg, transparent 200deg, color-mix(in srgb, var(--accent-strong, var(--blue)) 30%, #fff) 320deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: beam-spin 7s linear infinite;
}
@keyframes beam-spin { to { --beam-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { .price.featured::after { display: none; } }

/* ---------- Number ticker: figures count up once when they scroll into view ---------- */
[data-ticker] { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Reading progress on articles ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; background: var(--accent, var(--blue)); transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }

/* ---------- Scroll-synced showcase (HMS page): text steps scroll, one screen stays and changes with them ---------- */
.stackshow { display: block; }
.ss-step { padding: 28px 0 28px 20px; border-left: 2px solid var(--line); margin-bottom: 40px; }
.ss-step.is-active { border-left-color: var(--accent-strong, var(--blue)); }
.ss-step h2 { margin-bottom: 14px; }
.ss-step p { color: var(--ink-2); font-size: 19px; }
.ss-step .checks { margin: 18px 0 0; padding: 0; list-style: none; }
.ss-step .checks li { padding: 8px 0 8px 28px; position: relative; color: var(--ink-2); }
.ss-step .checks li::before { content: ""; position: absolute; left: 0; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-strong, var(--blue)); }
.ss-inline { margin: 24px 0 0; }
.ss-inline img { width: 100%; height: auto; }
.ss-stage { display: none; }
@media (min-width: 981px) {
  .js .stackshow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
  .js .ss-step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; margin-bottom: 0; }
  .js .ss-inline { display: none; }
  .js .ss-stage { display: block; position: sticky; top: 110px; }
  .ss-stage .frame { position: relative; aspect-ratio: 1800 / 1012; }
  .ss-stage .frame img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.45s ease; }
  .ss-stage .frame img.on { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .ss-stage .frame img { transition: none; } }

/* ---------- Module tabs (HMS page): three groups, one grid of module cards each ---------- */
.mod-tabs { display: none; }
.js .mod-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 28px; border: 1px solid var(--line); border-radius: 980px; background: var(--card); flex-wrap: wrap; }
.mod-tab { min-height: 44px; padding: 0 20px; border: 0; border-radius: 980px; background: transparent; color: var(--ink-2); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; transition: background 0.2s, color 0.2s; }
.mod-tab:hover { color: var(--ink); }
.mod-tab[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.mod-group { font-size: 15px; font-weight: 600; color: var(--ink-2); margin: 0 0 14px; }
.js .mod-group { display: none; }
.mod-panel + .mod-panel { margin-top: 36px; }
.js .mod-panel + .mod-panel { margin-top: 0; }
.mod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mod { display: flex; gap: 16px; align-items: flex-start; padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.mod-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--hms) 12%, transparent); color: var(--hms-t); }
.mod-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mod h3 { font-size: 19px; margin-bottom: 6px; letter-spacing: -0.01em; }
.mod p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
@media (min-width: 981px) { .mod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mod-grid { grid-template-columns: minmax(0, 1fr); } .mod-tab { padding: 0 14px; } }

/* ---------- HMS plans: four cards and a comparison table ---------- */
.price-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.price .addons { font-size: 14px; color: var(--ink-2); margin: 0 0 20px; }
.cmp-wrap { margin-top: 40px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.cmp { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
.cmp caption { text-align: left; padding: 18px 20px 6px; font-weight: 600; font-size: 17px; }
.cmp th, .cmp td { padding: 10px 16px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.cmp thead th { font-weight: 600; background: var(--bg-alt); }
.cmp tbody th[scope="row"] { font-weight: 400; }
.cmp .grp th { background: var(--bg-alt); font-weight: 600; color: var(--ink); }
.cmp td { color: var(--ink-2); }
.cmp td.yes { color: var(--hms-t); font-weight: 700; }
.cmp-wrap:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
@media (max-width: 1180px) { .price-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; } }
@media (max-width: 720px) { .price-grid-4 { grid-template-columns: minmax(0, 1fr); } }
.price-grid-4 .amt { font-size: 32px; white-space: nowrap; }

/* HMS plans, tidier: aligned card heads, one note instead of repeated lines, compact table */
.price-grid-4 { align-items: stretch; }
.price-grid-4 .plan-for { min-height: 2.8em; margin-bottom: 4px; }
.price-grid-4 .amt { font-size: 30px; margin: 10px 0 16px; }
.price-grid-4 ul { margin: 0 0 18px; }
.price-grid-4 li { padding: 8px 0; font-size: 15px; }
.price-grid-4 li.inc { font-weight: 600; color: var(--ink); }
.price-grid-4 .addons { margin: 0 0 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.plan-note { margin: 18px 0 0; max-width: 78ch; color: var(--ink-2); font-size: 15px; }
.plan-head > div { flex: 1 1 360px; min-width: 0; }
.cmp { font-size: 14.5px; }
.cmp th, .cmp td { padding: 8px 14px; }
.cmp td, .cmp thead th:not(:first-child) { text-align: center; }
.cmp tbody th[scope="row"] { width: 34%; }
.cmp-wrap { overflow-x: auto; }
.price-grid-4 .plan-for { min-height: 0; margin-bottom: 18px; }

/* Products menu: four products, own-site links marked, a small foot line */
.dd-products { min-width: 300px; }
/* Products menu: Healthcare and Custom software side by side, opening to the right of the button */
.dd-groups { display: grid; grid-template-columns: 1.15fr 1fr; gap: 4px 10px; }
.dd-group + .dd-group { border-left: 1px solid var(--line); padding-left: 10px; }
@media (min-width: 821px) {
  .dd-products { min-width: 600px; left: -20px; transform: translate(0, -6px); }
  .dd:hover .dd-products, .dd:focus-within .dd-products, .dd-btn[aria-expanded="true"] + .dd-products { transform: translate(0, 0); }
}
@media (max-width: 820px) { .dd-groups { grid-template-columns: 1fr; gap: 0; } .dd-group + .dd-group { border-left: 0; padding-left: 0; margin-top: 18px; } }
.dd-products .ext { font-weight: 400; font-size: 0.85em; color: var(--ink-3); }
/* Each column ends in a foot link, styled like the other items and lined up at the bottom */
.dd-group { display: flex; flex-direction: column; }
.dd-foot { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); }
.dd-groups .dd-group > a:last-of-type { margin-bottom: 6px; }
@media (max-width: 820px) { .dd-foot { margin-top: 0; padding-top: 0; border-top: 0; } }

/* Tatbiq HMS pricing section (owner, 2026-11-16): plan cards, "Complete features list" toggle, why-choose cards */
.hms-find { margin: 8px 0 28px; }
.hms-plan .plan-for { min-height: 4.8em; margin-bottom: 4px; }
.hms-plan .hms-cfp { font-size: 26px; margin: 12px 0 16px; }
.hms-plan .btn { margin-top: 0; }
.hms-plan .hms-onb { font-size: 15px; margin: 16px 0 12px; }
.hms-plan .hms-onb b { display: block; }
.hms-plan.star { border: 2px solid var(--accent); }
.hms-more { margin: 32px 0 56px; }
.hms-more > summary { list-style: none; cursor: pointer; width: max-content; margin: 0 auto; padding: 12px 22px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; }
.hms-more > summary::-webkit-details-marker { display: none; }
.hms-more > summary::after { content: " +"; }
.hms-more[open] > summary::after { content: " \2212"; }
.hms-why { margin-bottom: 32px; }
@media (max-width: 900px) { .hms-why { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .hms-why { grid-template-columns: 1fr; } }

/* ---------- Cookie choice banner (js/consent.js); shown only when an analytics or ad ID is set ---------- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 560px; margin-left: auto; padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line-strong); box-shadow: var(--shadow); color: var(--ink); font-size: 14px; }
.cookie-banner .cb-title { margin: 0 0 4px; font-weight: 600; font-size: 15px; }
.cookie-banner .cb-text { margin: 0 0 12px; color: var(--ink-2); line-height: 1.5; }
.cookie-banner .cb-text a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner .cb-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.cookie-banner .cb-opts label { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-weight: 600; cursor: pointer; }
.cookie-banner .cb-opts span { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.cookie-banner .cb-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 720px) { .cookie-banner { left: 10px; right: 10px; bottom: 10px; } .cookie-banner .cb-actions .btn { flex: 1; } }

/* Footer social links */
.foot-social { display: flex; gap: 18px; margin-top: 14px; }
.foot-social a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: 14px; }
.foot-social a:hover { color: var(--ink); }
.foot-social svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Articles: back link, contents, share row and previous/next */
.article a.back-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; transition: color 0.2s, border-color 0.2s; }
.article a.back-pill:hover { color: var(--ink); border-color: var(--line-strong); }
.back-pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
.back-pill:hover svg { transform: translateX(-3px); }
.toc { margin: 32px 0 0; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.toc summary { cursor: pointer; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.toc ol { margin: 12px 0 2px; padding-left: 22px; }
.toc li { margin: 7px 0; font-size: 16px; line-height: 1.45; color: var(--ink-3); }
.article .toc li a { color: var(--ink-2); text-decoration: none; }
.article .toc li a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.article-body h2[id], .article-body h3[id] { scroll-margin-top: 96px; }
.post-foot { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.post-foot .byline { margin: 0; padding: 0; border: 0; }
.share { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.share-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.share a, .share button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-2) !important; font: inherit; font-size: 13px; text-decoration: none !important; cursor: pointer; transition: color 0.2s, border-color 0.2s; }
.share a:hover, .share button:hover { color: var(--ink) !important; border-color: var(--line-strong); }
.share svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.share a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.post-pager { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.article .post-pager a { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); text-decoration: none; transition: border-color 0.2s; }
.article .post-pager a:hover { border-color: var(--line-strong); }
.post-pager .pp-newer { text-align: right; }
.pp-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.pp-older .pp-label::before { content: "\2190  "; }
.pp-newer .pp-label::after { content: "  \2192"; }
.pp-title { font-size: 16px; font-weight: 500; line-height: 1.4; }
@media (max-width: 720px) { .post-pager { grid-template-columns: 1fr; } .post-pager .pp-newer { text-align: left; } .post-pager > span:empty { display: none; } }

/* Back to top, stacked above the WhatsApp button */
.to-top { position: fixed; right: 26px; bottom: 88px; z-index: 45; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.35); transition: transform 0.2s, border-color 0.2s; }
.to-top[hidden] { display: none; }
.to-top:hover { transform: translateY(-2px); border-color: var(--ink-3); }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 820px) { .to-top { right: 18px; bottom: 78px; } }
@media (max-width: 480px) { .to-top { right: 14px; bottom: 70px; } }
@media (prefers-reduced-motion: reduce) { .to-top, .back-pill svg { transition: none; } }

/* Blog list: topics beside the posts, cards with covers */
.blog-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.blog-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 12px; }
.side-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.topic-list { display: flex; flex-direction: column; gap: 2px; }
.topic-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: var(--radius); color: var(--ink-2); font-size: 15px; text-decoration: none; transition: background 0.2s, color 0.2s; }
.topic-list a:hover { background: var(--card); color: var(--ink); }
.topic-list a[aria-current="true"] { background: var(--ink); color: var(--bg); }
.topic-list a > span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.topic-list .n { font-family: var(--mono); font-size: 12px; opacity: 0.75; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; }
.dot.topic-hms { background: var(--hms); }
.dot.topic-pharvilo { background: var(--pharvilo); }
.dot.topic-saffq { background: var(--saffq); }
.dot.topic-localdawai { background: var(--localdawai); }
.side-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.side-card p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.side-card p.side-card-title { margin-bottom: 6px; font-size: 16px; font-weight: 600; color: var(--ink); }
.side-card .btn { width: 100%; justify-content: center; }
.blog-side .side-card { margin-top: 12px; }
.post-grid.two { grid-template-columns: repeat(2, 1fr); }
.post-card.has-cover { padding-top: 0; overflow: hidden; }
.post-cover { display: block; margin: 0 -28px 4px; aspect-ratio: 1200 / 630; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.post-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.post-card:hover .post-cover img { transform: scale(1.03); }
.cat.topic-hms { background: color-mix(in srgb, var(--hms) 12%, transparent); color: var(--hms-t); }
.cat.topic-pharvilo { background: color-mix(in srgb, var(--pharvilo) 13%, transparent); color: var(--pharvilo-t); }
.cat.topic-saffq { background: color-mix(in srgb, var(--saffq) 15%, transparent); color: var(--saffq-t); }
.cat.topic-localdawai { background: color-mix(in srgb, var(--localdawai) 13%, transparent); color: var(--localdawai-t); }
@media (max-width: 900px) {
  .blog-layout { grid-template-columns: 1fr; gap: 24px; }
  .blog-side { position: static; }
  .topic-list { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .topic-list a { border: 1px solid var(--line); border-radius: 999px; min-height: 40px; }
  .blog-side .side-card { display: none; }
}
@media (max-width: 720px) { .post-grid.two { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .post-cover img { transition: none; } }

/* Article: author, cover, In short, and the side columns on wide screens */
.post-section { padding-bottom: 40px; }
.author-line { display: flex; align-items: center; gap: 14px; margin: 6px 0 28px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-family: var(--serif); font-size: 20px; line-height: 1; flex: none; }
.author-text { display: flex; flex-direction: column; gap: 2px; }
.author-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.author-line .post-meta { gap: 2px 12px; }
.tldr { margin: 0 0 8px; padding: 22px 26px; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: var(--radius); background: var(--card); }
.tldr .tldr-label { margin: 0 0 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.tldr ul { margin: 0; padding-left: 20px; }
.tldr li { margin: 6px 0; font-size: 16.5px; line-height: 1.55; color: var(--ink); }
.post-toc, .post-aside { display: none; }
.author-card .avatar { margin-bottom: 12px; }
.side-card p.author-role { margin: -2px 0 10px; font-size: 13px; color: var(--ink-3); }
@media (min-width: 960px) {
  .container.post-layout { width: min(1360px, 100% - 48px); display: grid; grid-template-columns: minmax(0, 720px) 250px; justify-content: center; gap: 56px; align-items: start; }
  .post-layout .article { margin: 0; max-width: none; }
  .post-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px; margin-top: 68px; }
}
@media (min-width: 1240px) {
  .container.post-layout.has-toc { grid-template-columns: 200px minmax(0, 720px) 250px; gap: 48px; }
  .post-layout.has-toc .post-toc { display: block; position: sticky; top: 96px; margin-top: 68px; max-height: calc(100vh - 130px); overflow: auto; }
  .post-layout.has-toc .article .toc { display: none; }
}
.post-toc .side-label { margin-bottom: 10px; }
.post-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.post-toc li { margin: 0; }
.post-layout .post-toc li a { display: block; margin-left: -1px; padding: 7px 0 7px 14px; border-left: 2px solid transparent; color: var(--ink-3); font-size: 14px; line-height: 1.4; text-decoration: none; transition: color 0.2s, border-color 0.2s; }
.post-layout .post-toc li a:hover { color: var(--ink); }
.post-layout .post-toc li a[aria-current="true"] { color: var(--ink); border-left-color: var(--blue); font-weight: 500; }

/* Home hero: plain line, product links, headline entrance, pulses from the core to each circle */
.hero-split .lead:has(+ .hero-sub) { margin-bottom: 0; }
.hero-sub { margin: 14px 0 34px; max-width: 46ch; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.hero-products { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-products a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; transition: color 0.2s, border-color 0.2s; }
.hero-products a:hover { color: var(--ink); border-color: var(--line-strong); }
.hero-title .w { display: inline-block; animation: word-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i) * 90ms + 60ms); }
@keyframes word-in { from { opacity: 0; transform: translateY(0.32em); } to { opacity: 1; transform: none; } }
.orbit .pulse { fill: var(--c); opacity: 0; animation: pulse-run 8s cubic-bezier(0.45, 0, 0.3, 1) infinite; animation-delay: calc(var(--i) * 2s + 1s); }
@keyframes pulse-run {
  0% { transform: translate(0, 0); opacity: 0; }
  3% { opacity: 1; }
  20% { transform: translate(var(--tx), var(--ty)); opacity: 1; }
  24%, 100% { transform: translate(var(--tx), var(--ty)); opacity: 0; }
}
.orbit .node-ico { animation: node-glow 8s ease-out infinite; animation-delay: calc(var(--i) * 2s + 1s); }
@keyframes node-glow {
  0%, 18% { box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.4), 0 0 0 0 transparent; }
  22% { box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.4), 0 0 0 7px color-mix(in srgb, var(--glow, var(--c)) 26%, transparent); }
  34%, 100% { box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.4), 0 0 0 14px transparent; }
}
@media (max-width: 820px) { .hero-products { justify-content: center; } .hero-sub { margin-inline: auto; } }
@media (prefers-reduced-motion: reduce) { .hero-title .w, .orbit .pulse, .orbit .node-ico { animation: none; } .orbit .pulse { display: none; } }

/* SaffQ plan finder */
.finder { margin: 28px 0 8px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; text-align: left; }
.finder-in, .finder-out { padding: 28px; }
.finder-out { background: var(--bg-alt); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.finder .side-label { margin-bottom: 6px; }
.f-field { display: grid; gap: 8px; margin-top: 18px; }
.f-field label, .f-label { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.f-field output { font-family: var(--mono); color: var(--accent-t, var(--blue)); }
.f-field small { font-size: 13px; color: var(--ink-3); }
.f-field input[type="range"] { width: 100%; accent-color: var(--accent, var(--blue)); min-height: 28px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.seg button { min-height: 40px; border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.f-plan { margin: 0; font-family: var(--serif); font-size: clamp(30px, 4vw, 40px); line-height: 1.05; color: var(--ink); }
.f-price { margin: 0; font-size: 26px; font-weight: 600; color: var(--ink); }
.f-price small { font-size: 14px; font-weight: 400; color: var(--ink-3); }
.f-why { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.f-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 6px; }
.f-nums div { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.f-nums b { display: block; font-size: 19px; font-weight: 600; color: var(--ink); }
.f-nums span { font-size: 12.5px; color: var(--ink-3); }
.finder-out .btn { align-self: flex-start; }
.f-note { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
@media (max-width: 760px) { .finder { grid-template-columns: 1fr; } .finder-out { border-left: 0; border-top: 1px solid var(--line); } .finder-in, .finder-out { padding: 22px; } }

/* Smooth page changes in browsers that support cross-page view transitions */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.22s; animation-timing-function: ease; }
.site-header { view-transition-name: site-header; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Home bento: HMS and PHARVILO wide, SaffQ and LocalDawai narrow, custom software across the bottom */
@media (min-width: 900px) {
  .bento.bento-6 { grid-template-columns: repeat(6, 1fr); }
  .bento-6 .b-wide { grid-column: span 4; }
  .bento-6 .b-narrow { grid-column: span 2; }
  .bento-6 .b-full { grid-column: 1 / -1; min-height: 0; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: end; padding-bottom: 0; }
  .bento-6 .b-full .b-full-text { align-self: center; padding-bottom: 40px; }
  .bento-6 .b-narrow p { max-width: none; }
}
.bento-6 .b-full .tile-visual .frame { width: 100%; }
/* SaffQ live tracker, drawn in HTML */
.live-q { height: 340px; padding: 22px 16px 16px; display: flex; flex-direction: column; gap: 6px; background: #fff; color: #0f1b2d; text-align: center; font-family: var(--font); }
.live-q .lq-top { margin: 0 0 14px; display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 10.5px; color: #586579; text-align: left; }
.live-q .lq-live { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: #e7f4ee; color: #086650; font-weight: 600; }
.live-q .lq-live i { width: 6px; height: 6px; border-radius: 50%; background: #0b7a63; animation: lq-blink 1.6s ease-in-out infinite; }
@keyframes lq-blink { 50% { opacity: 0.25; } }
.live-q .lq-label { margin: 0; font-size: 11px; color: #586579; }
.live-q .lq-token { margin: 0; color: #0f1b2d; font-family: var(--mono); font-size: 46px; font-weight: 500; line-height: 1.05; letter-spacing: 0.02em; }
.live-q .lq-state { margin: 0 auto 8px; padding: 3px 10px; border-radius: 999px; background: #f3f5f8; font-size: 11px; font-weight: 600; color: #475569; }
.live-q.is-turn .lq-state { background: #8c4f00; color: #fff; }
.live-q .lq-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.live-q .lq-row div { padding: 10px 8px; border: 1px solid #e2e8ef; border-radius: 12px; text-align: left; }
.live-q .lq-row span { display: block; font-size: 10px; color: #586579; }
.live-q .lq-row b { font-family: var(--mono); font-size: 20px; font-weight: 500; }
.live-q .lq-wait { margin: 6px 0 0; font-size: 11.5px; color: #475569; }
.live-q.bump [data-serving], .live-q.bump [data-ahead] { animation: lq-bump 0.5s ease-out; }
@keyframes lq-bump { from { opacity: 0.2; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lq-live i { animation: none; } }

/* Footer with a Contact column: six columns on wide screens */
@media (min-width: 1100px) { .foot-top { grid-template-columns: 1.4fr 0.9fr 1fr 1fr 1.25fr 0.8fr; gap: 32px; } }
@media (min-width: 981px) and (max-width: 1099px) { .foot-top { grid-template-columns: repeat(3, 1fr); } .foot-brand { grid-column: 1 / -1; } }
.foot-contact a { overflow-wrap: anywhere; }

/* Header (owner 2026-11-24, after Freshworks, Zoho and Sarvam): five plain links in the centre, wide hover menus
   with coloured icons and a blog card, phone number and Book a demo on the right */
@media (min-width: 821px) {
  .site-header .nav { height: 68px; position: static; }
  .nav-links { flex: 1; gap: 30px; margin-left: 24px; margin-right: 12px; }
  .nav-links > .dd:first-child { margin-left: auto; }
  .nav-links .nav-cta { margin-left: auto; background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .nav-links .nav-cta:hover { background: var(--ink-2); border-color: var(--ink-2); }
  /* Wide menus: open under the whole header, content kept to the page width */
  .dd.dd-mega { position: static; }
  .dd-menu.mega { left: 0; right: 0; top: 100%; transform: translateY(-6px); min-width: 0; padding: 0; border-radius: 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); box-shadow: 0 30px 50px -30px rgba(15, 27, 45, 0.35); }
  .dd:hover .dd-menu.mega, .dd:focus-within .dd-menu.mega, .dd-btn[aria-expanded="true"] + .dd-menu.mega { transform: translateY(0); }
  .dd-menu.mega::before { top: -22px; height: 22px; }
  .mega-inner { width: min(var(--maxw), 100% - 48px); margin-inline: auto; padding: 30px 0 34px; display: grid; grid-template-columns: 1fr 1fr 300px; gap: 12px 36px; align-items: start; }
  .mega-small .mega-inner { grid-template-columns: minmax(0, 360px); }
  .mega-col { display: flex; flex-direction: column; gap: 2px; }
  .mega .dd-label { padding: 0 12px 8px; }
  .dd-menu.mega a { flex-direction: row; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 12px; }
  .mi { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); }
  .mi svg { width: 20px; height: 20px; fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mt { display: flex; flex-direction: column; gap: 1px; }
  .dd-menu.mega .mega-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
  .dd-menu.mega .mega-card:hover { border-color: var(--line-strong); background: var(--card); }
  .mega-card img { display: block; width: 100%; height: auto; border-radius: 9px; border: 1px solid var(--line); }
  .mega-card-label { margin-top: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
  .mega-card strong { font-size: 14.5px; line-height: 1.35; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .nav-links { gap: 20px; margin-left: 16px; }
  .mega-inner { grid-template-columns: 1fr 1fr; }
  .mega-card { display: none !important; }
}
@media (max-width: 820px) { .mi { display: none; } .mt { display: contents; } .mega-card { display: none !important; } }
/* Company: a small dropdown under its button, items with icons */
@media (min-width: 821px) {
  .dd-menu.dd-compact { min-width: 300px; padding: 8px; }
  .dd-menu.dd-compact a { flex-direction: row; align-items: center; gap: 12px; padding: 9px 12px; }
}


/* Contact page: each label and its value on one line, in aligned rows */
.contact-list { gap: 0; border-bottom: 1px solid var(--line); }
.contact-list > div { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); align-items: center; gap: 16px; padding: 15px 0; border-top: 1px solid var(--line); }
.contact-list .label { margin: 0; color: var(--ink); }
.contact-list p { overflow-wrap: anywhere; }
@media (max-width: 480px) { .contact-list > div { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; } .contact-list .label, .contact-list p { font-size: 14.5px; } }
