/* ==========================================================================
   Dr. Mohamed Amer — "The Suture Line"
   Mobile-first · logical properties (RTL-ready) · light/dark tokens
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #0E2A22;
  --ink-soft: #46594F;
  --bg: #F7F4EC;
  --bg-alt: #EFEADD;
  --surface: #FFFFFF;
  --primary: #0E4D3C;
  --primary-deep: #082C22;
  --deep: #0E4D3C;
  --accent: #C9A24A;
  --accent-ink: #7E5C12;
  --on-accent: #0E2A22;
  --sage: #B9D3C2;
  --sage-soft: #E3EDE4;
  --gold: #B8892C;
  --line: rgba(14, 42, 34, .12);
  --shadow: 0 1px 2px rgba(14, 42, 34, .06), 0 14px 36px -14px rgba(14, 42, 34, .22);
  --glass: rgba(255, 255, 255, .8);

  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-accent: "DM Serif Display", Georgia, serif; /* numerals & monograms in both languages */
  --display-weight: 400;

  --radius: 22px;
  --radius-sm: 14px;
  --gutter: 16px;
  --maxw: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #EEF2EA;
    --ink-soft: #A9BBB0;
    --bg: #07140F;
    --bg-alt: #0A1B15;
    --surface: #0F241C;
    --primary: #6CC4A1;
    --primary-deep: #0B2A20;
    --deep: #123A2D;
    --accent: #E0BE6A;
    --accent-ink: #E0BE6A;
    --on-accent: #0E2A22;
    --sage: #234536;
    --sage-soft: #11291F;
    --gold: #E0BE6A;
    --line: rgba(238, 242, 234, .12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 18px 44px -18px rgba(0, 0, 0, .7);
    --glass: rgba(15, 36, 28, .84);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #EEF2EA;
  --ink-soft: #A9BBB0;
  --bg: #07140F;
  --bg-alt: #0A1B15;
  --surface: #0F241C;
  --primary: #6CC4A1;
  --primary-deep: #0B2A20;
  --deep: #123A2D;
  --accent: #E0BE6A;
  --accent-ink: #E0BE6A;
  --on-accent: #0E2A22;
  --sage: #234536;
  --sage-soft: #11291F;
  --gold: #E0BE6A;
  --line: rgba(238, 242, 234, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 18px 44px -18px rgba(0, 0, 0, .7);
  --glass: rgba(15, 36, 28, .84);
  color-scheme: dark;
}

html:lang(ar) {
  --font-display: "Noto Kufi Arabic", "Tajawal", Tahoma, sans-serif;
  --font-body: "Tajawal", Tahoma, system-ui, sans-serif;
  --display-weight: 700;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-variant-numeric: lining-nums; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.7;
  font-synthesis-weight: none;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; font-weight: var(--display-weight); }
html:lang(ar) h1, html:lang(ar) h2, html:lang(ar) h3 { line-height: 1.5; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 640px) { :root { --gutter: 28px; } }
@media (min-width: 1280px) { :root { --gutter: 40px; } }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* SVG icon defaults (line icons) */
.b-icon svg, .btn svg, .chip svg, .socials svg, .tool-btn svg, .teach-badge svg, .award-icon, .cta-paw, .pull-quote svg {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-inline-end: auto; }
.brand-mark {
  display: block; flex: none; width: 46px; height: 46px; border-radius: 11px;
  box-shadow: 0 6px 16px -8px rgba(14, 77, 60, .6);
  transition: transform .4s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: var(--display-weight); }
.brand-text small { color: var(--ink-soft); font-size: .78rem; }

.nav { display: none; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: .93rem; color: var(--ink-soft);
  padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--ink); background: var(--sage-soft); }
.nav a.active { color: var(--primary); }
.nav .nav-cta { background: var(--ink); color: var(--bg); padding-inline: 18px; }
.nav .nav-cta:hover { background: var(--primary); color: var(--bg); }

