/* After Rain Kindergarten — rebrand + i18n (keeps MindMarket layout system) */

@import url("https://fonts.googleapis.com/css2?family=Almarai:wght@400;700;800&display=swap");

:root {
  --ar-font-arabic: "Almarai", "Segoe UI", Tahoma, sans-serif;
}

/* Brand mark in nav */
.ar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--color-ink-black, #2c2e2a);
}

.ar-brand-mark {
  width: 2.1rem;
  height: 1.25rem;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.ar-brand-text {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1;
}

html[lang="ar"] .ar-brand-text {
  font-family: var(--ar-font-arabic);
  font-weight: 700;
  letter-spacing: 0;
}

/* Language toggle — matches pill chrome */
.ar-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  padding: 4px;
  margin-inline-start: 4px;
  border-radius: 999px;
  background: #f5f1e4;
  border: 0;
  flex-shrink: 0;
}

.ar-lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #2c2e2a;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  min-width: 2.1rem;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  padding: 0 0.55rem;
  line-height: 1;
}

.ar-lang-toggle button[aria-pressed="true"] {
  background: #fff;
  box-shadow: none;
  outline: 1.5px solid #2c2e2a;
}

.ar-lang-toggle button[data-lang="ar"] {
  font-family: var(--ar-font-arabic);
  font-weight: 700;
}

/* Desktop: place toggle before contact CTA */
.c-menu-desktop_bar {
  position: relative;
}

.c-menu-desktop .ar-lang-toggle {
  margin-inline-end: 0.35rem;
}

.c-menu-mobile_cta .ar-lang-toggle {
  order: -1;
}

/* Arabic typography — keep sizes/radii; relax Inter tracking */
html[lang="ar"],
html[lang="ar"] body {
  font-family: var(--ar-font-arabic) !important;
}

html[lang="ar"] .c-hero-home_title,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] .heading-2xl,
html[lang="ar"] .heading-xl,
html[lang="ar"] .heading-lg,
html[lang="ar"] .heading-md,
html[lang="ar"] .heading-sm,
html[lang="ar"] .heading-xs,
html[lang="ar"] [class*="heading-"] {
  font-family: var(--ar-font-arabic) !important;
  letter-spacing: 0 !important;
  font-weight: 800;
}

html[lang="ar"] .c-hero-home_title {
  line-height: 1.15 !important;
  max-width: 12ch;
  margin-inline: auto;
  font-size: clamp(2.5rem, 7.5vw, 5.5rem) !important;
}

html[lang="en"] .c-hero-home_title {
  font-size: clamp(2.75rem, 7vw, 5.75rem) !important;
  line-height: 0.98 !important;
  max-width: 14ch;
  margin-inline: auto;
}

html[lang="ar"] .c-hero-home_tagline {
  font-family: var(--ar-font-arabic) !important;
  letter-spacing: 0 !important;
  font-weight: 700;
}

.ar-motto {
  margin: 0.85rem auto 0;
  max-width: 34rem;
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  line-height: 1.45;
  color: #2c2e2a;
}

html[lang="ar"] .ar-motto {
  font-family: var(--ar-font-arabic);
  font-weight: 700;
  letter-spacing: 0;
}

.ar-brands-body {
  max-width: 40rem;
  margin: 0.5rem auto 2.5rem;
  padding: 0 1.25rem;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #2c2e2a;
}

html[lang="ar"] .ar-brands-body {
  font-family: var(--ar-font-arabic);
  font-weight: 400;
}

.ar-stats-note {
  max-width: 36rem;
  margin: 0.75rem auto 0;
  padding: 0 1.25rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #80827f;
  font-style: italic;
}

html[lang="ar"] .ar-stats-note {
  font-family: var(--ar-font-arabic);
  font-style: normal;
}

/* RTL layout safety — logical mirroring without rewriting Astro layout */
html[dir="rtl"] .c-menu-desktop_inner,
html[dir="rtl"] .c-menu-desktop_list,
html[dir="rtl"] .c-menu-mobile_bar,
html[dir="rtl"] .c-menu-mobile_cta {
  flex-direction: row-reverse;
}

html[dir="rtl"] .c-menu-desktop_bar {
  direction: rtl;
}

html[dir="rtl"] .c-button-quote .c-button_label,
html[dir="rtl"] .c-button .c-button_label {
  font-family: var(--ar-font-arabic);
}

html[dir="rtl"] .underline-wave u,
html[dir="rtl"] .underline {
  text-underline-offset: 0.2em;
}

/* Hide research-client logo strip images; show kindergarten values */
.ar-values-rail {
  display: none;
}

html.ar-rebranded .c-rail .c-rail_item img,
html.ar-rebranded .c-rail img {
  opacity: 0 !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

html.ar-rebranded .c-rail .c-rail_item,
html.ar-rebranded .c-rail [class*="item"] {
  position: relative;
}

html.ar-rebranded .ar-values-rail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2.5rem;
  padding: 0.5rem 1rem 2rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: #2c2e2a;
}

html[lang="ar"].ar-rebranded .ar-values-rail {
  font-family: var(--ar-font-arabic);
  font-weight: 700;
  letter-spacing: 0;
}

/* Mosul footer: hide ESOMAR badge */
html.ar-rebranded .c-footer a[href*="esomar"] {
  display: none !important;
}

/* After Rain Studio credit on cream/yellow footer */
.c-footer .after-rain-credit {
  margin-top: 0.75rem;
}

.c-footer .after-rain-credit .after-rain-mark {
  background-color: #2c2e2a;
}

.c-footer .after-rain-credit .after-rain-name {
  color: #2c2e2a;
}

html[lang="ar"] .after-rain-credit .after-rain-name {
  font-family: var(--ar-font-arabic);
}
