:root {
  --ba-indigo: #3f3d8f;
  --ba-indigo-dark: #171936;
  --ba-indigo-deep: #0e1032;
  --ba-coral: #ff6b5a;
  --ba-amber: #ffc24a;
  --ba-cream: #fff6e9;
  --ba-surface: #ffffff;
  --ba-surface-soft: #f8f7fc;
  --ba-text: #171936;
  --ba-muted: #667085;
  --ba-border: rgba(23, 25, 54, 0.1);
  --ba-shadow: 0 24px 70px rgba(23, 25, 54, 0.12);
  --ba-radius-xl: 32px;
  --ba-radius-lg: 24px;
  --ba-radius-md: 18px;
  --ba-container: 1180px;
  --ba-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ba-font);
  color: var(--ba-text);
  background:
    radial-gradient(circle at 12% 6%, rgba(255, 194, 74, 0.16), transparent 25rem),
    radial-gradient(circle at 88% 0%, rgba(63, 61, 143, 0.11), transparent 26rem),
    linear-gradient(180deg, #fffaf2 0%, #ffffff 42%, #f8f7fc 100%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  direction: rtl;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ba-indigo); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; }

.container {
  width: min(var(--ba-container), calc(100% - 40px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 1000;
  background: var(--ba-indigo-dark);
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-block: 18px;
  backdrop-filter: blur(18px);
  background: rgba(255, 250, 242, 0.76);
  border-bottom: 1px solid transparent;
  transition: padding 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.site-header--scrolled {
  padding-block: 10px;
  border-bottom-color: rgba(23, 25, 54, 0.08);
  box-shadow: 0 14px 40px rgba(23, 25, 54, 0.08);
}
.site-header__inner,
.site-header__actions,
.site-nav__menu,
.hero-actions,
.article-card__meta,
.article-card__footer,
.section-head--split,
.blog-card__top,
.site-footer__inner,
.site-footer__menu {
  display: flex;
  align-items: center;
}
.site-header__inner { justify-content: space-between; gap: 22px; }
.site-header__actions { gap: 12px; }

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}
.site-logo__mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--ba-indigo);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(63, 61, 143, 0.12);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(63, 61, 143, 0.12);
}
.site-logo__svg { width: 42px; height: 42px; }
.site-logo__text { display: grid; line-height: 1.05; }
.site-logo__text strong { font-size: 1.25rem; letter-spacing: -0.04em; }
.site-logo__text em { font-style: normal; color: var(--ba-coral); font-size: 0.78rem; letter-spacing: 0.04em; }
.custom-logo-link img { max-height: 54px; width: auto; }

.site-nav__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
}
.site-nav__menu a {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(23, 25, 54, 0.8);
  font-weight: 700;
  font-size: 0.93rem;
}
.site-nav__menu a:hover,
.site-nav__menu .current-menu-item > a {
  color: var(--ba-indigo);
  background: rgba(63, 61, 143, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--ba-indigo);
  color: white;
  box-shadow: 0 16px 36px rgba(63, 61, 143, 0.27);
}
.btn--primary:hover { color: white; background: #302e78; }
.btn--ghost { color: var(--ba-indigo); background: rgba(63, 61, 143, 0.09); }
.btn--soft { color: var(--ba-indigo); background: white; border-color: rgba(63, 61, 143, 0.14); }
.text-link { font-weight: 900; color: var(--ba-indigo); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: white;
  box-shadow: 0 10px 24px rgba(23, 25, 54, 0.1);
  cursor: pointer;
}
.nav-toggle span:not(.screen-reader-text) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ba-indigo-dark);
  border-radius: 999px;
}

.section-pad { padding-block: clamp(54px, 8vw, 100px); }
.hero-section { padding-block-start: clamp(42px, 7vw, 84px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: clamp(28px, 5vw, 62px);
  align-items: center;
}
.hero-copy h1,
.section-head h2,
.cta-box h2,
.single-article h1 {
  margin: 0;
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 1.05;
}
.hero-copy h1 { font-size: clamp(2.4rem, 5.8vw, 5.6rem); }
.hero-copy p,
.section-head p,
.cta-box p {
  color: var(--ba-muted);
  line-height: 1.9;
  font-size: 1.05rem;
}
.hero-copy p { max-width: 620px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ba-coral);
  background: rgba(255, 107, 90, 0.1);
  border: 1px solid rgba(255, 107, 90, 0.18);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ba-amber);
}
.hero-actions { gap: 12px; flex-wrap: wrap; margin-block: 26px; }

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}
.stats-strip div {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--ba-border);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 12px 34px rgba(23, 25, 54, 0.07);
}
.stats-strip strong {
  display: block;
  color: var(--ba-indigo);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1;
}
.stats-strip span { color: var(--ba-muted); font-size: 0.88rem; font-weight: 700; }