.header-tools { display: flex; align-items: center; gap: 8px; }
.tool-btn {
  display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; font: inherit; font-weight: 700; transition: transform .2s var(--ease), border-color .2s;
}
.tool-btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.tool-btn svg { width: 20px; height: 20px; }
.lang-label { font-family: "Tajawal", sans-serif; font-size: .92rem; }
html:lang(ar) .lang-label { font-family: "DM Sans", sans-serif; }

.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

.menu-btn { gap: 4px; align-content: center; }
.menu-btn span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 959.98px) {
  .brand-text small { display: none; }
  .nav {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; top: 68px; inset-inline: 0; height: calc(100dvh - 68px);
    padding: 24px var(--gutter); background: var(--bg);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); padding: 12px 4px; border-radius: 0; border-bottom: 1px dashed var(--line); }
  .nav a:hover { background: none; color: var(--primary); }
  .nav .nav-cta { margin-top: 16px; text-align: center; border-radius: 999px; border: 0; font-family: var(--font-body); font-size: 1.05rem; padding: 14px; }
}
@media (min-width: 960px) {
  .nav { display: flex; align-items: center; gap: 2px; }
  .menu-btn { display: none; }
}

/* ---------- The suture thread ---------- */
main { position: relative; }
.thread {
  position: absolute; top: 0; inset-inline-start: 0; z-index: 0;
  width: 64px; height: 100%; pointer-events: none; overflow: visible;
}
html[dir="rtl"] .thread { transform: scaleX(-1); }
.thread path { fill: none; stroke-linecap: round; }
.thread-ghost { stroke: var(--line); stroke-width: 2; stroke-dasharray: 10 9; }
.thread-live { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 10 9; }
@media (max-width: 639.98px) { .thread { width: 12px; opacity: .5; } }
@media (min-width: 1360px) { .thread { inset-inline-start: calc((100vw - var(--maxw)) / 2 - 80px); width: 80px; } }

main > section, main > .seam { position: relative; z-index: 1; }

/* ---------- Buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: .98rem; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transform: translate(var(--mx), var(--my));
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active, .tool-btn:active { transform: translate(var(--mx, 0px), var(--my, 0px)) scale(.97); transition-duration: .1s; }
.btn .arrow { transition: transform .25s var(--ease); }
html[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.btn:hover .arrow { transform: translateX(4px); }
html[dir="rtl"] .btn:hover .arrow { transform: scaleX(-1) translateX(4px); }

.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:hover { box-shadow: 0 16px 30px -10px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-light { background: #FAF6EF; color: #0B3B2E; }
.btn-light:hover { background: #fff; }
.btn-outline-light { border-color: rgba(250, 246, 239, .4); color: #FAF6EF; }
.btn-outline-light:hover { border-color: #FAF6EF; background: rgba(250, 246, 239, .08); }

/* ---------- Shared section bits ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section-head { margin-bottom: clamp(36px, 5vw, 60px); max-width: 760px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .kicker { justify-content: center; }
.section-head.split { max-width: none; display: grid; gap: 20px; align-items: end; }
@media (min-width: 960px) { .section-head.split { grid-template-columns: 1.2fr 1fr; gap: 64px; } }
.section-head h2 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.4rem); letter-spacing: -.015em; }
html:lang(ar) .section-head h2 { letter-spacing: 0; }
.section-sub { color: var(--ink-soft); margin: 0; }

.kicker {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  font-size: .8rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink);
}
html:lang(ar) .kicker { letter-spacing: 0; font-size: .92rem; }
.kicker-num {
  font-family: var(--font-accent); font-style: italic; font-weight: 500; letter-spacing: 0;
  font-size: .95rem; color: var(--primary);
  padding-inline-end: 12px; border-inline-end: 1.5px dashed currentColor;
}
.kicker.light { color: var(--accent); }
.kicker.light .kicker-num { color: var(--sage); }

/* Cross-stitch seam between sections */
.seam {
  height: 14px; max-width: var(--maxw); margin-inline: auto;
  background: var(--accent); opacity: .5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14'%3E%3Cpath d='M9 2l10 10M19 2L9 12' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 28px 14px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14'%3E%3Cpath d='M9 2l10 10M19 2L9 12' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 28px 14px repeat-x;
  width: calc(100% - 2 * var(--gutter));
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(64px, 8vw, 110px); overflow: hidden; }
.hero-watermark {
  position: absolute; inset-inline-end: -4vw; top: 50%; transform: translateY(-50%);
  font-family: var(--font-accent); font-weight: 800; font-size: clamp(14rem, 34vw, 32rem); line-height: .8;
  color: transparent; -webkit-text-stroke: 1.5px var(--line); letter-spacing: -.06em;
  pointer-events: none; user-select: none; z-index: -1;
}
.hero-grid { display: grid; gap: clamp(48px, 6vw, 72px); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 10px; border-radius: 999px; background: var(--sage-soft);
  font-size: .85rem; font-weight: 700; color: var(--primary); margin-bottom: 24px;
}
html[dir="rtl"] .eyebrow { padding: 7px 10px 7px 14px; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); position: relative; }
.pulse-dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

