/* Afaq Learning website. Colours come from the characters: Noor coral, Zaid teal, Reem lilac, Rafrouf sky. */

@font-face {
  font-family: 'Baloo Bhaijaan 2';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(../assets/fonts/baloo-bhaijaan-2-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Baloo Bhaijaan 2';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(../assets/fonts/baloo-bhaijaan-2-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --cream: #FFF8EC;
  --sand: #FBEBD2;
  --paper: #FFFFFF;
  --ink: #3A2A1F;
  --ink-soft: #6B5747;
  --line: #EEDDC3;
  --coral: #E9604B;
  --coral-tint: #FDE4DD;
  --teal: #1D7FA3;
  --teal-dark: #155F7B;
  --teal-tint: #DDF0F6;
  --lilac: #8A6CD1;
  --lilac-tint: #EDE6FA;
  --sky: #3FA9E0;
  --sky-tint: #DFF2FC;
  --sun: #F8C537;
  --sun-dark: #E0A91A;
  --leaf: #5E9E43;
  --radius: 22px;
  --shadow: 0 10px 30px -12px rgba(88, 56, 24, .28);
  --font: 'Baloo Bhaijaan 2', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
[lang="ar"] { font-family: var(--font); line-height: 1.9; }
em { font-style: normal; color: var(--ink-soft); }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 10px 26px; border-radius: 999px;
  font: 800 18px/1 var(--font); text-decoration: none; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--teal { background: var(--teal); color: #fff; box-shadow: 0 6px 0 var(--teal-dark); }
.btn--teal:hover { box-shadow: 0 8px 0 var(--teal-dark); }
.btn--sun { background: var(--sun); color: var(--ink); box-shadow: 0 6px 0 var(--sun-dark); }
.btn--sun:hover { box-shadow: 0 8px 0 var(--sun-dark); }
.btn--ghost { background: transparent; color: var(--teal-dark); box-shadow: inset 0 0 0 3px var(--teal); }
.btn--small { min-height: 42px; padding: 8px 20px; font-size: 17px; box-shadow: 0 4px 0 var(--sun-dark); }
.btn--big { min-height: 60px; padding: 12px 38px; font-size: 21px; }

/* Header */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 248, 236, .9);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 16px; min-height: 74px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-inline-end: auto; }
.logo__mark { width: 44px; height: 44px; flex: none; }
.logo__text { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.logo__text span { color: var(--teal); font-weight: 600; }
.logo__ar {
  font-size: 17px; font-weight: 700; color: var(--coral);
  background: var(--coral-tint); border-radius: 999px; padding: 0 10px; line-height: 1.7;
}
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__links a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 17px;
  padding: 8px 14px; border-radius: 999px;
}
.nav__links a:not(.btn):hover { background: var(--sand); }
.nav__links .btn { margin-inline-start: 8px; }
.nav__toggle { display: none; }

/* Hero */
.hero { padding: 40px 0 72px; position: relative; }
.hero::before {
  content: ''; position: absolute; inset: auto 0 0 0; height: 46%;
  background: linear-gradient(180deg, transparent, var(--sand));
  pointer-events: none; z-index: -1;
}
.hero__inner { display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-block; font-weight: 800; font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--teal-dark); background: var(--teal-tint); border-radius: 999px; padding: 4px 14px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(40px, 5.4vw, 66px); }
.hl { color: var(--coral); }
.hero__ar { font-size: clamp(24px, 2.6vw, 30px); font-weight: 700; color: var(--teal); margin: 12px 0 14px; }
.lead { font-size: 20px; color: var(--ink-soft); max-width: 34em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Hero stage: the friends stand in front of an arched window onto a sunny sky (آفاق, horizons).
   Noor left, Zaid centre, Reem right, as in every episode. */
.hero__art { margin: 0; position: relative; }
.stage { aspect-ratio: 10 / 9; width: 100%; }
.stage__sky {
  position: absolute; left: 7%; right: 7%; top: 3%; bottom: 7%;
  border-radius: 999px 999px 36px 36px; border: 8px solid var(--paper); box-shadow: var(--shadow);
  background:
    radial-gradient(circle at 78% 26%, #FFE27A 0 10%, rgba(255, 226, 122, .45) 10.5% 16%, transparent 16.5%),
    radial-gradient(ellipse 62% 20% at 18% 100%, #A8D38C 0 98%, transparent 100%),
    radial-gradient(ellipse 70% 24% at 88% 100%, #8FC474 0 98%, transparent 100%),
    linear-gradient(180deg, #9FD8F2 0%, #D6EFFA 55%, #FFF3D6 100%);
}
.stage__kid { position: absolute; bottom: 0; height: 76%; width: auto; filter: drop-shadow(0 12px 14px rgba(88, 56, 24, .22)); }
.stage__noor { left: 0; }
.stage__reem { right: 1%; }
.stage__zaid { left: 50%; transform: translateX(-50%); height: 78%; z-index: 1; }
.stage__bird {
  position: absolute; width: 27%; right: 0; top: 4%; z-index: 2;
  filter: drop-shadow(0 10px 14px rgba(40, 80, 120, .25));
  animation: bob 3.2s ease-in-out infinite;
}
.bubble {
  position: absolute; top: 8%; left: 2%; z-index: 2;
  background: var(--paper); color: var(--ink); font-weight: 800; font-size: clamp(20px, 2.2vw, 28px);
  padding: 4px 22px; border-radius: 26px; box-shadow: var(--shadow);
  animation: bob 4s ease-in-out infinite;
}
.bubble::after {
  content: ''; position: absolute; bottom: -12px; right: 34px;
  border: 12px solid transparent; border-top-color: var(--paper); border-bottom: 0;
}
@keyframes bob { 50% { transform: translateY(-8px); } }

/* Steps */
.steps { background: var(--sand); padding: 8px 0 64px; }
.steps__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { background: var(--paper); border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow); }
.step h3 { font-size: 23px; margin: 16px 0 6px; }
.step p { color: var(--ink-soft); font-size: 17px; }
.step__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; }
.step__icon svg { width: 30px; height: 30px; }
.step--teal .step__icon { background: var(--teal-tint); color: var(--teal); }
.step--coral .step__icon { background: var(--coral-tint); color: var(--coral); }
.step--lilac .step__icon { background: var(--lilac-tint); color: var(--lilac); }

/* Sections */
.section { padding: 88px 0; }
.section__head { max-width: 640px; margin-bottom: 40px; }
.section__head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section__head h2 { font-size: clamp(32px, 4vw, 46px); }
.section__head p:last-child { color: var(--ink-soft); margin-top: 10px; font-size: 19px; }
/* Arabic lines sit inside English blocks: shrink-wrap them so they line up with the English, not the far edge. */
.kicker, .hero__ar { display: inline-block; }
.kicker { font-size: 24px; font-weight: 700; color: var(--coral); margin-bottom: 2px; }
.kicker--light { color: var(--sun); }

/* Friends */
.friends__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.friend {
  border-radius: 28px; padding: 18px 20px 26px; text-align: center;
  transition: transform .2s ease;
}
.friend:hover { transform: translateY(-6px) rotate(-1deg); }
.friend img { height: 270px; width: auto; max-width: 100%; object-fit: contain; margin: 0 auto 14px; }
.friend h3 { font-size: 26px; display: flex; justify-content: center; align-items: baseline; gap: 10px; }
.friend h3 span { font-size: 24px; font-weight: 700; }
.friend p { font-size: 17px; color: var(--ink-soft); margin-top: 4px; }
.friend--coral { background: var(--coral-tint); } .friend--coral h3 span { color: var(--coral); }
.friend--teal { background: var(--teal-tint); } .friend--teal h3 span { color: var(--teal); }
.friend--lilac { background: var(--lilac-tint); } .friend--lilac h3 span { color: var(--lilac); }
.friend--sky { background: var(--sky-tint); } .friend--sky h3 span { color: var(--sky); }
.friend--sky img { height: 190px; margin-block: 50px 44px; }

/* Say it cards */
.sayit { background: var(--paper); border-radius: 48px 48px 0 0; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  width: 100%; height: 100%; position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--cream); border: 3px solid var(--line); border-radius: var(--radius);
  padding: 22px 16px 20px; font-family: var(--font); color: var(--ink); cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--sun); }
.card__face { width: 64px; height: 64px; border-radius: 50%; background: var(--sand); object-fit: cover; }
.card[data-who="noor"] .card__face { background: var(--coral-tint); }
.card[data-who="zaid"] .card__face { background: var(--teal-tint); }
.card[data-who="reem"] .card__face { background: var(--lilac-tint); }
.card__ar { font-size: 27px; font-weight: 700; margin-top: 10px; line-height: 1.8; }
.card__tr { font-size: 16px; color: var(--teal-dark); font-weight: 600; }
.card__en { font-size: 16px; color: var(--ink-soft); margin-top: 2px; }
.card__play {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--sun); display: grid; place-items: center;
}
.card__play::before {
  content: ''; margin-left: 3px;
  border-left: 11px solid var(--ink); border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.card.is-playing { border-color: var(--teal); background: var(--teal-tint); }
.card.is-playing .card__play { background: var(--teal); animation: pulse 1s ease-in-out infinite; }
.card.is-playing .card__play::before { border-left-color: #fff; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(29, 127, 163, .18); } }

/* Episodes shelf */
.episodes { background: var(--paper); padding-top: 24px; }
.shelf {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px max(16px, (100% - 1160px) / 2) 26px; scroll-padding-inline: max(16px, (100% - 1160px) / 2);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.shelf li { flex: 0 0 190px; scroll-snap-align: start; }
.shelf img { border-radius: 18px; box-shadow: var(--shadow); aspect-ratio: 3 / 4; object-fit: cover; width: 100%; background: var(--sand); }
.shelf span { display: block; font-weight: 700; font-size: 17px; margin-top: 10px; }
.shelf__arrows { display: flex; gap: 10px; }
.arrow {
  width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--line); background: var(--paper);
  font: 800 28px/1 var(--font); color: var(--ink); cursor: pointer; padding-bottom: 4px;
}
.arrow:hover { border-color: var(--sun); }

.series__title { font-size: 30px; margin: 56px 0 22px; }
.series { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.series__card {
  display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center;
  background: var(--cream); border-radius: var(--radius); padding: 14px; border: 2px solid var(--line);
}
.series__card img, .series__letters { border-radius: 16px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.series__card h4 { font-size: 22px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.series__card h4 span { font-size: 20px; font-weight: 700; color: var(--coral); }
.series__card p { font-size: 16.5px; color: var(--ink-soft); margin-top: 6px; padding-right: 8px; }
.series__letters {
  display: flex; align-items: center; justify-content: center; gap: 10px; direction: rtl;
  background: linear-gradient(135deg, var(--lilac-tint), var(--sky-tint));
}
.series__letters span { font-size: 54px; font-weight: 800; line-height: 1; }
.series__letters span:nth-child(1) { color: var(--coral); }
.series__letters span:nth-child(2) { color: var(--teal); }
.series__letters span:nth-child(3) { color: var(--lilac); }
.tag {
  display: inline-block; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--leaf); background: #E5F2DD; border-radius: 999px; padding: 1px 10px; margin-inline-start: 4px;
}

/* Play */
.play {
  background:
    radial-gradient(circle at 85% 18%, rgba(248, 197, 55, .35), transparent 32%),
    linear-gradient(180deg, #1E86AC 0%, #176C8C 100%);
  color: #fff; padding: 88px 0; position: relative; overflow: hidden;
}
.play__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 48px; align-items: center; }
.play h2 { font-size: clamp(32px, 4vw, 46px); }
.play__text p { color: #E3F3F9; margin-top: 14px; }
.play__note { font-size: 16px; opacity: .9; margin-bottom: 26px; }
.play .btn { margin-top: 24px; }
/* Noor left, Zaid centre, Reem right, as in every episode. */
.play__art { position: relative; height: 340px; display: flex; align-items: flex-end; justify-content: center; }
.play__art img { height: 82%; width: auto; margin: 0 -3%; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .25)); }
.play__art::after {
  content: ''; position: absolute; left: 10%; right: 10%; bottom: -6px; height: 30px; z-index: 0;
  background: rgba(0, 0, 0, .16); border-radius: 50%; filter: blur(8px);
}
.play__art img { position: relative; z-index: 1; }
.play__art .p-zaid { height: 86%; z-index: 2; }
.play__art .p-bird { position: absolute; height: 30%; width: auto; margin: 0; right: 0; top: 0; z-index: 3; animation: bob 3s ease-in-out infinite; }
.habits { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.habits li {
  background: rgba(255, 255, 255, .12); border: 2px solid rgba(255, 255, 255, .22);
  border-radius: 999px; padding: 4px 16px 4px 12px; font-size: 16px; display: inline-flex; align-items: center; gap: 10px;
}
.habits [lang="ar"] { color: var(--sun); font-weight: 700; font-size: 18px; line-height: 1.6; }

/* Parents */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.features li {
  background: var(--paper); border-radius: var(--radius); padding: 26px; border-top: 6px solid var(--sun);
  box-shadow: 0 4px 0 var(--line);
}
.features li:nth-child(3n+2) { border-top-color: var(--coral); }
.features li:nth-child(3n) { border-top-color: var(--lilac); }
.features h3 { font-size: 22px; margin-bottom: 6px; }
.features p { color: var(--ink-soft); font-size: 17px; }

.meaning {
  margin-top: 40px; display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: center;
  background: var(--teal-tint); border-radius: 28px; padding: 28px 34px;
}
.meaning__art { width: 100%; }
.meaning h3 { font-size: 28px; }
.meaning h3 em { color: var(--teal); font-style: normal; }
.meaning p { margin-top: 8px; font-size: 19px; }
.meaning [lang="ar"] { font-weight: 700; color: var(--teal-dark); }

/* Follow */
.follow { padding: 80px 0 96px; text-align: center; background: var(--sand); }
.follow h2 { font-size: clamp(32px, 4vw, 46px); }
.follow__lead { color: var(--ink-soft); margin-top: 10px; font-size: 19px; }
.follow__links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 28px; }
.follow__links:empty { display: none; }
.social {
  display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 24px; border-radius: 999px;
  background: var(--paper); color: var(--ink); font-weight: 800; text-decoration: none; box-shadow: 0 5px 0 var(--line);
  transition: transform .15s ease;
}
.social:hover { transform: translateY(-2px); }
.social svg { width: 26px; height: 26px; }
.social[data-link="youtube"] svg { color: #E62117; }
.social[data-link="instagram"] svg { color: #C13584; }
.social[data-link="tiktok"] svg { color: #111; }
.social[data-link="email"] svg { color: var(--teal); }
.follow__soon {
  display: inline-block; margin-top: 26px; background: var(--paper); border-radius: 999px; padding: 10px 24px;
  font-weight: 700; color: var(--ink-soft);
}
[hidden] { display: none !important; }

/* Footer */
.footer { background: var(--ink); color: #EADBC8; padding: 40px 0; }
.footer__inner { display: grid; gap: 4px; text-align: center; }
.footer__brand { font-size: 22px; font-weight: 800; color: #fff; }
.footer__brand span { color: var(--sun); margin-inline-start: 6px; }
.footer__small { font-size: 15px; opacity: .75; margin-top: 8px; }

/* Tablet */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__art { max-width: 560px; margin-inline: auto; width: 100%; }
  .friends__grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .series { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .play__inner { grid-template-columns: 1fr; }
  .play__art { height: 300px; max-width: 520px; width: 100%; margin-inline: auto; }
}

/* Phone */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .nav__inner { min-height: 64px; }
  .logo__mark { width: 38px; height: 38px; }
  .logo__text { font-size: 21px; }
  .nav__toggle {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
    background: var(--sand); border: 0; cursor: pointer;
  }
  .nav__bars, .nav__bars::before, .nav__bars::after {
    display: block; width: 20px; height: 3px; border-radius: 3px; background: var(--ink); position: relative;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav__bars::before, .nav__bars::after { content: ''; position: absolute; left: 0; }
  .nav__bars::before { top: -7px; }
  .nav__bars::after { top: 7px; }
  .nav__toggle[aria-expanded="true"] .nav__bars { background: transparent; }
  .nav__toggle[aria-expanded="true"] .nav__bars::before { transform: translateY(7px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__bars::after { transform: translateY(-7px) rotate(-45deg); }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--cream); padding: 8px 16px 18px; border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: 12px 14px; font-size: 19px; }
  .nav__links .btn { margin: 8px 0 0; }

  .hero { padding: 24px 0 64px; }
  .lead { font-size: 18px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .bubble { font-size: 19px; padding: 2px 16px; }
  .steps__list { grid-template-columns: 1fr; gap: 14px; }
  .section { padding: 64px 0; }
  .section__head--row { display: block; }
  .shelf__arrows { display: none; }
  .friends__grid { gap: 14px; }
  .friend { padding: 12px 10px 18px; border-radius: 22px; }
  .friend img { height: 200px; }
  .friend--sky img { height: 130px; margin-block: 40px 30px; }
  .friend h3 { font-size: 21px; flex-direction: column; align-items: center; gap: 0; }
  .friend h3 span { font-size: 20px; }
  .friend p { font-size: 15px; }
  .cards { gap: 12px; }
  .card { padding: 18px 10px 16px; }
  .card__ar { font-size: 22px; }
  .card__tr, .card__en { font-size: 14.5px; }
  .card__play { width: 28px; height: 28px; top: 10px; right: 10px; }
  .shelf li { flex-basis: 150px; }
  .series__card { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .meaning { grid-template-columns: 1fr; padding: 24px; text-align: center; }
  .meaning__art { max-width: 180px; margin-inline: auto; }
  .play { padding: 64px 0; }
  .play__art { height: 230px; }
  .habits li { font-size: 15px; }
}

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