/* ==========================================================================
   Dr Slim Chtourou — "The trace"
   ECG paper, ink navy, one cardiac red. Gloock + Schibsted Grotesk / Amiri + Tajawal.
   ========================================================================== */

@font-face { font-family: "Gloock"; src: url("../fonts/gloock-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 400 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+2248, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/schibsted-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations"); font-weight: 400 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Amiri"; src: url("../fonts/amiri-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Amiri"; src: url("../fonts/amiri-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Tajawal"; src: url("../fonts/tajawal-arabic-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Tajawal"; src: url("../fonts/tajawal-arabic-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Tajawal"; src: url("../fonts/tajawal-arabic-500-normal.woff2") format("woff2"); font-weight: 500 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }
@font-face { font-family: "Tajawal"; src: url("../fonts/tajawal-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200E; }

:root {
  --paper: #f7f8fa;
  --paper-2: #eef0f4;
  --white: #ffffff;
  --ink: #131b2e;
  --ink-2: #48526a;
  --mist: #8a93a6;
  --rule: #dde1e8;
  --red: #b5172f;
  --red-deep: #8f1024;
  --red-tint: #fbe9ec;
  --navy: #0f1a33;
  --navy-2: #16244a;
  --navy-line: #283a66;
  --ok: #1f7a50;
  --warn: #a8650a;
  --grid-minor: rgba(222, 110, 128, .10);
  --grid-major: rgba(222, 110, 128, .24);

  --f-display: "Gloock", Georgia, "Times New Roman", serif;
  --f-text: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-xs: .8125rem; --t-sm: .9375rem; --t-md: 1.0625rem; --t-lg: 1.3125rem;
  --t-xl: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  --t-2xl: clamp(2.4rem, 1.4rem + 3.6vw, 4.2rem);
  --t-hero: clamp(3.2rem, 1rem + 6vw, 7rem);
  --gutter: clamp(1.25rem, .5rem + 3.4vw, 4rem);
  --max: 80rem;
  --header-h: 4.5rem;
  --beat: .833s;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
}
[dir="rtl"] { --f-display: "Amiri", "Tajawal", serif; --f-text: "Tajawal", "Schibsted Grotesk", Tahoma, sans-serif; }

*, *::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) + 1rem); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--f-text); font-size: var(--t-md); line-height: 1.6; overflow-x: hidden; overflow-x: clip; }
[dir="rtl"] body { font-size: 1.125rem; line-height: 1.8; }
img, svg, iframe, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.i { width: 1.1em; height: 1.1em; flex: none; }
.nowrap { white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100; background: var(--red); color: #fff; padding: .6rem 1rem; text-decoration: none; }
.skip-link:focus { top: 1rem; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.grid-paper {
  background-color: var(--white);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px), linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px), linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
  background-position: -1px -1px;
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; font-size: var(--t-sm); font-weight: 600; text-decoration: none;
  border-radius: 10px; padding: .85rem 1.4rem; border: 1px solid transparent; cursor: pointer; transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease); }