.hero-title { font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.1rem); line-height: 1.04; letter-spacing: -.015em; margin-bottom: 28px; }
html:lang(ar) .hero-title { letter-spacing: 0; line-height: 1.45; font-size: clamp(2rem, 1.2rem + 3.6vw, 3.9rem); }
.hero-title span { display: block; }
.hero-title em {
  font-style: italic; font-weight: 400; color: var(--primary);
  background: linear-gradient(transparent 74%, color-mix(in srgb, var(--accent) 30%, transparent) 74%, color-mix(in srgb, var(--accent) 30%, transparent) 90%, transparent 90%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
html:lang(ar) .hero-title em { font-style: normal; }
.hero-lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); color: var(--ink-soft); max-width: 58ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 479.98px) { .hero-actions .btn { width: 100%; } }

.ecg { width: 100%; max-width: 520px; height: 56px; margin-top: 40px; }
html[dir="rtl"] .ecg { transform: scaleX(-1); }
.ecg path {
  fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 900; stroke-dashoffset: 900; animation: ecg 3.6s var(--ease) .6s infinite;
}
@keyframes ecg { 0% { stroke-dashoffset: 900; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -900; } }

/* Portrait */
.hero-visual { position: relative; width: min(100%, 440px); margin-inline: auto; padding: 24px 12px; }
.portrait { position: relative; margin: 0; }
.portrait-blob {
  position: absolute; inset: 8% -6% -4% 6%; background: linear-gradient(160deg, var(--sage), color-mix(in srgb, var(--accent) 35%, var(--sage)));
  border-radius: 58% 42% 46% 54% / 44% 52% 48% 56%;
  animation: morph 14s ease-in-out infinite alternate;
}
@keyframes morph {
  50% { border-radius: 42% 58% 60% 40% / 56% 38% 62% 44%; }
  100% { border-radius: 50% 50% 38% 62% / 40% 60% 40% 60%; }
}
.portrait-frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 999px 999px var(--radius) var(--radius);
  background: var(--primary-deep); box-shadow: var(--shadow);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 42% 30%; }
.stitch-ring {
  position: absolute; inset: -12px; pointer-events: none;
  border-radius: 999px 999px calc(var(--radius) + 12px) calc(var(--radius) + 12px);
  border: 2px dashed var(--accent); opacity: .7;
}

.chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 16px; background: var(--glass);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  font-size: .82rem; font-weight: 700; line-height: 1.25; max-width: 190px;
  animation: float 6s ease-in-out infinite;
}
.chip svg { width: 20px; height: 20px; color: var(--accent-ink); flex: none; }
.chip-years { top: 14%; inset-inline-start: -4%; flex-direction: column; align-items: flex-start; gap: 0; }
.chip-years strong { font-family: var(--font-accent); font-weight: 600; font-size: 2.1rem; line-height: 1; color: var(--primary); }
.chip-city { bottom: 18%; inset-inline-end: -6%; animation-delay: -2s; }
.chip-lang { bottom: 2%; inset-inline-start: 4%; animation-delay: -4s; }
.chip-glyph { font-family: "Tajawal", sans-serif; color: var(--accent-ink); font-weight: 700; }
@keyframes float { 50% { transform: translateY(-8px); } }
@media (max-width: 479.98px) {
  .chip { font-size: .74rem; padding: 8px 10px; }
  .chip-years strong { font-size: 1.7rem; }
  .chip-years { inset-inline-start: 0; }
  .chip-city { inset-inline-end: 0; }
}

/* ---------- Proof strip ---------- */
.proof { padding-block: 0 clamp(40px, 6vw, 72px); }
.proof-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.proof-grid li { padding: 22px 20px; display: grid; gap: 4px; align-content: start; position: relative; }
.proof-grid li + li::before {
  content: ""; position: absolute; inset-block: 18px; inset-inline-start: 0; border-inline-start: 1.5px dashed color-mix(in srgb, var(--accent) 60%, transparent);
}
.proof-grid li:nth-child(3)::before { display: none; }
.proof-grid li:nth-child(n+3) { border-top: 1px solid var(--line); }
.proof-grid strong { font-family: var(--font-accent); font-weight: 600; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); line-height: 1.15; color: var(--primary); }
html:lang(ar) .proof-grid strong.ar-display { font-family: var(--font-display); }
.proof-grid span { font-size: .88rem; color: var(--ink-soft); font-weight: 500; }
@media (min-width: 900px) {
  .proof-grid { grid-template-columns: repeat(4, 1fr); }
  .proof-grid li { padding: 28px 30px; }
  .proof-grid li:nth-child(3)::before { display: block; }
  .proof-grid li:nth-child(n+3) { border-top: 0; }
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: 32px; }
.about-grid .section-head { margin-bottom: 0; }
.about-body p { color: var(--ink-soft); }
.about-body p:first-child { color: var(--ink); font-size: 1.15em; }
.pull-quote {
  margin: 0; padding: 28px; border-radius: var(--radius); background: var(--deep); color: #F2F8F6;
  position: relative; overflow: hidden;
}
.pull-quote svg { width: 40px; color: var(--accent); fill: currentColor; stroke: none; margin-bottom: 14px; }
html[dir="rtl"] .pull-quote svg { transform: scaleX(-1); }
.pull-quote p { font-family: var(--font-display); font-style: italic; font-size: clamp(1.35rem, 1.15rem + .7vw, 1.75rem); line-height: 1.4; margin: 0; }
html:lang(ar) .pull-quote p { font-style: normal; line-height: 1.7; }
.pull-quote::after {
  content: ""; position: absolute; inset: 10px; border-radius: calc(var(--radius) - 8px);
  border: 1.5px dashed rgba(242, 248, 246, .25); pointer-events: none;
}
.focus-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.focus-tags li {
  padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line);
  font-weight: 700; font-size: .88rem; background: var(--surface);
}
.focus-tags li:nth-child(odd) { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

@media (min-width: 960px) {
  .about-grid { grid-template-columns: 1fr 1fr; column-gap: 72px; row-gap: 40px; }
  .about-grid .section-head { grid-column: 1; grid-row: 1 / span 2; align-self: start; position: sticky; top: 110px; }
  .about-body { grid-column: 2; }
  .pull-quote { grid-column: 2; }
  .focus-tags { grid-column: 2; }
}

/* ---------- Credentials timeline ---------- */
.credentials { background: var(--bg-alt); }
.timeline { position: relative; display: grid; gap: 28px; max-width: 980px; margin-inline: auto; padding-inline-start: 44px; }
.timeline::before {
  content: ""; position: absolute; top: 6px; bottom: 6px; inset-inline-start: 13px; width: 3px;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 12px, transparent 12px 22px);
  border-radius: 3px;
}
.t-item { position: relative; }
.t-knot {
  position: absolute; inset-inline-start: -44px; top: 26px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--bg-alt); border: 3px solid var(--primary); display: grid; place-items: center;
}
.t-knot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.t-card {
  background: var(--surface); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow);
  border: 1px solid var(--line); transition: transform .3s var(--ease);
}
.t-card:hover { transform: translateY(-4px); }
.t-card h3 { font-size: clamp(1.25rem, 1.1rem + .4vw, 1.5rem); margin: 10px 0 6px; }
.t-card p { margin: 0; color: var(--ink-soft); }
.t-tag {
  display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--primary); background: var(--sage-soft); padding: 4px 10px; border-radius: 999px;
}
html:lang(ar) .t-tag { letter-spacing: 0; font-size: .82rem; }
.t-item-highlight .t-card { background: var(--deep); color: #F2F8F6; border-color: transparent; }
.t-item-highlight .t-card p { color: rgba(242, 248, 246, .8); }
.t-item-highlight .t-tag { background: var(--accent); color: var(--on-accent); }
.t-item-highlight .t-card h3 { font-family: var(--font-accent); font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); }

