/* ==========================================================================
   Nabd (نبض) — public website
   Static, dependency-free styles. RTL-first: layout uses logical properties
   (inline-start / inline-end) so the same rules work for Arabic and English.
   ========================================================================== */

:root {
    --navy: #050f3a;
    --ink: #0e1b3d;
    --text: #42506e;
    --muted: #5d6b89;
    --line: #e3eaf6;
    --bg: #ffffff;
    --bg-soft: #f5f8ff;
    --bg-tint: #eaf2ff;

    --brand-900: #011876;
    --brand-800: #02288d;
    --brand-700: #0043b6;
    --brand-600: #0a5bd8;
    --brand-500: #017fee;
    --brand-400: #03acfd;
    --cyan: #03c6fe;
    --aqua: #03eae8;
    --teal: #0fcfc0;
    --amber: #f5a524;

    --grad: linear-gradient(135deg, #0043b6 0%, #017fee 55%, #03c6fe 100%);
    --grad-deep: linear-gradient(135deg, #011876 0%, #0043b6 50%, #017fee 100%);
    --grad-aqua: linear-gradient(135deg, #03c6fe 0%, #06f7e4 100%);

    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --shadow-sm: 0 1px 2px rgba(6, 22, 79, .06), 0 4px 12px rgba(6, 22, 79, .05);
    --shadow: 0 14px 34px -16px rgba(6, 22, 79, .22);
    --shadow-lg: 0 34px 70px -28px rgba(1, 24, 118, .42);

    --container: 1200px;
    --header-h: 76px;
    --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

html[lang="en"] body { line-height: 1.7; }

img, svg { display: block; max-width: 100%; }
a { color: var(--brand-600); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-700); }
button { font: inherit; }

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.35;
}
html[lang="en"] :is(h1, h2, h3) { letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0 0 1em; }

:focus-visible {
    outline: 3px solid rgba(1, 127, 238, .45);
    outline-offset: 3px;
    border-radius: 8px;
}

::selection { background: rgba(3, 198, 254, .28); color: var(--ink); }

/* Only the active language is rendered */
html[lang="ar"] [data-lang="en"],
html[lang="en"] [data-lang="ar"] { display: none !important; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    inset-inline-start: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-weight: 600;
    transition: top .2s;
}
.skip-link:focus { top: 12px; color: #fff; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 20px;
}
@media (min-width: 768px) { .container { padding-inline: 32px; } }

.icon {
    width: 1.25em;
    height: 1.25em;
    fill: currentColor;
    flex: none;
}
[dir="rtl"] .icon-flip { transform: scaleX(-1); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55em;
    min-height: 50px;
    padding: .7em 1.4em;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, background-color .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    color: #fff;
    background: var(--grad);
    box-shadow: 0 12px 26px -12px rgba(1, 127, 238, .8);
}
.btn-primary:hover { color: #fff; box-shadow: 0 18px 32px -14px rgba(1, 127, 238, .85); }

.btn-ghost { color: var(--ink); background: #fff; border-color: var(--line); }
.btn-ghost:hover { color: var(--brand-700); border-color: #c9d9f4; }

.btn-light { color: var(--brand-800); background: #fff; }
.btn-light:hover { color: var(--brand-700); box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .45); }

.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-outline-light:hover { color: #fff; background: rgba(255, 255, 255, .1); border-color: #fff; }

.btn-sm { min-height: 42px; padding: .5em 1.05em; font-size: .95rem; border-radius: 12px; }

/* ---------- Store badges ---------- */
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }

.store-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 184px;
    padding: 10px 18px;
    border-radius: 14px;
    background: #0b1026;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .1);
    transition: transform .2s, box-shadow .2s;
}
.store-badge:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(0, 0, 0, .7); }
.store-badge .icon { width: 28px; height: 28px; }
.store-badge .txt { display: flex; flex-direction: column; line-height: 1.25; text-align: start; }
.store-badge small { font-size: .72rem; opacity: .78; }
.store-badge strong { font-size: 1.08rem; font-weight: 600; }
.store-badge.is-soon { cursor: default; }
.store-badge.is-soon:hover { transform: none; box-shadow: none; }
.store-badge .soon {
    position: absolute;
    top: -9px;
    inset-inline-end: 10px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--aqua);
    color: var(--navy);
    font-size: .68rem;
    font-weight: 700;
    line-height: 1.6;
}
@media (max-width: 480px) {
    .store-badges { gap: 10px; }
    .store-badge { flex: 1 1 140px; min-width: 0; gap: 9px; padding: 10px 12px; }
    .store-badge .icon { width: 24px; height: 24px; }
    .store-badge strong { font-size: .98rem; }
}
.on-dark .store-badge { background: rgba(5, 15, 58, .55); border-color: rgba(255, 255, 255, .22); }
.on-dark .store-badge:hover { background: rgba(5, 15, 58, .75); }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .86);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled {
    border-color: var(--line);
    box-shadow: 0 8px 26px -20px rgba(6, 22, 79, .45);
}

.header-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    flex: none;
}
.brand:hover { color: var(--ink); }
.brand img { width: 46px; height: 46px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name .ar { font-size: 1.5rem; font-weight: 700; }
.brand-name .en {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .28em;
    color: var(--brand-500);
}

.nav { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.nav a {
    padding: .45em .85em;
    border-radius: 10px;
    color: var(--text);
    font-weight: 500;
    font-size: .98rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand-700); background: var(--bg-tint); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
.lang-toggle:hover { border-color: #c9d9f4; color: var(--brand-700); }
.lang-toggle .icon { width: 18px; height: 18px; color: var(--brand-600); }

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.menu-toggle .icon { width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1023px) {
    .menu-toggle { display: inline-flex; }
    .header-actions { margin-inline-start: auto; }
    .nav {
        position: absolute;
        top: calc(100% + 6px);
        inset-inline: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin: 0;
        padding: 10px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: var(--shadow-lg);
    }
    .nav.is-open { display: flex; }
    .nav a { padding: .75em 1em; font-size: 1.02rem; }
}
@media (max-width: 560px) {
    .header-actions .btn-download { display: none; }
    .brand img { width: 40px; height: 40px; }
    .brand-name .ar { font-size: 1.3rem; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-soft { background: var(--bg-soft); }

.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.section-head p { margin: 0; color: var(--muted); font-size: 1.1rem; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-tint);
    color: var(--brand-700);
    font-weight: 600;
    font-size: .9rem;
    line-height: 1.5;
}
.eyebrow .icon { width: 18px; height: 18px; }

.text-grad {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(40px, 6vw, 72px) clamp(64px, 8vw, 104px);
    background:
        radial-gradient(900px 520px at 12% -8%, rgba(3, 198, 254, .22), transparent 62%),
        radial-gradient(700px 520px at 105% 108%, rgba(1, 127, 238, .12), transparent 60%),
        linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%);
}
[dir="ltr"] .hero {
    background:
        radial-gradient(900px 520px at 88% -8%, rgba(3, 198, 254, .22), transparent 62%),
        radial-gradient(700px 520px at -5% 108%, rgba(1, 127, 238, .12), transparent 60%),
        linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%);
}

/* Heartbeat line running behind the phone mockup */
.hero-ecg {
    position: absolute;
    inset-inline: -24px;
    top: 50%;
    z-index: 0;
    width: calc(100% + 48px);
    height: 170px;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: .7;
}
[dir="rtl"] .hero-ecg { transform: translateY(-50%) scaleX(-1); }
.hero-ecg path {
    fill: none;
    stroke: url(#ecg-grad);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: ecg-draw 3.2s ease-out .3s forwards;
}
@keyframes ecg-draw { to { stroke-dashoffset: 0; } }

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    align-items: center;
    gap: 48px;
}

.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin-bottom: .45em; }
.hero .lead { max-width: 34em; font-size: clamp(1.06rem, 1.5vw, 1.2rem); color: var(--text); }
.hero .store-badges { margin-top: 30px; }

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}
.hero-points li { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; font-size: .98rem; }
.hero-points .icon { color: var(--teal); width: 20px; height: 20px; }

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    min-height: 620px;
}
.hero-visual::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(3, 198, 254, .38) 0%, rgba(1, 127, 238, .1) 55%, transparent 70%);
}

