/* ════════════════════════════════════════════════════════════════
   site-v2.css — نظام تصميم beprogrammer (2026)
   Mobile-first · RTL-native · CSS variables · dark-friendly
   ════════════════════════════════════════════════════════════════ */

:root {
  /* ألوان العلامة */
  --c-green:        #16a34a;
  --c-green-2:      #0d6e3a;
  --c-green-soft:   #dcfce7;
  --c-amber:        #f59e0b;
  --c-amber-soft:   #fef3c7;
  --c-red:          #dc2626;
  --c-blue:         #3b82f6;
  --c-blue-2:       #1d4ed8;

  /* رمادي */
  --c-bg:           #f8fafc;
  --c-card:         #ffffff;
  --c-text:         #1f2937;
  --c-sub:          #6b7280;
  --c-border:       #e5e7eb;
  --c-shadow:       0 4px 12px rgba(0,0,0,.06);
  --c-shadow-lg:    0 12px 40px rgba(0,0,0,.10);

  /* تباعد */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;  --sp-8: 64px;

  /* تيبوغرافيا */
  --font: 'Tajawal', 'Cairo', 'Segoe UI', system-ui, sans-serif;
  --font-en: 'Inter', system-ui, sans-serif;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --header-h: 70px;
}

/* Reset / Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5,h6 { margin: 0 0 var(--sp-3); line-height: 1.3; font-weight: 800; color: var(--c-text); }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
p  { margin: 0 0 var(--sp-3); }
a  { color: var(--c-green); text-decoration: none; transition: color .15s; }
a:hover { color: var(--c-green-2); }
img { max-width: 100%; height: auto; display: block; }

/* Container */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-4); }