@media (min-width: 960px) {
  .timeline { padding-inline-start: 0; gap: 0; }
  .timeline::before { inset-inline-start: calc(50% - 1.5px); }
  .t-item { width: 50%; padding-inline-end: 56px; }
  .t-item:nth-child(even) { margin-inline-start: 50%; padding-inline: 56px 0; }
  .t-item:not(:first-child) { margin-top: -36px; }
  .t-knot { inset-inline-start: auto; inset-inline-end: -15px; }
  .t-item:nth-child(even) .t-knot { inset-inline-end: auto; inset-inline-start: -15px; }
  .t-item:nth-child(odd) .t-card { text-align: end; }
}

/* ---------- Services bento ---------- */
.bento { display: grid; gap: 16px; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } .b-wide { grid-column: span 2; } }
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .b-tall { grid-row: span 2; }
  .b-accent { grid-column: span 3; }
}
.b-card {
  position: relative; overflow: hidden; padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.b-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.b-card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.b-card p { color: var(--ink-soft); margin: 0; font-size: .96rem; }
.b-icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 22px;
  background: var(--sage-soft); color: var(--primary); transition: transform .4s var(--ease), background .3s, color .3s;
}
.b-icon svg { width: 30px; height: 30px; stroke-width: 2.4; }
.b-card:hover .b-icon { transform: rotate(-8deg) scale(1.06); background: var(--accent); color: var(--on-accent); }

.b-feature { background: var(--deep); color: #F2F8F6; border-color: transparent; min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end; }
.b-feature h3 { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.3rem); }
.b-feature p { color: rgba(242, 248, 246, .82); max-width: 44ch; font-size: 1.02rem; }
.b-feature .b-icon { position: absolute; top: 28px; inset-inline-start: 28px; background: rgba(242, 248, 246, .12); color: var(--accent); }
.b-stitch {
  position: absolute; inset-inline-end: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%;
  border: 2px dashed rgba(242, 248, 246, .25);
  box-shadow: inset 0 0 0 26px rgba(242, 248, 246, .04);
}
.b-tall { display: flex; flex-direction: column; background: linear-gradient(180deg, var(--surface), var(--sage-soft)); }
.b-tall p { margin-top: auto; }
.b-tall h3 { margin-bottom: 18px; }
.b-accent { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
@media (min-width: 640px) { .b-accent { display: grid; grid-template-columns: auto 1fr; column-gap: 24px; align-items: center; } .b-accent .b-icon { grid-row: span 2; margin: 0; } }
.fine-print { margin-top: 24px; font-size: .86rem; color: var(--ink-soft); text-align: center; }

/* ---------- Teaching band ---------- */
.teaching { background: var(--primary-deep); color: #EAF3F0; padding-block: clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.teaching::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(234, 243, 240, .12) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
}
.teaching-inner { position: relative; display: grid; gap: 28px; align-items: center; }
.teaching h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); max-width: 18ch; }
.teach-badge {
  width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); transform: rotate(-6deg);
}
.teach-badge svg { width: 46px; height: 46px; }
.teach-list { display: grid; gap: 12px; }
.teach-list li {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--radius-sm);
  border: 1.5px dashed rgba(234, 243, 240, .25); font-weight: 700; font-size: 1.05rem;
}
.tl-num { font-family: var(--font-accent); font-style: italic; color: var(--accent); font-size: 1.3rem; min-width: 28px; }
@media (min-width: 960px) { .teaching-inner { grid-template-columns: auto 1.2fr 1fr; gap: 48px; } }