/* Phone mockup */
.phone {
    position: relative;
    z-index: 1;
    width: 300px;
    height: 612px;
    padding: 11px;
    border-radius: 50px;
    background: #0a1233;
    box-shadow: 0 50px 90px -34px rgba(1, 24, 118, .6), inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.phone::before {
    content: "";
    position: absolute;
    top: 21px;
    left: 50%;
    z-index: 3;
    width: 90px;
    height: 26px;
    border-radius: 20px;
    background: #0a1233;
    transform: translateX(-50%);
}
.screen {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 40px;
    background: #f4f7fe;
    font-size: 13px;
    line-height: 1.5;
}
.app-top {
    padding: 56px 18px 52px;
    border-radius: 0 0 26px 26px;
    background: var(--grad);
    color: #fff;
}
.app-greet { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-greet small { display: block; opacity: .85; font-size: .82em; }
.app-greet strong { display: block; font-size: 1.12em; }
.app-avatar {
    width: 38px; height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .2);
    font-weight: 700;
}
.app-search {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -26px 14px 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    color: var(--muted);
    font-size: .88em;
    box-shadow: var(--shadow);
}
.app-search .icon { width: 17px; height: 17px; color: var(--brand-500); }
.app-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 16px 12px 4px; }
.app-chip { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--ink); font-weight: 500; font-size: .76em; text-align: center; }
.app-chip .ic {
    width: 46px; height: 46px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--brand-600);
    box-shadow: var(--shadow-sm);
}
.app-chip .ic .icon { width: 20px; height: 20px; }
.app-chip.is-active .ic { background: var(--grad); color: #fff; }
.app-title { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 8px; font-weight: 700; color: var(--ink); font-size: .92em; }
.app-title a, .app-title span.link { color: var(--brand-500); font-weight: 600; font-size: .9em; }
.doc-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 10px;
    margin: 0 12px;
    padding: 12px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.doc-avatar {
    width: 50px; height: 50px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: var(--grad-aqua);
    color: #fff;
    font-weight: 700;
    font-size: 1.05em;
}
.doc-meta strong { display: block; color: var(--ink); font-size: .95em; }
.doc-meta small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .8em; }
.doc-meta .icon { width: 13px; height: 13px; }
.doc-meta .rating { color: var(--amber); }
.slots { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.slot {
    padding: 6px 0;
    border-radius: 9px;
    background: var(--bg-tint);
    color: var(--brand-700);
    font-weight: 600;
    font-size: .78em;
    text-align: center;
    direction: ltr;
}
.slot.is-active { background: var(--grad); color: #fff; }
.slot.is-off { background: #f1f3f8; color: #b3bdd1; text-decoration: line-through; }
.app-cta {
    margin: 12px 12px 0;
    padding: 11px;
    border-radius: 14px;
    background: var(--grad);
    color: #fff;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 10px 20px -12px rgba(1, 127, 238, .9);
}
.app-nav {
    display: flex;
    justify-content: space-around;
    margin-top: auto;
    padding: 12px 8px 20px;
    background: #fff;
    border-top: 1px solid var(--line);
    color: #a9b5cc;
}
.app-nav .icon { width: 22px; height: 22px; }
.app-nav .is-active { color: var(--brand-600); }

.float-card {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: 250px;
    padding: 12px 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}
.float-card .ic {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0fcfc0, #03c6fe);
    color: #fff;
    flex: none;
}
.float-card .ic .icon { width: 22px; height: 22px; }
.float-card.is-blue .ic { background: var(--grad); }
.float-card strong { display: block; color: var(--ink); font-size: .92rem; line-height: 1.35; }
.float-card small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; }
/* "a" sticks out on the phone's outer side (away from the text); "b" sits over the phone like an in-app toast.
   Neither can reach into the text column, in either direction. */
.float-a { top: 150px; inset-inline-start: calc(50% + 104px); }
.float-b { bottom: 66px; inset-inline-start: calc(50% - 178px); animation-delay: -3s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (min-width: 960px) and (max-width: 1180px) {
    .float-a { inset-inline-start: auto; inset-inline-end: -8px; }
}
@media (max-width: 959px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero .lead { margin-inline: auto; }
    .hero .store-badges, .hero-points { justify-content: center; }
    .hero-visual { min-height: 0; padding-block: 12px 8px; }
}
@media (max-width: 560px) {
    .phone { width: 272px; height: 560px; }
    .float-a { top: 120px; inset-inline-start: auto; inset-inline-end: -4px; }
    .float-b { bottom: 58px; inset-inline-start: -4px; }
    .float-card { padding: 10px 12px; }
    .float-card small { display: none; }
}

/* ---------- Trust strip ---------- */
.trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: -40px;
    position: relative;
    z-index: 2;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.trust-item .ic {
    width: 46px; height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--bg-tint);
    color: var(--brand-600);
    flex: none;
}
.trust-item strong { display: block; color: var(--ink); font-size: 1rem; line-height: 1.35; }
.trust-item small { display: block; color: var(--muted); font-size: .86rem; line-height: 1.45; }
@media (max-width: 1023px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .trust { grid-template-columns: 1fr; margin-top: -24px; } }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
    padding: 28px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3e1f7; }
.feature-icon {
    width: 56px; height: 56px;
    margin-bottom: 20px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    background: var(--grad);
    color: #fff;
    box-shadow: 0 12px 22px -12px rgba(1, 127, 238, .9);
}
.feature:nth-child(3n+2) .feature-icon { background: var(--grad-aqua); box-shadow: 0 12px 22px -12px rgba(3, 198, 254, .9); }
.feature:nth-child(3n) .feature-icon { background: var(--grad-deep); }
.feature-icon .icon { width: 27px; height: 27px; }
.feature h3 { font-size: 1.22rem; margin-bottom: .35em; }
.feature p { margin: 0; color: var(--muted); font-size: .99rem; }
@media (max-width: 959px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
.steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.steps::before {
    content: "";
    position: absolute;
    top: 38px;
    inset-inline: 12.5%;
    border-top: 2px dashed #c5d6f2;
}
.step { position: relative; text-align: center; counter-increment: step; }
.step-icon {
    position: relative;
    width: 76px; height: 76px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--brand-600);
    box-shadow: var(--shadow);
}
.step-icon .icon { width: 32px; height: 32px; }
.step-icon::after {
    content: counter(step);
    position: absolute;
    top: -4px;
    inset-inline-end: -6px;
    width: 28px; height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--grad);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 4px var(--bg-soft);
}
.step h3 { font-size: 1.15rem; margin-bottom: .3em; }
.step p { margin: 0 auto; max-width: 17em; color: var(--muted); font-size: .97rem; }
@media (max-width: 959px) {
    .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
    .steps::before { display: none; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Specialties ---------- */
.specialties { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.specialty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 10px 20px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    font-weight: 600;
    font-size: .98rem;
    line-height: 1.4;
    text-align: center;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.specialty:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3e1f7; }
.specialty .sp-ic {
    width: 62px; height: 62px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--bg-tint);
    color: var(--brand-600);
    transition: background .25s, color .25s;
}
.specialty .sp-ic .icon { width: 26px; height: 26px; }
.specialty:hover .sp-ic { background: var(--grad); color: #fff; }
.specialties-note { margin: 28px 0 0; text-align: center; color: var(--muted); }
@media (max-width: 1100px) { .specialties { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px) { .specialties { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .specialties { grid-template-columns: repeat(2, 1fr); } }

/* ---------- For clinics (dark band) ---------- */
.on-dark { color: rgba(255, 255, 255, .84); }
.on-dark h2, .on-dark h3 { color: #fff; }
.on-dark .eyebrow { background: rgba(255, 255, 255, .12); color: #fff; }

.clinics {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(800px 420px at 90% -10%, rgba(3, 198, 254, .38), transparent 60%),
        radial-gradient(600px 400px at -10% 110%, rgba(6, 247, 228, .16), transparent 60%),
        var(--grad-deep);
}
.clinics-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; }
.clinics h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.clinics .lead { font-size: 1.1rem; }

.checklist { display: grid; gap: 16px; margin: 28px 0 34px; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: flex-start; gap: 12px; }
.checklist .icon { width: 24px; height: 24px; margin-top: .2em; color: var(--aqua); }
.checklist strong { display: block; color: #fff; }
.checklist span { font-size: .97rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.dash {
    padding: 22px;
    border-radius: 26px;
    background: #fff;
    color: var(--text);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .55);
    font-size: .92rem;
    line-height: 1.5;
}
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dash-head strong { color: var(--ink); font-size: 1.05rem; }
.dash-head small { color: var(--muted); }
.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.dash-stat { padding: 12px 14px; border-radius: 14px; background: var(--bg-soft); }
.dash-stat small { display: block; color: var(--muted); font-size: .8rem; }
.dash-stat b { display: block; color: var(--ink); font-size: 1.4rem; line-height: 1.3; }
.dash-stat em { font-style: normal; color: #0b9a89; font-size: .78rem; font-weight: 600; }
.dash-row {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
}
.dash-time { color: var(--ink); font-weight: 600; font-size: .86rem; direction: ltr; }
.dash-av {
    width: 36px; height: 36px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--bg-tint);
    color: var(--brand-700);
    font-weight: 700;
    font-size: .85rem;
}
.dash-row strong { display: block; color: var(--ink); font-size: .92rem; }
.dash-row small { color: var(--muted); font-size: .8rem; }
.chip { padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.chip-ok { background: #e2f8f4; color: #0b8a7b; }
.chip-wait { background: #fff4df; color: #a86a0c; }
.chip-new { background: var(--bg-tint); color: var(--brand-700); }
.dash-bars { display: flex; align-items: flex-end; gap: 8px; height: 70px; margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.dash-bars span { flex: 1; border-radius: 6px 6px 3px 3px; background: var(--bg-tint); }
.dash-bars span.hi { background: var(--grad); }

@media (max-width: 959px) {
    .clinics-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 480px) {
    .dash { padding: 16px; }
    .dash-stats { gap: 6px; }
    .dash-stat { padding: 10px; }
    .dash-stat b { font-size: 1.15rem; }
    .dash-row { grid-template-columns: auto 1fr auto; }
    .dash-row .dash-av { display: none; }
}

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; align-items: start; gap: 56px; }
.faq-intro h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
.faq-intro p { color: var(--muted); }
.faq-intro .help-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
    padding: 18px;
    border-radius: 18px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
}
.help-card .ic {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--grad);
    color: #fff;
    flex: none;
}
.help-card strong { display: block; color: var(--ink); }
.help-card a { font-weight: 600; }

.faq details {
    margin-bottom: 12px;
    padding: 0 22px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--line);
    transition: border-color .2s, box-shadow .2s;
}
.faq details[open] { border-color: #cddffb; box-shadow: var(--shadow); }
.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    color: var(--ink);
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon {
    width: 30px; height: 30px;
    padding: 5px;
    border-radius: 50%;
    background: var(--bg-tint);
    color: var(--brand-600);
    transition: transform .25s, background .25s, color .25s;
}
.faq details[open] summary .icon { transform: rotate(180deg); background: var(--grad); color: #fff; }
.faq details p { margin: -4px 0 18px; color: var(--muted); }
@media (max-width: 959px) { .faq-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Download CTA ---------- */
.cta-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: clamp(24px, 5vw, 56px);
    padding: clamp(32px, 5vw, 64px);
    border-radius: 32px;
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(6, 247, 228, .3), transparent 60%),
        var(--grad);
    box-shadow: var(--shadow-lg);
}
.cta-card .cta-ecg {
    position: absolute;
    inset: auto 0 16% 0;
    width: 100%;
    height: 120px;
    opacity: .3;
    pointer-events: none;
}
[dir="rtl"] .cta-card .cta-ecg { transform: scaleX(-1); }
.cta-card .cta-ecg path { fill: none; stroke: url(#cta-ecg-grad); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
@media (max-width: 760px) { .cta-card .cta-ecg { display: none; } }
.cta-card .app-icon {
    position: relative;
    width: clamp(120px, 16vw, 168px);
    height: auto;
    transform: rotate(-6deg);
    filter: drop-shadow(0 24px 30px rgba(1, 24, 118, .45));
}
.cta-card h2 { position: relative; color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.cta-card p { position: relative; color: rgba(255, 255, 255, .88); font-size: 1.1rem; max-width: 34em; }
.cta-card .store-badges { position: relative; margin-top: 24px; }
@media (max-width: 760px) {
    .cta-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .cta-card .store-badges { justify-content: center; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(56px, 8vw, 88px) clamp(52px, 7vw, 76px);
    background:
        radial-gradient(700px 320px at 85% -10%, rgba(3, 198, 254, .35), transparent 60%),
        radial-gradient(500px 300px at 0% 110%, rgba(6, 247, 228, .14), transparent 60%),
        var(--grad-deep);
    color: rgba(255, 255, 255, .86);
    text-align: center;
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.2vw, 3.1rem); margin-bottom: .3em; }
.page-hero p { max-width: 640px; margin: 0 auto; font-size: 1.1rem; }
.page-hero .cta-ecg { position: absolute; inset: auto 0 12% 0; width: 100%; height: 110px; opacity: .22; pointer-events: none; }
[dir="rtl"] .page-hero .cta-ecg { transform: scaleX(-1); }
.page-hero .cta-ecg path { fill: none; stroke: url(#page-ecg-grad); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.breadcrumb {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, .7);
    font-size: .92rem;
}
.breadcrumb a { color: #fff; }
.breadcrumb .icon { width: 16px; height: 16px; opacity: .7; }
[dir="rtl"] .breadcrumb .icon { transform: scaleX(-1); }
.meta-date {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-size: .9rem;
}
.meta-date .icon { width: 16px; height: 16px; }

/* ---------- Legal / long-form pages ---------- */
.legal { display: grid; grid-template-columns: 270px minmax(0, 1fr); align-items: start; gap: 56px; }
.toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    padding: 22px;
    border-radius: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
}
.legal > .toc[hidden] + .prose { grid-column: 1 / -1; }
.toc-title { margin: 0 0 12px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.toc ol { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
    display: flex;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 10px;
    color: var(--text);
    font-size: .94rem;
    line-height: 1.5;
}
.toc a::before { content: counter(toc); color: var(--brand-500); font-weight: 700; min-width: 1.2em; }
.toc a:hover, .toc a.is-active { background: #fff; color: var(--brand-700); }

.prose { max-width: 780px; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose h2 {
    margin: 2.2em 0 .6em;
    font-size: clamp(1.35rem, 2.2vw, 1.6rem);
    scroll-margin-top: calc(var(--header-h) + 24px);
}
.prose h3 { margin: 1.6em 0 .5em; font-size: 1.15rem; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-inline-start: 1.4em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--brand-500); }
.prose strong { color: var(--ink); }
.prose .note {
    margin: 1.4em 0;
    padding: 16px 20px;
    border-radius: 14px;
    border-inline-start: 4px solid var(--brand-500);
    background: var(--bg-tint);
    color: var(--ink);
}
.prose .lead { font-size: 1.12rem; color: var(--ink); }
@media (max-width: 959px) {
    .legal { grid-template-columns: 1fr; gap: 28px; }
    .toc { position: static; }
}

/* ---------- Cards used on inner pages ---------- */
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1023px) { .cards-4 { grid-template-columns: repeat(2, 1fr); } .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards-2, .cards-3, .cards-4 { grid-template-columns: 1fr; } }

.info-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 26px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
a.info-card:hover, .info-card.is-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d3e1f7; }
.info-card .ic {
    width: 52px; height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--bg-tint);
    color: var(--brand-600);
}
.info-card .ic .icon { width: 25px; height: 25px; }
.info-card h3 { margin: 6px 0 0; font-size: 1.15rem; }
.info-card p { margin: 0; color: var(--muted); font-size: .98rem; }
.info-card .value { color: var(--brand-700); font-weight: 600; direction: ltr; unicode-bidi: isolate; text-align: start; overflow-wrap: anywhere; }

.split { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 56px; }
.split-visual { position: relative; display: grid; place-items: center; min-height: 360px; }
.split-visual::before {
    content: "";
    position: absolute;
    width: 360px; height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(3, 198, 254, .35), rgba(1, 127, 238, .08) 55%, transparent 70%);
}
.split-visual img { position: relative; width: min(300px, 70%); filter: drop-shadow(0 30px 40px rgba(1, 24, 118, .35)); }
@media (max-width: 959px) { .split { grid-template-columns: 1fr; gap: 32px; } .split-visual { min-height: 280px; } }

/* ---------- Footer ---------- */
.site-footer { padding-top: 72px; background: var(--navy); color: rgba(255, 255, 255, .7); font-size: .98rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 40px; }
.site-footer .brand { color: #fff; }
.site-footer .brand-name .en { color: var(--cyan); }
.footer-about p { margin: 18px 0 0; max-width: 24em; }
.site-footer h3 { margin-bottom: 18px; color: #fff; font-size: 1rem; }
.footer-links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: rgba(255, 255, 255, .72); }
.site-footer a:hover { color: #fff; }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.footer-contact .icon { width: 18px; height: 18px; color: var(--cyan); }
.footer-contact .ltr { direction: ltr; unicode-bidi: isolate; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.socials a {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    transition: background .2s, transform .2s;
}
.socials a:hover { background: rgba(255, 255, 255, .18); transform: translateY(-2px); }
.socials .icon { width: 19px; height: 19px; }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 56px;
    padding-block: 22px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: .9rem;
}
.footer-bottom .lang-toggle { background: transparent; border-color: rgba(255, 255, 255, .2); color: #fff; }
.footer-bottom .lang-toggle .icon { color: var(--cyan); }
@media (max-width: 959px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll ----------
   Pure CSS scroll-driven animation: progress follows the scroll position, so content can never
   get stuck hidden. Browsers without support simply show everything. */
@supports (animation-timeline: view()) {
    @media screen and (prefers-reduced-motion: no-preference) {
        .reveal {
            animation: reveal-in linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 60%;
        }
    }
}
@keyframes reveal-in {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .hero-ecg path { stroke-dashoffset: 0; }
}

@media print {
    .site-header, .site-footer, .toc, .cta-card, .skip-link { display: none !important; }
    .page-hero { background: none; color: #000; padding: 0 0 16px; }
    .page-hero h1 { color: #000; }
    .legal { display: block; }
    body { font-size: 12pt; }
}