/* Section spacing */
.sec  { padding: var(--sp-7) 0; }
.sec-sm { padding: var(--sp-6) 0; }
.sec-lg { padding: var(--sp-8) 0; }
.sec__head { text-align: center; max-width: 720px; margin: 0 auto var(--sp-6); }
.sec__head h2 { margin-bottom: var(--sp-2); }
.sec__head .lead { color: var(--c-sub); font-size: 1.05rem; }
.sec__pretitle { display: inline-block; background: var(--c-green-soft); color: var(--c-green-2); font-weight: 800; font-size: .76rem; letter-spacing: 2px; padding: 5px 14px; border-radius: 99px; text-transform: uppercase; margin-bottom: var(--sp-2); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm); font-family: inherit;
  font-weight: 800; font-size: .95rem; cursor: pointer; border: 1.5px solid transparent;
  text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s, color .15s;
  white-space: nowrap;
}
.btn--sm { padding: 8px 16px; font-size: .82rem; }
.btn--lg { padding: 16px 30px; font-size: 1.05rem; }
.btn--primary { background: linear-gradient(135deg, var(--c-green), var(--c-green-2)); color: #fff; box-shadow: 0 6px 18px rgba(22,163,74,.25); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(22,163,74,.35); color: #fff; }
.btn--ghost   { background: transparent; color: var(--c-text); border-color: var(--c-border); }
.btn--ghost:hover { background: var(--c-card); border-color: var(--c-green); color: var(--c-green); }
.btn--outline { background: transparent; color: var(--c-green); border-color: var(--c-green); }
.btn--outline:hover { background: var(--c-green); color: #fff; }
.btn--wa { background: #25d366; color: #fff; }
.btn--wa:hover { background: #1ea554; color: #fff; }

/* ─── Header ─── */
.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h);
  background: rgba(255,255,255,.85); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-border);
  z-index: 50; transition: box-shadow .2s, background .2s;
}
.site-header.is-scrolled { background: rgba(255,255,255,.96); box-shadow: var(--c-shadow); }
.site-header__inner { height: 100%; display: flex; align-items: center; gap: var(--sp-5); }
.site-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--c-text); }
.site-logo:hover { color: var(--c-green); }
.site-logo__icon { background: linear-gradient(135deg, var(--c-green), var(--c-green-2)); color: #fff; padding: 6px 9px; border-radius: 8px; font-family: var(--font-en); font-weight: 800; font-size: .85rem; box-shadow: 0 3px 10px rgba(22,163,74,.3); }
.site-logo__text b { color: var(--c-green); font-weight: 800; }

.site-nav { flex: 1; min-width: 0; }
.site-nav__list { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0; justify-content: center; flex-wrap: nowrap; }
.site-nav__link { display: inline-block; padding: 8px 11px; border-radius: 8px; color: var(--c-text); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.site-nav__link:hover { background: var(--c-green-soft); color: var(--c-green-2); }
.site-nav__link.is-active { background: var(--c-green); color: #fff; }
.site-nav__link--login {
  background: rgba(22,163,74,.08);
  border: 1.5px solid var(--c-green);
  color: var(--c-green-2);
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}
.site-nav__link--login:hover { background: var(--c-green); color: #fff; }
.site-nav__link--login.is-active { background: var(--c-green-2); color: #fff; border-color: var(--c-green-2); }
.site-nav__close { display: none; }

.site-header__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.site-burger { display: none; background: none; border: 1.5px solid var(--c-border); padding: 6px 8px; border-radius: 7px; cursor: pointer; }
.site-burger span { display: block; width: 22px; height: 2.5px; background: var(--c-text); margin: 4px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 49; opacity: 0; transition: opacity .2s; }
.nav-overlay.is-open { display: block; opacity: 1; }

/* بين 1100 و 1300: نقلّل التباعد ليبقى سطر واحد */
@media (min-width: 1100px) and (max-width: 1299px) {
  .site-header__inner { gap: var(--sp-3); }
  .site-nav__link { padding: 7px 9px; font-size: .82rem; }
}

@media (max-width: 1099px) {
  .site-nav { position: fixed; inset: 0 -100% 0 auto; width: 280px; height: 100vh; background: #fff; padding: var(--sp-6) var(--sp-4); transition: inset .25s ease; z-index: 50; box-shadow: -10px 0 30px rgba(0,0,0,.15); }
  .site-nav.is-open { inset: 0 0 0 auto; }
  .site-nav__list { flex-direction: column; gap: 4px; flex-wrap: nowrap; }
  .site-nav__link { padding: 11px 14px; font-size: .95rem; }
  .site-nav__close { display: block; position: absolute; top: 12px; left: 12px; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--c-sub); }
  .site-burger { display: block; }
}
@media (max-width: 600px) {
  .site-header__actions .btn--ghost { display: none; }
  .site-header__actions .btn--primary { display: inline-flex; padding: 7px 13px; font-size: .78rem; }
}

/* ─── Hero ─── */
.hero {
  padding: calc(var(--header-h) + var(--sp-7)) 0 var(--sp-7);
  background:
    radial-gradient(ellipse 60% 60% at 80% 0%, rgba(22,163,74,.18), transparent 60%),
    radial-gradient(ellipse 50% 50% at 0% 100%, rgba(59,130,246,.14), transparent 60%),
    linear-gradient(180deg, #f0fdf4 0%, #f8fafc 100%);
  position: relative; overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); align-items: center; }
.hero__title { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: var(--sp-3); }
.hero__title .grad { background: linear-gradient(135deg, var(--c-green), #0a7c41); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__sub { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--c-sub); margin-bottom: var(--sp-5); max-width: 620px; }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: var(--sp-5); }
.hero__chips { display: flex; gap: 10px; flex-wrap: wrap; }
.hero__chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.7); border: 1px solid var(--c-border); padding: 6px 12px; border-radius: 99px; font-size: .8rem; color: var(--c-sub); font-weight: 700; }
.hero__chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-green); animation: blink 1.5s infinite; }
@keyframes blink { 50% { opacity: .35; } }

.hero__visual {
  position: relative; aspect-ratio: 1/1; max-width: 520px; margin: 0 auto;
}
.hero__blob { position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, var(--c-green) 0%, var(--c-green-2) 60%); border-radius: 38% 62% 55% 45% / 50% 42% 58% 50%; opacity: .9; animation: morph 12s ease-in-out infinite; }
@keyframes morph {
  0%,100% { border-radius: 38% 62% 55% 45% / 50% 42% 58% 50%; }
  50%     { border-radius: 60% 40% 45% 55% / 38% 60% 40% 62%; }
}
.hero__visual-content { position: absolute; inset: 8%; background: #fff; border-radius: 28px; box-shadow: var(--c-shadow-lg); display: flex; flex-direction: column; padding: var(--sp-5); }
.hero__code { font-family: 'Consolas','Monaco',monospace; font-size: .85rem; background: #0b1220; color: #94e2b3; padding: var(--sp-4); border-radius: 12px; direction: ltr; text-align: left; line-height: 1.7; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.hero__code .tk-fn { color: #7dd3fc; }
.hero__code .tk-str { color: #fde68a; }
.hero__code .tk-kw  { color: #f472b6; }

@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.05fr .95fr; gap: var(--sp-7); }
  .hero { padding: calc(var(--header-h) + var(--sp-8)) 0 var(--sp-8); }
}

/* ─── Stats ─── */
.stats { padding: var(--sp-7) 0; background: #fff; border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border); }
.stats__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
@media (min-width: 768px) { .stats__grid { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; padding: var(--sp-4); }
.stat__icon { font-size: 1.8rem; color: var(--c-green); margin-bottom: 6px; }
.stat__num  { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; color: var(--c-text); line-height: 1; margin-bottom: 6px; }
.stat__num::after { content: '+'; color: var(--c-green); margin-right: 2px; }
.stat__label { color: var(--c-sub); font-size: .9rem; font-weight: 700; }

/* ─── Pillars (Why us) ─── */
.pillars__grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 900px) { .pillars__grid { grid-template-columns: repeat(3, 1fr); } }
.pillar { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--sp-5); box-shadow: var(--c-shadow); transition: transform .2s, box-shadow .2s; }
.pillar:hover { transform: translateY(-4px); box-shadow: var(--c-shadow-lg); }
.pillar__icon { display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; border-radius: 14px; background: linear-gradient(135deg, var(--c-green-soft), #bbf7d0); color: var(--c-green-2); font-size: 1.6rem; margin-bottom: var(--sp-3); }
.pillar h3 { margin-bottom: var(--sp-2); }
.pillar p  { color: var(--c-sub); margin: 0; }

/* ─── Courses grid ─── */
.courses__grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 700px)  { .courses__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .courses__grid { grid-template-columns: repeat(3, 1fr); } }
.course-card { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--c-shadow); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--c-shadow-lg); }
.course-card__media { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--c-green), var(--c-green-2)); display: flex; align-items: center; justify-content: center; font-size: 3.5rem; color: rgba(255,255,255,.85); position: relative; overflow: hidden; }
.course-card__media img { width: 100%; height: 100%; object-fit: cover; }
.course-card__badge { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.95); color: var(--c-green-2); padding: 4px 11px; border-radius: 99px; font-size: .72rem; font-weight: 800; letter-spacing: .5px; }
.course-card__body { padding: var(--sp-4); flex: 1; display: flex; flex-direction: column; }
.course-card__title { font-weight: 900; font-size: 1.05rem; margin-bottom: 6px; color: var(--c-text); }
.course-card__meta { display: flex; gap: 10px; flex-wrap: wrap; color: var(--c-sub); font-size: .82rem; margin-bottom: var(--sp-3); }
.course-card__meta i { color: var(--c-green); }
.course-card__footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: var(--sp-3); border-top: 1px dashed var(--c-border); }
.course-card__price { color: var(--c-green-2); font-weight: 900; font-size: 1.1rem; }
.course-card__price small { color: var(--c-sub); font-weight: 700; font-size: .72rem; margin-right: 4px; }