.hero-feed {
  position: relative;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(63, 61, 143, 0.1);
  border-radius: var(--ba-radius-xl);
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: var(--ba-shadow);
  overflow: hidden;
}
.hero-feed::before {
  content: "";
  position: absolute;
  inset: -35% 38% auto auto;
  width: 260px;
  height: 260px;
  background: rgba(255, 194, 74, 0.2);
  border-radius: 50%;
  filter: blur(18px);
  pointer-events: none;
}
.hero-feed__label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  font-weight: 900;
}
.hero-feed__label a { color: var(--ba-coral); }
.hero-mini-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.article-card {
  position: relative;
  background: white;
  border: 1px solid var(--ba-border);
  border-radius: var(--ba-radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(63, 61, 143, 0.24);
  box-shadow: 0 22px 44px rgba(23, 25, 54, 0.12);
}
.article-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--ba-indigo), var(--ba-coral));
  overflow: hidden;
}
.article-card--hero .article-card__media { aspect-ratio: 16 / 9; }
.article-card__media img { width: 100%; height: 100%; object-fit: cover; }
.article-card__media--fallback {
  display: grid;
  place-items: center;
  color: white;
}
.article-card__fallback-mark { width: 120px; height: 120px; color: white; opacity: 0.9; }
.article-card__body { padding: 20px; }
.article-card__meta,
.article-card__footer {
  justify-content: space-between;
  gap: 10px;
  color: var(--ba-muted);
  font-weight: 750;
  font-size: 0.82rem;
}
.article-card__meta a { color: var(--ba-coral); }
.article-card__title {
  margin: 12px 0 8px;
  font-size: 1.18rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
}
.article-card--hero .article-card__title { font-size: clamp(1.45rem, 2.4vw, 2rem); }
.article-card__excerpt {
  color: var(--ba-muted);
  line-height: 1.8;
  margin: 0 0 16px;
}
.article-card__footer { border-top: 1px solid var(--ba-border); padding-top: 14px; }
.article-card--compact {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 18px;
}
.article-card--compact .article-card__body { padding: 14px 16px; }
.article-card--compact .article-card__title { margin: 8px 0 0; font-size: 0.98rem; }
.article-card--compact .article-card__footer { display: none; }

.section-head {
  margin-bottom: clamp(26px, 4vw, 40px);
  max-width: 760px;
}
.section-head h2 { font-size: clamp(2rem, 3.8vw, 3.4rem); }
.section-head--split {
  justify-content: space-between;
  gap: 20px;
  max-width: none;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.featured-grid__item--wide { grid-column: span 2; grid-row: span 2; }
.featured-grid__item--wide .article-card { height: 100%; }
.featured-grid__item--wide .article-card__media { aspect-ratio: 16 / 9; }

.latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.section-latest { background: linear-gradient(180deg, rgba(255,255,255,0), rgba(63,61,143,0.05)); }

.blogs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.blog-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--ba-border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 14px 34px rgba(23, 25, 54, 0.07);
}
.blog-card__top { gap: 14px; }
.blog-card__mark {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--ba-indigo);
  background: var(--ba-cream);
  border-radius: 18px;
}
.blog-card__mark svg { width: 42px; height: 42px; }
.blog-card strong { display: block; font-size: 1.1rem; }
.blog-card em { display: block; font-style: normal; color: var(--ba-muted); font-size: 0.88rem; margin-top: 4px; }
.blog-card p { color: var(--ba-muted); line-height: 1.8; margin-bottom: 0; }
.blog-card p a { color: var(--ba-indigo); font-weight: 850; }