/* ---------- Leadership ---------- */
.lead-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .lead-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.lead-card {
  position: relative; padding: 32px 28px 28px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s;
}
.lead-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.lead-card h3 { font-size: 1.5rem; margin-bottom: 8px; }
.lead-card p { margin: 0; color: var(--ink-soft); }
.lead-index {
  position: absolute; inset-inline-end: 18px; top: -10px;
  font-family: var(--font-accent); font-style: italic; font-size: 6rem; line-height: 1; font-weight: 700;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--primary) 30%, transparent);
}
.lead-card::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 28px; bottom: 28px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--primary);
}
html[dir="rtl"] .lead-card::before { border-radius: 4px 0 0 4px; }
.lead-award {
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 18%, var(--surface)), var(--surface) 70%);
  border-color: color-mix(in srgb, var(--gold) 55%, transparent);
}
.lead-award::before { background: var(--gold); }
.award-icon { width: 44px; height: 44px; color: var(--gold); margin-bottom: 14px; }

/* ---------- What to expect ---------- */
.expect { background: var(--bg-alt); }
.expect-list { display: grid; gap: 16px; counter-reset: e; }
.expect-list li {
  position: relative; padding: 26px 24px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line);
}
.expect-list h3 { font-size: 1.25rem; margin-bottom: 8px; }
.expect-list p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.e-num {
  display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px; border-radius: 50%;
  border: 2px dashed var(--accent); color: var(--accent-ink);
  font-family: var(--font-accent); font-weight: 700; font-size: 1rem;
}
@media (min-width: 640px) { .expect-list { grid-template-columns: repeat(2, 1fr); } .expect-list li:last-child { grid-column: span 2; } }
@media (min-width: 1100px) {
  .expect-list { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .expect-list li:last-child { grid-column: auto; }
  .expect-list li:nth-child(even) { transform: translateY(32px); }
  .expect-list li:nth-child(even).reveal:not(.in) { transform: translateY(56px); }
}

/* ---------- Clinic ---------- */
.clinic-grid { display: grid; gap: 20px; }
@media (min-width: 960px) { .clinic-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.clinic-card {
  position: relative; padding: clamp(28px, 4vw, 44px); border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.clinic-card h2 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); margin-bottom: 14px; }
.clinic-card > p { color: var(--ink-soft); }
.clinic-logo {
  position: absolute; top: clamp(28px, 4vw, 44px); inset-inline-end: clamp(28px, 4vw, 44px);
  width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-family: var(--font-accent); font-weight: 800; font-size: 1.05rem;
  transform: rotate(-10deg);
}
.clinic-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; }
.clinic-tags li { padding: 6px 14px; border-radius: 999px; background: var(--sage-soft); color: var(--primary); font-weight: 700; font-size: .85rem; }
.clinic-info { display: grid; gap: 14px; margin: 0 0 28px; padding-block: 20px; border-block: 1.5px dashed var(--line); }
@media (min-width: 480px) { .clinic-info { grid-template-columns: 1fr 1fr; } }
.clinic-info dt { font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
html:lang(ar) .clinic-info dt { letter-spacing: 0; font-size: .85rem; }
.clinic-info dd { margin: 4px 0 0; font-weight: 600; }
.phone-link { text-decoration: none; color: var(--primary); unicode-bidi: isolate; }
.phone-link:hover { text-decoration: underline; }
html:lang(ar) .clinic-info dd .phone-link { display: inline-block; }

.map-wrap { border-radius: var(--radius); overflow: hidden; min-height: 340px; background: var(--sage-soft); border: 1px solid var(--line); position: relative; }
.map-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.75) sepia(.12); }
:root[data-theme="dark"] .map-wrap iframe { filter: invert(.9) hue-rotate(180deg) saturate(.7) brightness(.95); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map-wrap iframe { filter: invert(.9) hue-rotate(180deg) saturate(.7) brightness(.95); } }
.map-badge {
  position: absolute; inset-inline-start: 16px; bottom: 16px; z-index: 1; display: inline-flex; gap: 6px;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-weight: 700; font-size: .9rem; text-decoration: none; box-shadow: var(--shadow);
}
.map-badge:hover { background: var(--accent); color: var(--on-accent); }
.map-placeholder { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 8px; padding: 24px; text-align: center; color: var(--ink-soft); font-weight: 700; }
.map-placeholder { text-decoration: none; transition: background .3s; }
.map-placeholder:hover { background: color-mix(in srgb, var(--accent) 10%, var(--sage-soft)); }
.map-placeholder svg { width: min(100%, 360px); transition: transform .5s var(--ease); }
.map-placeholder:hover svg { transform: scale(1.04); }
.map-open { display: inline-flex; gap: 6px; padding: 10px 20px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; }
.map-road { fill: none; stroke: var(--surface); stroke-width: 10; stroke-linecap: round; }
.map-road.thin { stroke-width: 3; opacity: .7; }
.map-pin path { fill: var(--accent); }
.map-pin circle { fill: var(--surface); }
.map-pin { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* ---------- CTA ---------- */
.cta { padding-block: 0 clamp(72px, 10vw, 120px); }
.cta-inner {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 64px);
  border-radius: clamp(24px, 4vw, 40px);
  background:
    radial-gradient(600px 300px at 85% -10%, color-mix(in srgb, #C9A24A 45%, transparent), transparent 70%),
    radial-gradient(500px 300px at 0% 110%, rgba(185, 211, 194, .22), transparent 70%),
    #0E4D3C;
  color: #FAF6EF;
}
:root[data-theme="dark"] .cta-inner { background-color: #0B2A20; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta-inner { background-color: #0B2A20; } }
.cta-inner::after {
  content: ""; position: absolute; inset: 14px; border-radius: inherit; pointer-events: none;
  border: 2px dashed rgba(250, 246, 239, .22);
}
.cta-paw { width: 54px; height: 54px; margin: 0 auto 20px; color: #E0BE6A; }
.cta h2 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.8rem); max-width: 18ch; margin: 0 auto 16px; }
.cta p { color: rgba(250, 246, 239, .82); max-width: 52ch; margin: 0 auto 32px; }
.cta-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (max-width: 479.98px) { .cta-actions .btn { width: 100%; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px; }
.footer-inner { display: grid; gap: 24px; align-items: center; }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 1fr auto; } .copyright { grid-column: 1 / -1; } }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand p { margin: 0; font-size: .9rem; color: var(--ink-soft); line-height: 1.5; }
.footer-brand strong { color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; }
.socials { display: flex; gap: 10px; }
.socials a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); transition: transform .2s var(--ease), color .2s, border-color .2s;
}
.socials a:hover { transform: translateY(-3px); color: var(--accent-ink); border-color: var(--accent); }
.socials svg { width: 20px; height: 20px; }
.copyright { margin: 0; font-size: .82rem; color: var(--ink-soft); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (min-width: 1100px) { .js .expect-list li:nth-child(even).reveal.in { transform: translateY(32px); } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .ecg path { stroke-dashoffset: 0; }
  .btn { transform: none; }
}