/* ─── Testimonials ─── */
.testi__grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 800px) { .testi__grid { grid-template-columns: repeat(3, 1fr); } }
.testi { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--sp-5); position: relative; box-shadow: var(--c-shadow); }
.testi::before { content: '"'; position: absolute; top: -10px; right: 20px; font-size: 5rem; color: var(--c-green-soft); font-family: serif; line-height: 1; }
.testi__quote { color: var(--c-text); font-size: .95rem; margin: 0 0 var(--sp-4); position: relative; z-index: 1; }
.testi__author { display: flex; align-items: center; gap: 12px; }
.testi__avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--c-green), var(--c-green-2)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.testi__name { font-weight: 800; }
.testi__role { color: var(--c-sub); font-size: .8rem; }

/* ─── CTA banner ─── */
.cta-banner { background: linear-gradient(135deg, var(--c-green), var(--c-green-2)); color: #fff; border-radius: var(--radius-lg); padding: var(--sp-7) var(--sp-5); text-align: center; box-shadow: 0 20px 50px rgba(22,163,74,.25); position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.15) 0%, transparent 50%); pointer-events: none; }
.cta-banner h2 { color: #fff; }
.cta-banner p  { color: rgba(255,255,255,.92); max-width: 540px; margin: 0 auto var(--sp-4); }
.cta-banner .btn { background: #fff; color: var(--c-green-2); }
.cta-banner .btn:hover { background: #f0fdf4; color: var(--c-green-2); transform: translateY(-2px); }

/* ─── Footer ─── */
.site-footer { background: linear-gradient(180deg, #0b1f12 0%, #0a1a10 100%); color: #cbd5e1; padding-top: var(--sp-7); margin-top: var(--sp-7); }
.site-footer__top { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); padding-bottom: var(--sp-6); }
@media (min-width: 800px)  { .site-footer__top { grid-template-columns: 2fr 1fr 1fr 1.4fr; } }
.site-logo--light .site-logo__text { color: #fff; }
.site-logo--light .site-logo__text b { color: #86efac; }
.site-footer__tag { color: #9ca3af; font-size: .9rem; max-width: 360px; margin: var(--sp-3) 0 var(--sp-4); }
.site-footer__socials { display: flex; gap: 8px; }
.site-footer__social { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 9px; color: #d1d5db; }
.site-footer__social:hover { background: var(--c-green); color: #fff; border-color: var(--c-green); transform: translateY(-2px); }
.site-footer__col h5 { color: #fff; margin-bottom: var(--sp-3); font-size: 1rem; }
.site-footer__col ul { list-style: none; padding: 0; margin: 0; }
.site-footer__col ul li { margin-bottom: 8px; }
.site-footer__col a { color: #9ca3af; font-size: .88rem; }
.site-footer__col a:hover { color: #86efac; }
.site-footer__contact li { display: flex; gap: 8px; align-items: start; font-size: .85rem; color: #9ca3af; }
.site-footer__contact li i { color: var(--c-green); flex-shrink: 0; margin-top: 4px; }
.site-footer__bar { background: rgba(0,0,0,.3); border-top: 1px solid rgba(255,255,255,.05); padding: var(--sp-3) 0; }
.site-footer__bar-inner { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); flex-wrap: wrap; font-size: .78rem; color: #6b7280; }

/* ─── Floating WhatsApp button ─── */
.fab-wa { position: fixed; bottom: 22px; left: 22px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.7rem; box-shadow: 0 8px 22px rgba(37,211,102,.45); z-index: 40; transition: transform .2s, box-shadow .2s; animation: fab-pulse 2.5s ease-in-out infinite; }
.fab-wa:hover { transform: scale(1.08); color: #fff; box-shadow: 0 12px 30px rgba(37,211,102,.55); }
@keyframes fab-pulse { 0%,100% { box-shadow: 0 8px 22px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5); } 70% { box-shadow: 0 8px 22px rgba(37,211,102,.45), 0 0 0 15px rgba(37,211,102,0); } }

/* ─── Reveal on scroll ─── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════════════════
   Brand mark — terminal direction (per design handoff)
   tokens scoped under .bp-term to avoid collisions
   ═══════════════════════════════════════════════════════════ */
.bp-term {
  --bp-green-500: #1f9d55;
  --bp-green-600: #138a48;
  --bp-cream:     #f6f4ee;
  --bp-ink:       #0b1410;

  background: var(--bp-ink);
  color: var(--bp-cream);
  border-radius: 14px;
  overflow: hidden;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  box-shadow: 0 30px 60px -28px rgba(0,0,0,.45);
  position: relative;
  direction: ltr;
  text-align: left;
}
.bp-term--light {
  background: var(--bp-cream);
  color: var(--bp-ink);
  box-shadow: 0 30px 60px -28px rgba(0,0,0,.18);
}

/* Hero placement: drop the square frame from old visual, let terminal define size */
.hero__visual--brand { aspect-ratio: auto; }
.bp-term--hero {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  z-index: 1;
}

/* Title bar */
.bp-term__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.bp-term:not(.bp-term--light) .bp-term__bar { border-bottom-color: rgba(255,255,255,.07); }
.bp-dot { width: 11px; height: 11px; border-radius: 50%; opacity: .9; }
.bp-dot--r { background: #ff5f57; }
.bp-dot--y { background: #febc2e; }
.bp-dot--g { background: #28c840; }
.bp-term__title {
  flex: 1; text-align: center;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .45;
}

/* Body */
.bp-term__body { padding: 22px 24px 20px; }
.bp-term__loading { font-size: 12px; opacity: .5; letter-spacing: .04em; }

/* Loading bar — 0 → 100% over 3s, looping */
.bp-bar {
  height: 6px; background: rgba(0,0,0,.07);
  border-radius: 3px; overflow: hidden;
  margin: 10px 0 22px; width: 70%;
}
.bp-term:not(.bp-term--light) .bp-bar { background: rgba(255,255,255,.08); }
.bp-bar > i {
  display: block; height: 100%; width: 0;
  background: var(--bp-green-600);
  animation: bp-load 3s ease-out infinite;
}
.bp-term:not(.bp-term--light) .bp-bar > i { background: #b8f24a; }
@keyframes bp-load { 0% { width: 0; } 100% { width: 100%; } }

/* Wordmark — large prompt + be{programmer}.org */
.bp-word {
  display: flex; align-items: baseline; gap: 12px;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4.2vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.bp-word__main { display: inline-block; }
.bp-accent { color: var(--bp-green-600); }
.bp-term:not(.bp-term--light) .bp-accent { color: #b8f24a; }
.bp-org { opacity: .5; font-weight: 500; }

/* Blinking cursor */
@keyframes bp-blink { 0%,55% { opacity: 1; } 56%,100% { opacity: 0; } }
.bp-cur {
  display: inline-block;
  width: .55em; height: 1em;
  background: var(--bp-green-500);
  vertical-align: -2px;
  margin-left: 2px;
  animation: bp-blink 1s steps(1, end) infinite;
}
.bp-term:not(.bp-term--light) .bp-cur { background: #b8f24a; }

/* Tagline rows */
.bp-tag {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 16px;
  line-height: 1.5;
  margin-top: 20px;
}
.bp-tag--en { opacity: .85; }
.bp-tag--ar {
  font-family: "IBM Plex Sans Arabic", "Tajawal", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  opacity: .7;
  margin-top: 8px;
}

/* Rotating phrase — single visible row, true snap-cycle */
.bp-rot {
  display: inline-block; position: relative;
  height: 1.5em;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.5;
}
.bp-rot--en { width: 28ch; }
.bp-rot--ar { width: 22ch; text-align: right; line-height: 1.6; height: 1.6em; }
.bp-rot__track {
  display: block;
  animation: bp-rot-en 12s infinite;
  animation-timing-function: steps(1, end);
}
.bp-rot--ar .bp-rot__track { animation-name: bp-rot-ar; }
.bp-rot__track > span {
  display: block;
  height: 1.5em;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.bp-rot--ar .bp-rot__track > span {
  height: 1.6em;
  line-height: 1.6;
  text-align: right;
}
/* Each step holds ~2s then snaps. 6 phrases over 12s = 16.6667% per step. */
@keyframes bp-rot-en {
  0%      { transform: translateY(0); }
  16.667% { transform: translateY(-1.5em); }
  33.333% { transform: translateY(-3em); }
  50%     { transform: translateY(-4.5em); }
  66.667% { transform: translateY(-6em); }
  83.333% { transform: translateY(-7.5em); }
  100%    { transform: translateY(-9em); }
}
@keyframes bp-rot-ar {
  0%      { transform: translateY(0); }
  16.667% { transform: translateY(-1.6em); }
  33.333% { transform: translateY(-3.2em); }
  50%     { transform: translateY(-4.8em); }
  66.667% { transform: translateY(-6.4em); }
  83.333% { transform: translateY(-8em); }
  100%    { transform: translateY(-9.6em); }
}

/* Meta footer row */
.bp-meta {
  display: flex; gap: 22px; flex-wrap: wrap;
  margin-top: 26px;
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  opacity: .4;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .bp-bar > i,
  .bp-rot__track,
  .bp-cur { animation: none; }
  .bp-bar > i { width: 100%; }
  .bp-cur { opacity: 1; }
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .bp-term__body { padding: 18px 18px 16px; }
  .bp-word { font-size: 26px; gap: 8px; }
  .bp-tag { font-size: 14px; margin-top: 14px; }
  .bp-tag--ar { font-size: 13px; }
  .bp-rot--en { width: 20ch; }
  .bp-meta { gap: 14px; font-size: 9.5px; }
}