.cta-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background:
    radial-gradient(circle at 0% 20%, rgba(255, 194, 74, 0.22), transparent 26rem),
    linear-gradient(135deg, var(--ba-indigo-dark), var(--ba-indigo));
  color: white;
  border-radius: var(--ba-radius-xl);
  padding: clamp(26px, 5vw, 56px);
  box-shadow: var(--ba-shadow);
  overflow: hidden;
}
.cta-box p { color: rgba(255,255,255,0.78); margin-bottom: 0; }
.cta-box .eyebrow { color: white; border-color: rgba(255,255,255,0.16); background: rgba(255,255,255,0.1); }
.cta-box .btn--primary { background: white; color: var(--ba-indigo); }

.empty-state {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 420px;
  border-radius: 24px;
  background: white;
  border: 1px dashed rgba(63, 61, 143, 0.26);
  padding: 30px;
}
.empty-state__mark { width: 120px; height: 120px; color: var(--ba-indigo); }
.empty-state h3 { margin-bottom: 4px; }
.empty-state p { color: var(--ba-muted); }
.empty-state--wide { grid-column: 1 / -1; }

.site-footer {
  padding-block: 44px;
  background: var(--ba-indigo-deep);
  color: white;
}
.site-footer__inner {
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.site-footer .site-logo__mark { color: var(--ba-indigo); background: white; }
.site-footer .site-logo__text strong { color: white; }
.site-footer__brand { max-width: 380px; }
.site-footer__brand p,
.site-footer__meta { color: rgba(255,255,255,0.68); line-height: 1.8; }
.site-footer__menu { list-style: none; margin: 0; padding: 0; flex-wrap: wrap; gap: 8px; }
.site-footer__menu a { display: inline-flex; padding: 8px 12px; background: rgba(255,255,255,0.08); border-radius: 999px; color: white; }
.site-footer__meta { display: grid; gap: 6px; text-align: left; }

.archive-layout .latest-grid { margin-top: 24px; }
.single-container { max-width: 860px; }
.single-article {
  background: white;
  border: 1px solid var(--ba-border);
  border-radius: var(--ba-radius-xl);
  padding: clamp(24px, 5vw, 56px);
  box-shadow: var(--ba-shadow);
}
.single-article__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--ba-muted);
  font-weight: 800;
}
.single-article h1 { margin-block: 12px 24px; font-size: clamp(2rem, 4vw, 4rem); }
.single-article__image { margin: 0 0 28px; overflow: hidden; border-radius: 24px; }
.entry-content { font-size: 1.12rem; line-height: 2; color: #2e324d; }
.entry-content a { color: var(--ba-indigo); font-weight: 800; }
.entry-content img { border-radius: 18px; }

.reveal-in { animation: ba-rise 0.65s ease both; }
.reveal-in--delay { animation-delay: 0.12s; }
@keyframes ba-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .latest-grid, .featured-grid, .blogs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-grid__item--wide { grid-column: span 2; }
}

@media (max-width: 820px) {
  .container { width: min(100% - 28px, var(--ba-container)); }
  .site-nav {
    position: fixed;
    inset: 78px 14px auto 14px;
    display: none;
    background: white;
    border: 1px solid var(--ba-border);
    border-radius: 22px;
    padding: 14px;
    box-shadow: var(--ba-shadow);
  }
  .nav-is-open .site-nav { display: block; }
  .site-nav__menu { display: grid; gap: 4px; }
  .site-nav__menu a { width: 100%; }
  .nav-toggle { display: inline-grid; place-content: center; }
  .site-header__actions .btn { display: none; }
  .hero-copy h1 { font-size: clamp(2.2rem, 12vw, 4.1rem); }
  .stats-strip { grid-template-columns: 1fr; }
  .section-head--split { align-items: flex-start; }
  .cta-box { grid-template-columns: 1fr; }
  .site-footer__inner { display: grid; }
  .site-footer__meta { text-align: right; }
}

@media (max-width: 640px) {
  .latest-grid, .featured-grid, .blogs-grid { grid-template-columns: 1fr; }
  .featured-grid__item--wide { grid-column: auto; }
  .article-card__body { padding: 16px; }
  .site-logo__text strong { font-size: 1.05rem; }
  .site-logo__mark { width: 46px; height: 46px; border-radius: 16px; }
  .site-logo__svg { width: 38px; height: 38px; }
}