.btn:active { transform: scale(.97); }
.btn--sm { padding: .6rem 1rem; }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--navy-2); }
.btn--white { background: #fff; color: var(--ink); box-shadow: 0 6px 18px -10px rgba(19, 27, 46, .5); }
.btn--line { border-color: var(--navy-line); color: #fff; background: transparent; }
.btn--line:hover { border-color: #fff; }
.btn--icon { padding: .85rem; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); transition: background-color .35s, box-shadow .35s, transform .5s var(--ease); }
.site-header.is-solid { background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--rule); }
.header__row { height: 100%; display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-inline-end: auto; }
.brand__mark { width: 40px; height: 24px; fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--f-display); font-size: 1.2rem; }
[dir="rtl"] .brand__name { font-weight: 700; font-size: 1.3rem; }
.brand__role { font-size: var(--t-xs); color: var(--ink-2); }
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a { text-decoration: none; font-size: var(--t-sm); font-weight: 500; color: var(--ink-2); position: relative; transition: color .2s; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); }
.nav a[aria-current="true"]::after { content: ""; position: absolute; inset-inline: 0; bottom: -.45rem; height: 2px; background: var(--red); border-radius: 2px; }
.nav .lang { border: 1px solid var(--rule); border-radius: 8px; padding: .25rem .7rem; background: #fff; }
.menu-btn { display: none; background: none; border: 0; padding: .5rem; margin-inline-end: -.5rem; cursor: pointer; }
.menu-btn span { display: block; width: 24px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .35s var(--ease); }
.menu-btn span + span { margin-top: 6px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: calc(var(--header-h) + clamp(1.5rem, 4vh, 3rem)); min-height: min(100svh, 980px); display: flex; flex-direction: column; justify-content: flex-end; }
.hero__grid { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2rem; align-items: end; flex: 1; }
.hero__text { padding-bottom: calc(150px + clamp(2.5rem, 7vh, 4.5rem) + 2.75rem); align-self: end; }
.status { display: inline-flex; align-items: center; gap: .55rem; font-size: var(--t-sm); font-weight: 600; background: #fff; border: 1px solid var(--rule); border-radius: 99px; padding: .3rem .85rem .3rem .7rem; margin-bottom: 1.5rem; }
.status i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--mist); }
.status.is-open { color: var(--ok); }
.status.is-open i { background: var(--ok); box-shadow: 0 0 0 0 rgba(31, 122, 80, .5); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(31, 122, 80, .45); } 70% { box-shadow: 0 0 0 9px rgba(31, 122, 80, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 122, 80, 0); } }
.hero__role { font-size: var(--t-md); font-weight: 600; color: var(--red); margin-bottom: .75rem; }
.hero__name { font-family: var(--f-display); font-size: var(--t-hero); line-height: .95; letter-spacing: -.02em; margin-bottom: 1.5rem; }
.hero__dr { display: block; font-size: .3em; letter-spacing: 0; color: var(--ink-2); margin-bottom: .2em; }
.hero__name .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__name .line > span { display: block; }
.hero__name .line + .line { padding-inline-start: .55em; }
[dir="rtl"] .hero__name { font-weight: 700; line-height: 1.25; letter-spacing: 0; font-size: clamp(3.6rem, 1.4rem + 7vw, 8rem); }
[dir="rtl"] .hero__name .line { padding-bottom: .12em; }
.hero__lead { max-width: 42ch; color: var(--ink-2); font-size: var(--t-lg); line-height: 1.5; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__photo { position: relative; margin: 0; align-self: end; justify-self: center; width: min(100%, 470px); }
.hero__photo::before { content: ""; position: absolute; inset: 0 -6% 18%; background: radial-gradient(closest-side, rgba(255, 255, 255, .95) 35%, rgba(255, 255, 255, 0)); z-index: -1; }
.hero__photo img { width: 100%; height: auto; }
.monitor { position: absolute; z-index: 2; inset-inline: 0; bottom: clamp(2.5rem, 7vh, 4.5rem); height: 150px; pointer-events: none; }
.hero__photo { z-index: 3; }
.monitor__canvas { width: 100%; height: 100%; }
.monitor__bpm { position: absolute; top: -1.6rem; inset-inline-start: var(--gutter); margin: 0; display: flex; align-items: baseline; gap: .35rem; font-size: var(--t-sm); color: var(--ink-2); }
.monitor__bpm b { font-family: var(--f-display); font-size: 2rem; line-height: 1; color: var(--red); font-weight: 400; font-variant-numeric: tabular-nums; }
.heart { width: 1.1rem; height: 1rem; fill: var(--red); align-self: center; transform-origin: center; }
.heart.is-beat { animation: beat .32s var(--ease); }
@keyframes beat { 0% { transform: scale(1); } 30% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* load sequence */
.js .hero__name .line > span { transform: translateY(105%); }
.js .hero__role, .js .hero__lead, .js .hero__actions, .js .status { opacity: 0; transform: translateY(12px); }
.js .hero__photo { opacity: 0; transform: translateY(24px) scale(.98); }
.js .monitor { opacity: 0; }
.js .site-header { transform: translateY(-100%); }
.is-ready .monitor { opacity: 1; transition: opacity .6s; }
.is-ready .hero__name .line > span { transform: none; transition: transform 1s var(--ease-io); }
.is-ready .hero__name .line:nth-of-type(1) > span { transition-delay: .25s; }
.is-ready .hero__name .line:nth-of-type(2) > span { transition-delay: .4s; }
.is-ready .hero__photo { opacity: 1; transform: none; transition: opacity 1.2s var(--ease) .5s, transform 1.4s var(--ease) .5s; }
.is-ready .hero__role, .is-ready .hero__lead, .is-ready .hero__actions, .is-ready .status { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.is-ready .hero__role { transition-delay: .15s; } .is-ready .status { transition-delay: .9s; }
.is-ready .hero__lead { transition-delay: .7s; } .is-ready .hero__actions { transition-delay: .85s; }
.is-ready .site-header { transform: none; transition-delay: .8s; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4.5rem, 9vw, 8rem); position: relative; }
.section--flush { padding-top: 0; }
.section--navy { background: var(--navy); color: #fff; }
.head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem 4rem; align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.title { font-family: var(--f-display); font-size: var(--t-2xl); line-height: 1.02; letter-spacing: -.015em; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
[dir="rtl"] .title { font-weight: 700; line-height: 1.35; letter-spacing: 0; }
.title--sm { font-size: var(--t-xl); margin-bottom: 1.5rem; }
.head__intro { color: var(--ink-2); max-width: 48ch; margin: 0; }
.section--navy .head__intro { color: #aab5cf; }
.sub { font-size: var(--t-sm); font-weight: 700; color: var(--red); margin-bottom: .9rem; }
.note { font-size: var(--t-xs); color: var(--mist); margin: 1.25rem 0 0; }
.js .reveal { clip-path: inset(0 0 100% 0); transform: translateY(.2em); }
.reveal.is-in { clip-path: inset(-.3em -.2em -.4em -.2em); transform: none; transition: clip-path .9s var(--ease-io), transform .9s var(--ease-io); }

/* ---------- Services ---------- */
.svc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 3rem; }
.svc__item { border-top: 2px solid var(--ink); padding-top: 1.75rem; }
.svc__icon { width: 56px; height: 56px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 1.5rem; }
.svc__trace { stroke: var(--red); stroke-dasharray: 80; stroke-dashoffset: 80; transition: stroke-dashoffset 1.4s var(--ease-io); }
.svc.is-in .svc__trace { stroke-dashoffset: 0; }
.svc__item h3 { font-family: var(--f-display); font-size: 1.55rem; line-height: 1.15; margin-bottom: .6rem; }
[dir="rtl"] .svc__item h3 { font-weight: 700; }
.svc__item p { color: var(--ink-2); margin: 0; font-size: var(--t-sm); }

/* ---------- Echo ---------- */
.echo-sec { background: var(--paper-2); }
.echo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.echo__screen { background: #090e19; border-radius: 26px; padding: 1rem 1.25rem 1.1rem; box-shadow: 0 30px 60px -30px rgba(15, 26, 51, .6), inset 0 0 0 1px #1c2740; color: #9fb0c8; }
.echo__hud { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--t-xs); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.echo__hud b { color: #fff; font-weight: 600; }
.echo__hud em { font-style: normal; opacity: .6; }
.echo__hud--bottom { margin-top: .25rem; }
.echo__svg { width: 100%; height: auto; margin-top: .5rem; }
.ec-fan { fill: none; stroke: #23314c; stroke-width: 1.2; }
.ec-depth line { stroke: #3a4a68; }
.ec-cav { fill: #03050a; transform-box: view-box; }
.ec-edge { fill: none; stroke: rgba(225, 233, 245, .55); stroke-width: 7; transform-box: view-box; }
.ec-lv { transform-origin: 255px 198px; } .ec-rv { transform-origin: 155px 198px; }
.ec-la { transform-origin: 256px 214px; } .ec-ra { transform-origin: 155px 214px; }
.ec-leaf { stroke: #e8edf5; stroke-width: 2.6; stroke-linecap: round; transform-box: view-box; }
.ec-leaf--m1 { transform-origin: 224px 206px; } .ec-leaf--m2 { transform-origin: 288px 206px; }
.ec-leaf--t1 { transform-origin: 124px 206px; } .ec-leaf--t2 { transform-origin: 186px 206px; }
.echo.is-live .ec-lv, .echo.is-live .ec-rv { animation: vent var(--beat) ease-in-out infinite; }
.echo.is-live .ec-la, .echo.is-live .ec-ra { animation: atri var(--beat) ease-in-out infinite; }
.echo.is-live .ec-leaf--m1, .echo.is-live .ec-leaf--t1 { animation: leafA var(--beat) ease-in-out infinite; }
.echo.is-live .ec-leaf--m2, .echo.is-live .ec-leaf--t2 { animation: leafB var(--beat) ease-in-out infinite; }
@keyframes vent { 0%, 6% { transform: scale(1); } 34% { transform: scale(.8, .85); } 52%, 100% { transform: scale(1); } }
@keyframes atri { 0%, 6% { transform: scale(.94); } 34% { transform: scale(1.06); } 52% { transform: scale(.98); } 90%, 100% { transform: scale(.94); } }
@keyframes leafA { 0%, 2% { transform: rotate(0); } 8%, 40% { transform: rotate(52deg); } 50%, 100% { transform: rotate(0); } }
@keyframes leafB { 0%, 2% { transform: rotate(0); } 8%, 40% { transform: rotate(-52deg); } 50%, 100% { transform: rotate(0); } }
.ec-sweep { stroke: rgba(180, 205, 255, .06); stroke-width: 34; transform-box: view-box; transform-origin: 200px 8px; animation: sweep 2.4s linear infinite alternate; }
@keyframes sweep { from { transform: rotate(-36deg); } to { transform: rotate(36deg); } }
.ec-sel > * { fill: rgba(255, 90, 110, .08); stroke: #ff5a6e; stroke-width: 2; stroke-dasharray: 5 4; opacity: 0; transition: opacity .35s; }
.ec-sel > .is-sel { opacity: 1; }
.ec-dot { fill: #ff5a6e; transform-box: fill-box; transform-origin: center; animation: dot 1.8s ease-in-out infinite; cursor: pointer; transition: opacity .3s; }
.ec-dot.is-sel { opacity: 0; }
@keyframes dot { 0%, 100% { transform: scale(.8); opacity: .95; } 50% { transform: scale(1.35); opacity: .5; } }
.echo__ecg { width: 100%; height: 44px; margin-top: .4rem; border-top: 1px solid #1c2740; }
.parts { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.part-btn { background: #fff; border: 1px solid var(--rule); border-radius: 99px; padding: .5rem 1rem; font-size: var(--t-sm); font-weight: 500; cursor: pointer; transition: all .25s; }
.part-btn:hover { border-color: var(--ink); }
.part-btn[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.part-panel { min-height: 11rem; }
.part-panel:not([hidden]) { animation: rise .5s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.part-panel h3 { font-family: var(--f-display); font-size: var(--t-xl); margin-bottom: .8rem; }
[dir="rtl"] .part-panel h3 { font-weight: 700; }
.part-panel p { font-size: var(--t-lg); line-height: 1.55; color: var(--ink-2); margin: 0; max-width: 40ch; }

/* ---------- ECG ---------- */
.ecg { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.ecg__beat svg { width: 100%; height: auto; overflow: visible; }
.ew-band { fill: var(--red); opacity: 0; transition: opacity .35s; cursor: pointer; }
[data-state="p"] [data-band="p"], [data-state="qrs"] [data-band="qrs"], [data-state="t"] [data-band="t"] { opacity: .1; }
.ew-line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.ecg.is-in .ew-line { stroke-dashoffset: 0; transition: stroke-dashoffset 2s var(--ease-io); }
.ew-label { font-family: var(--f-text); font-size: 15px; font-weight: 700; fill: var(--mist); transition: fill .3s; }
[data-state="p"] .ew-label:nth-of-type(1), [data-state="qrs"] .ew-label:nth-of-type(2), [data-state="t"] .ew-label:nth-of-type(3) { fill: var(--red); }
.waves { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 1rem; }
.wave-btn { background: #fff; border: 1px solid var(--rule); border-radius: 99px; padding: .5rem 1.1rem; font-size: var(--t-sm); font-weight: 600; cursor: pointer; transition: all .25s; }
.wave-btn[aria-selected="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.wave-panel { min-height: 5.5rem; background: rgba(255, 255, 255, .9); border-radius: 14px; padding: 1rem 1.2rem; border: 1px solid var(--rule); }
.wave-panel p { margin: 0; font-size: var(--t-md); }
.wave-panel p:not([hidden]) { animation: rise .45s var(--ease); }
.ecg__rate { background: #fff; border: 1px solid var(--rule); border-radius: 22px; padding: clamp(1.25rem, 3vw, 2rem); box-shadow: 0 24px 50px -36px rgba(19, 27, 46, .45); }
.rate__label { font-size: var(--t-sm); color: var(--ink-2); font-weight: 500; }
.rate__num { margin: .2rem 0 0; display: flex; align-items: baseline; gap: .5rem; }
.rate__num b { font-family: var(--f-display); font-weight: 400; font-size: clamp(3.4rem, 2.5rem + 3vw, 4.8rem); line-height: 1; font-variant-numeric: tabular-nums; }
.rate__num span { color: var(--ink-2); }
.rate__cat { font-weight: 700; color: var(--cat, var(--ok)); margin: .25rem 0 1rem; transition: color .3s; }
.rate__strip { width: 100%; height: 110px; border-radius: 12px; margin-bottom: 1rem; }
.rate__scale { position: relative; padding-bottom: 1.4rem; }
.rate__ticks span { position: absolute; bottom: 0; inset-inline-start: var(--p); transform: translateX(-50%); font-size: var(--t-xs); color: var(--mist); font-variant-numeric: tabular-nums; }
[dir="rtl"] .rate__ticks span { transform: translateX(50%); }
.rate__note { font-size: var(--t-sm); color: var(--ink-2); margin: .5rem 0 0; min-height: 4.8em; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; cursor: pointer; direction: ltr; }
[dir="rtl"] input[type="range"] { direction: rtl; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, #8aa8d6 0 16.67%, #6fc39a 16.67% 50%, #e8a0ab 50% 100%); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, #8aa8d6 0 16.67%, #6fc39a 16.67% 50%, #e8a0ab 50% 100%); }
[dir="rtl"] input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(270deg, #8aa8d6 0 16.67%, #6fc39a 16.67% 50%, #e8a0ab 50% 100%); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); }

/* ---------- Catheterisation ---------- */
.cath { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.cath__svg { width: 100%; height: auto; }
.ct-body { fill: none; stroke: #33467a; stroke-width: 2; stroke-linecap: round; }
.ct-heart { fill: rgba(181, 23, 47, .4); stroke: #e2566b; stroke-width: 1.5; }
.ct-artery { fill: none; stroke: rgba(226, 86, 107, .35); stroke-width: 5; stroke-linecap: round; }
.ct-cath { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease-io); }
.ct-entry { fill: #fff; }
.ct-label { font-family: var(--f-text); font-size: 13px; fill: #9aa8c7; }
.ct-zoomline { stroke: #33467a; stroke-dasharray: 3 4; }
.ct-panel { fill: #0a1328; stroke: var(--navy-line); }
.ct-wall { stroke: #c96a7b; stroke-width: 24; }
.ct-lumen { fill: #5b0f1e; }
.ct-contrast { fill: #e9efff; opacity: 0; transition: opacity 1s; }
.ct-plaque path { fill: #e3bc63; stroke: #b8923e; transform-box: fill-box; transition: transform 1.1s var(--ease-io); }
.ct-plaque-top { transform-origin: top; } .ct-plaque-bot { transform-origin: bottom; }
.ct-flow { animation: flow 1.6s linear infinite; }
.ct-flow circle { fill: #ff8b9c; }
@keyframes flow { from { transform: translateX(0); } to { transform: translateX(26px); } }
.ct-wire { stroke: #cfd6e4; stroke-width: 2; stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset 1.2s var(--ease-io); }
.ct-balloon { fill: rgba(120, 170, 255, .35); stroke: #9cc0ff; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; transform: scale(.5, .12); opacity: 0; transition: transform 1.1s var(--ease-io), opacity .5s; }
.ct-stent path { fill: none; stroke: #e6ebf3; stroke-width: 2; stroke-linejoin: round; }
.ct-stent { opacity: 0; transition: opacity .8s .3s; }
.ct-label--plaque { fill: #e3bc63; }
.ct-arrow { fill: none; stroke: #9aa8c7; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cath[data-step="0"] .ct-cath, .cath[data-step="1"] .ct-cath, .cath[data-step="2"] .ct-cath, .cath[data-step="3"] .ct-cath { stroke-dashoffset: 0; }
.cath[data-step="1"] .ct-contrast, .cath[data-step="2"] .ct-contrast, .cath[data-step="3"] .ct-contrast { opacity: .9; }
.cath[data-step="1"] .ct-wire, .cath[data-step="2"] .ct-wire, .cath[data-step="3"] .ct-wire { stroke-dashoffset: 0; }
.cath[data-step="2"] .ct-balloon { transform: none; opacity: 1; }
.cath[data-step="2"] .ct-plaque path, .cath[data-step="3"] .ct-plaque path { transform: scaleY(.3); }
.cath[data-step="3"] .ct-stent { opacity: 1; }
.cath[data-step="3"] .ct-flow { animation-duration: .45s; }
.cath[data-step="3"] .ct-flow circle { fill: #ffd0d7; }
.cath[data-step="3"] .ct-label--plaque { opacity: 0; }
.cath:not(.is-live) .ct-cath { stroke-dashoffset: 1; }
.csteps { display: grid; gap: .35rem; margin-bottom: 1.25rem; }
.cstep { width: 100%; display: grid; grid-template-columns: 2.2rem 1fr; align-items: center; gap: .3rem .8rem; background: transparent; border: 0; border-radius: 12px; padding: .7rem .8rem; cursor: pointer; text-align: start; color: #aab5cf; transition: background-color .3s, color .3s; position: relative; }
.cstep:hover { background: var(--navy-2); color: #fff; }
.cstep[aria-selected="true"] { background: var(--navy-2); color: #fff; }
.cstep__n { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--navy-line); font-weight: 700; font-size: var(--t-sm); }
.cstep[aria-selected="true"] .cstep__n { background: var(--red); border-color: var(--red); }
.cstep__k { font-weight: 600; }
.cstep__bar { grid-column: 2; height: 2px; background: var(--navy-line); border-radius: 2px; overflow: hidden; position: relative; }
.cstep__bar::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
[dir="rtl"] .cstep__bar::after { transform-origin: right; }
.cath.is-auto .cstep[aria-selected="true"] .cstep__bar::after { animation: bar var(--step-ms, 3600ms) linear forwards; }
@keyframes bar { to { transform: scaleX(1); } }
.cpanel { min-height: 6.5rem; color: #d6ddee; margin-bottom: 1.25rem; }
.cpanel p { margin: 0; }
.cpanel p:not([hidden]) { animation: rise .45s var(--ease); }

/* ---------- Blood pressure ---------- */
.bp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.bp__chart svg { width: 100%; height: auto; overflow: visible; }
.bz { transition: opacity .3s; }
.bz--1 { fill: #dcefe4; } .bz--2 { fill: #fbecd0; } .bz--3 { fill: #f8d8de; }
.bp__legend i.bz--1 { background: #dcefe4; } .bp__legend i.bz--2 { background: #fbecd0; } .bp__legend i.bz--3 { background: #f8d8de; }
.bgrid { stroke: #fff; stroke-width: 1.2; }
.btick { font-family: var(--f-text); font-size: 11px; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.baxis { font-family: var(--f-text); font-size: 12px; font-weight: 600; fill: var(--ink-2); }
.bdot { transition: transform .7s var(--ease); }
.bdot__c { fill: var(--ink); stroke: #fff; stroke-width: 3; }
.bdot__ring { fill: none; stroke: var(--ink); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: ring 2s var(--ease) infinite; }
@keyframes ring { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
.bguide { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 4; opacity: .45; }
.bp__inputs { display: flex; align-items: flex-end; gap: 1rem; margin-bottom: 1.75rem; }
.num { display: grid; gap: .35rem; font-size: var(--t-sm); color: var(--ink-2); font-weight: 500; }
.num small { font-size: var(--t-xs); color: var(--mist); }
.num__row { display: flex; align-items: center; border: 1px solid var(--rule); background: #fff; border-radius: 14px; overflow: hidden; }
.num input { width: 4.2ch; border: 0; background: transparent; text-align: center; font-family: "Gloock", Georgia, serif; font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); line-height: 1.15; color: var(--ink); -moz-appearance: textfield; appearance: textfield; padding: .1rem 0; font-variant-numeric: tabular-nums; }
.num input::-webkit-outer-spin-button, .num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num__b { width: 2.6rem; align-self: stretch; border: 0; background: var(--paper-2); font-size: 1.3rem; cursor: pointer; transition: background-color .2s; }
.num__b:hover { background: var(--rule); }
.num__sep { font-family: "Gloock", serif; font-size: 3rem; color: var(--mist); padding-bottom: 1.6rem; }
.bp__cat { font-family: var(--f-display); font-size: var(--t-xl); color: var(--cat, var(--ink)); margin: 0 0 .5rem; transition: color .3s; }
[dir="rtl"] .bp__cat { font-weight: 700; }
.bp__note { color: var(--ink-2); margin: 0; }
.bp__severe { margin: 1rem 0 0; padding: .9rem 1rem; border-radius: 12px; background: var(--red-tint); color: var(--red-deep); font-weight: 600; font-size: var(--t-sm); }
.bp__legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: 1.5rem; font-size: var(--t-xs); color: var(--ink-2); }
.bp__legend li { display: inline-flex; align-items: center; gap: .4rem; }
.bp__legend i { width: .9rem; height: .9rem; border-radius: 3px; display: inline-block; }

/* ---------- When to consult / visit ---------- */
.when-sec { background: var(--white); }
.when { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2.5rem, 6vw, 6rem); }
.chips { display: flex; flex-wrap: wrap; gap: .55rem; margin: 2rem 0; }
.chips li { border: 1px solid var(--rule); border-radius: 99px; padding: .55rem 1rem; font-size: var(--t-sm); font-weight: 500; background: var(--paper); }
.js .chips li { opacity: 0; transform: translateY(8px); }
.chips.is-in li { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--i) * 60ms); }
.urgent { display: flex; gap: .8rem; align-items: flex-start; background: var(--red-tint); color: var(--red-deep); border-radius: 14px; padding: 1rem 1.2rem; font-weight: 600; margin: 0; }
.urgent .i { width: 1.4rem; height: 1.4rem; margin-top: .1rem; }
.visit-steps { position: relative; }
.visit-steps::before { content: ""; position: absolute; inset-inline-start: 1.1rem; top: 1.2rem; bottom: 1.2rem; width: 2px; background: var(--rule); }
.visit-steps li { position: relative; display: grid; grid-template-columns: 2.2rem 1fr; gap: 1rem; padding-bottom: 1.4rem; }
.vs__n { position: relative; z-index: 1; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--ink); font-weight: 700; font-size: var(--t-sm); }
.visit-steps b { display: block; font-size: var(--t-md); margin-bottom: .15rem; }
.visit-steps p { margin: 0; color: var(--ink-2); font-size: var(--t-sm); }

/* ---------- Practice ---------- */
.cab-sec { background: var(--paper); }
.visit { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); }
.address { font-style: normal; font-family: var(--f-display); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); line-height: 1.2; margin-bottom: 2.25rem; }
[dir="rtl"] .address { font-weight: 700; line-height: 1.55; }
.address span { display: block; }
.address sup { font-size: .5em; line-height: 0; }
.address small { display: block; font-family: var(--f-text); font-size: var(--t-sm); color: var(--ink-2); margin-top: .7rem; }
.hours dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--rule); font-size: var(--t-md); }
.hours dl > div:last-child { border-bottom: 1px solid var(--rule); }
.hours dt { font-weight: 600; }
.hours dd { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hours .is-today dt, .hours .is-today dd { color: var(--red); }
.status--inline { margin: 1.25rem 0 0; }
.map { position: relative; border-radius: 24px; overflow: hidden; background: var(--paper-2); min-height: 26rem; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.35); }
.map__links { position: absolute; inset-inline-start: 1rem; bottom: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; z-index: 2; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--rule); }
.contact__note { margin-top: 1.25rem; }
.mail { display: inline-flex; flex-direction: column; margin-top: 2rem; text-decoration: none; }
.mail__k { font-size: var(--t-xs); color: var(--ink-2); }
.mail .ltr { font-size: clamp(1.3rem, 1rem + 1.1vw, 1.8rem); border-bottom: 2px solid var(--red); line-height: 1.35; }
.phones li { border-top: 1px solid var(--rule); }
.phones li:last-child { border-bottom: 1px solid var(--rule); }
.phones a { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; padding: 1.2rem 0; text-decoration: none; }
.phones__k { font-size: var(--t-sm); color: var(--ink-2); }
.phones__v { font-family: "Gloock", Georgia, serif; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1; text-align: start; font-variant-numeric: tabular-nums; }
[dir="rtl"] .phones__v { text-align: end; }
.phones__go { font-size: var(--t-sm); font-weight: 700; color: var(--red); }
.phones a:hover .phones__v { color: var(--red); }
.cab-sec + .section--flush, #contact, #questions { background: var(--paper); }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem 5rem; padding-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--rule); align-items: start; }
.faq-wrap .title { position: sticky; top: calc(var(--header-h) + 2rem); }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.2rem 0; font-size: var(--t-lg); font-weight: 600; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--paper-2) linear-gradient(var(--ink), var(--ink)) center / 9px 2px no-repeat; transition: transform .4s var(--ease), background-color .3s; }
.faq details:not([open]) summary::after { background: var(--paper-2) linear-gradient(var(--ink), var(--ink)) center / 9px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 9px no-repeat; }
.faq details[open] summary::after { background-color: var(--red-tint); }
.faq summary:hover { color: var(--red); }
.faq__a { color: var(--ink-2); padding-bottom: 1.4rem; max-width: 62ch; }
.faq details[open] .faq__a { animation: rise .45s var(--ease); }
#questions { padding-bottom: clamp(4.5rem, 9vw, 8rem); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #aab5cf; font-size: var(--t-sm); padding-block: 4.5rem 3rem; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem 3rem; }
.footer__sig { font-family: var(--f-display); font-size: var(--t-xl); color: #fff; line-height: 1.1; margin-bottom: .8rem; }
[dir="rtl"] .footer__sig { font-weight: 700; }
.site-footer li + li { margin-top: .35rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer sup { line-height: 0; }
.footer__legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; border-top: 1px solid var(--navy-line); padding-top: 1.5rem; font-size: var(--t-xs); }

/* ---------- Mobile call bar ---------- */
.callbar { display: none; position: fixed; z-index: 40; inset: auto .75rem calc(.75rem + env(safe-area-inset-bottom)) .75rem; gap: .5rem; transform: translateY(160%); transition: transform .5s var(--ease); }
.callbar.is-shown { transform: none; }
.callbar .btn--red { flex: 1; padding-block: 1rem; box-shadow: 0 12px 30px -12px rgba(143, 16, 36, .7); }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .nav { position: fixed; inset: 0; z-index: -1; background: var(--white); flex-direction: column; align-items: flex-start; justify-content: center; gap: .3rem; padding: var(--gutter); opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
  .nav a { font-family: var(--f-display); font-size: 2.4rem; line-height: 1.35; color: var(--ink); opacity: 0; transform: translateY(12px); transition: opacity .5s, transform .5s var(--ease); }
  [dir="rtl"] .nav a { font-weight: 700; }
  .nav a[aria-current="true"]::after { display: none; }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav.is-open a { opacity: 1; transform: none; }
  .nav .lang { font-family: var(--f-text); font-size: var(--t-md); margin-top: 1.5rem; padding: .4rem 1rem; }
  .menu-btn { display: block; }
  .header-call { display: none; }
  body.menu-open { overflow: hidden; }
  .site-header.menu-on { background: var(--white); }
  .head, .echo, .ecg, .cath, .bp, .when, .visit, .contact, .faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .echo > *, .ecg > *, .cath > *, .bp > * { min-width: 0; }
  .faq-wrap .title { position: static; }
  .svc { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  :root { --header-h: 4rem; }
  body { font-size: 1rem; }
  .hero { min-height: auto; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero__text { padding-bottom: 1.5rem; }
  .hero__photo { width: min(80%, 340px); margin-top: .5rem; justify-self: center; }
  .monitor__bpm { display: none; }
  .monitor { bottom: 2rem; height: 110px; }
  .monitor__bpm { top: -1.4rem; }
  .monitor__bpm b { font-size: 1.6rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .parts, .waves { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .parts::-webkit-scrollbar, .waves::-webkit-scrollbar { display: none; }
  .part-btn, .wave-btn { flex: none; }
  .bp__inputs { gap: .5rem; }
  .num input { width: 3.6ch; }
  .num__b { width: 2.2rem; }
  .num__sep { font-size: 2.2rem; }
  .phones a { grid-template-columns: 1fr auto; }
  .phones__k { grid-column: 1 / -1; }
  .map { min-height: 20rem; }
  .callbar { display: flex; }
  .site-footer { padding-bottom: 7rem; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
@media print { .site-header, .callbar, .map, .monitor { display: none !important; } }
