/* ===========================================================================
   bedoschool.com — public landing page
   Brand tokens mirror brand/tokens/tokens.css. Arabic is the master script,
   so this stylesheet is written RTL-first and uses logical properties
   throughout; nothing here needs a mirrored variant.
   =========================================================================== */

:root {
  --teal: #08818c;
  --teal-deep: #075c64;
  --star-a: #1f7280;
  --star-b: #4b65a0;
  --ink: #17282b;
  --sun: #fbca18;
  --leaf: #81b64c;
  --paper: #ffffff;
  --chalk: #f4f7f7;
  --surface: #f7fafa;
  --line: #dee7e7;
  --body: #3d4e51;
  --muted: #5e6c6e; /* text-safe slate, 5.46:1 on white */
  --dark: #17282b;
  --on-dark: #ffffff;
  --on-dark-body: #c8d5d6;

  --display: "Baloo Bhaijaan 2", "Segoe UI", system-ui, sans-serif;
  --text: "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 18px;
  --pill: 999px;
  --gutter: clamp(1.15rem, 0.5rem + 3vw, 4.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.0625rem;
  /* Arabic line-height never below 1.85 */
  line-height: 1.9;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--teal-deep);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  inset-inline-start: 50%;
  translate: 50% -140%;
  z-index: 30;
  padding: 0.7rem 1.2rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
  transition: translate 0.2s var(--ease);
}

.skip:focus {
  translate: 50% 0;
}

/* --- Header --------------------------------------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem var(--gutter);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand img {
  height: 38px;
  width: auto;
  display: block;
}

.site-head nav {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 0.2rem + 1.4vw, 1.6rem);
}

.site-head nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--body);
  text-decoration: none;
  white-space: nowrap;
}

.site-head nav a:hover {
  color: var(--teal-deep);
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  background: var(--teal);
  color: #fff !important;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
  text-decoration: none;
  border-radius: var(--pill);
  border: 2px solid transparent;
  /* 44px floor: these are parents tapping on a phone. */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s var(--ease), transform 0.18s var(--ease);
}

.btn:hover {
  background: var(--teal-deep);
}

.btn:active {
  transform: scale(0.97);
}

.btn--sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
}

.btn--ghost {
  background: transparent;
  color: var(--ink) !important;
  border-color: #c6d4d5;
}

.btn--ghost:hover {
  background: transparent;
  border-color: var(--teal);
}

.btn--light {
  background: #fff;
  color: var(--teal-deep) !important;
}

.btn--light:hover {
  background: var(--chalk);
}

/* --- Hero ----------------------------------------------------------------- */
.hero {
  padding: clamp(3rem, 1.8rem + 5vw, 6rem) var(--gutter)
    clamp(2.5rem, 1.5rem + 4vw, 5rem);
  background: linear-gradient(168deg, var(--chalk) 0%, var(--paper) 62%);
  border-bottom: 1px solid var(--line);
}

.hero__inner {
  max-width: 46rem;
}

.eyebrow {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal-deep);
  letter-spacing: 0.01em;
}

.hero h1 {
  margin-top: 0.5rem;
  font-family: var(--display);
  font-size: clamp(2.75rem, 1.6rem + 5.4vw, 5rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}

.hero__lede {
  margin-top: 1rem;
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.3rem);
  color: var(--body);
  max-width: 38rem;
  text-wrap: pretty;
}

.hero__latin {
  margin-top: 0.6rem;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--teal);
}

.hero__actions {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__note {
  margin-top: 1.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* --- Bands ---------------------------------------------------------------- */
.band {
  padding: clamp(2.75rem, 1.7rem + 4.4vw, 5rem) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.band--tint {
  background: var(--surface);
}

.band--dark {
  background: var(--dark);
  color: var(--on-dark);
  border-bottom: 0;
}

.band h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.4;
}

.band__lede {
  margin-top: 0.6rem;
  color: var(--body);
  max-width: 42rem;
}

.band--dark .band__lede {
  color: var(--on-dark-body);
}

/* min() inside minmax(): a bare minmax(17rem,1fr) track cannot shrink below
   17rem, so it overflows any container narrower than that. min(...,100%) lets
   it collapse instead. Matters in RTL, where the overflow runs off the LEFT
   edge and is easy to miss. */

/* --- Cards ---------------------------------------------------------------- */
.cards {
  margin-top: 2rem;
  display: grid;
  gap: 1.25rem;
}

.cards--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.card__ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--chalk);
  color: var(--teal-deep);
}

.card__ico svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  margin-top: 1rem;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.5;
}

.card p {
  margin-top: 0.4rem;
  color: var(--body);
  font-size: 1rem;
}

/* --- Subjects ------------------------------------------------------------- */
.subjects {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(9.5rem, 100%), 1fr));
  gap: 0.9rem;
}

.subjects li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
}

.subjects svg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  padding: 5px;
  border-radius: 10px;
  background: var(--c);
  color: var(--f);
}

/* --- Steps ---------------------------------------------------------------- */
.steps {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 1.25rem;
  counter-reset: step;
}

.steps li {
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.steps__n {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--star-a), var(--star-b));
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
}

.steps h3 {
  margin-top: 0.9rem;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.5;
}

.steps p {
  margin-top: 0.35rem;
  color: var(--body);
  font-size: 0.98rem;
}

/* --- Grades --------------------------------------------------------------- */
.grades {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.grades li {
  padding: 0.7rem 1.3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  font-family: var(--display);
  font-weight: 600;
}

/* --- Enrol ---------------------------------------------------------------- */
.enrol {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 1.25rem;
  counter-reset: e;
}

.enrol li {
  counter-increment: e;
  padding: 1.5rem;
  background: #1e3235;
  border: 1px solid #2c4448;
  border-radius: var(--radius);
}

.enrol li::before {
  content: counter(e);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sun);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
}

.enrol h3 {
  margin-top: 0.8rem;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.5;
}

.enrol p {
  margin-top: 0.3rem;
  color: var(--on-dark-body);
  font-size: 0.98rem;
}

.enrol__cta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.enrol__mail {
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--sun);
}

/* --- Footer --------------------------------------------------------------- */
.site-foot {
  padding: clamp(2.25rem, 1.5rem + 3vw, 3.5rem) var(--gutter);
  background: var(--chalk);
}

.site-foot img {
  height: 40px;
  width: auto;
}

.site-foot .slogan {
  margin-top: 0.6rem;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--teal-deep);
}

.site-foot .fine {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--muted);
  max-width: 40rem;
}

/* --- Motion --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 640px) {
  /* Wrapped, the header costs ~105px of an 812px screen. Let it scroll away. */
  .site-head {
    position: static;
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
  .site-head nav {
    width: 100%;
    justify-content: space-between;
  }
  .brand img {
    height: 32px;
  }
}
