/* =========================================================
   Ahmed A. Sowalem: personal brand
   Tokens
     black   #000000  page + film
     paper   #EDEDED  the light band behind the portrait
     white   #FFFFFF  headlines, numbers
     grey    #9C9C9C  secondary text
     gold    #E0AC4A  accent (from the main project's accent scale)
     gold-d  #C89530  gold hover / rules
   Type: Alexandria only (Arabic + Latin, by an Egyptian designer).
   ========================================================= */
:root {
  --black: #000000;
  --paper: #ededed;
  --white: #ffffff;
  --grey: #9c9c9c;
  --gold: #e0ac4a;
  --gold-d: #c89530;
  --rule: rgba(255, 255, 255, 0.14);
  --font: "Alexandria", system-ui, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --measure: 34em;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="en"] body { line-height: 1.6; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { list-style: none; }
mark { background: none; color: var(--gold); }
.display, .h2, .about__statement { text-wrap: balance; }
p, dd { text-wrap: pretty; }
::selection { background: var(--gold); color: var(--black); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip {
  position: fixed; inset-inline-start: 12px; top: 12px; z-index: 100;
  padding: 10px 16px; background: var(--gold); color: var(--black); text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* ---------- Buttons: pills, gold or outline ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font-size: 16px; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn--gold { background: var(--gold); color: var(--black); }
.btn--gold:hover { background: var(--gold-d); }
.btn--outline { border: 1px solid rgba(255, 255, 255, 0.35); color: var(--white); }
.btn--outline:hover { border-color: var(--white); }
.btn--sm { min-height: 44px; padding: 0 22px; font-size: 15px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--pad);
  transition: background-color 0.25s;
}
.nav.is-solid, body.menu-open .nav { background: rgba(0, 0, 0, 0.92); box-shadow: 0 1px 0 var(--rule); }
.nav__logo { display: block; }
.nav__logo img { height: 40px; width: auto; }
.nav__links { display: flex; gap: clamp(20px, 3vw, 40px); font-size: 16px; }
.nav__links a { text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.nav__links a:hover { border-bottom-color: var(--gold); }
.nav__end { display: flex; align-items: center; gap: 16px; }
.nav__lang { font-size: 14px; padding: 8px 4px; text-decoration: underline; text-underline-offset: 4px; }
.nav__cta { min-height: 44px; padding: 0 22px; font-size: 15px; }
.nav__burger { display: none; width: 44px; height: 44px; position: relative; }
.nav__burger span { position: absolute; inset-inline: 10px; height: 2px; background: currentColor; transition: transform 0.25s; }
.nav__burger span:first-child { top: 17px; }
.nav__burger span:last-child { top: 25px; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45; background: var(--black);
  display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 96px var(--pad) var(--pad);
  font-size: 30px; font-weight: 600;
  visibility: hidden; opacity: 0; transition: opacity 0.2s, visibility 0.2s;
}
.mobile-menu a:not(.btn) { text-decoration: none; padding: 6px 0; }
.mobile-menu.is-open { visibility: visible; opacity: 1; }
.mobile-menu .btn { align-self: flex-start; margin-top: 24px; font-size: 16px; }

/* =========================================================
   HERO: pinned film, story steps one chapter per scroll
   ========================================================= */
.hero { position: relative; background: var(--black); }
.hero__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to left, rgba(0,0,0,.8) 0%, rgba(0,0,0,.3) 45%, rgba(0,0,0,0) 70%),
    linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 35%);
  opacity: var(--shade, 1);
}
[dir="ltr"] .hero__shade {
  background:
    linear-gradient(to right, rgba(0,0,0,.8) 0%, rgba(0,0,0,.3) 45%, rgba(0,0,0,0) 70%),
    linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 35%);
}

.hero__content { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; }
.chapter { display: flex; flex-direction: column; justify-content: center; padding-inline: var(--pad); }
.chapter__inner { max-width: 760px; }
.chapter--intro { min-height: 100vh; min-height: 100svh; justify-content: flex-end; padding-bottom: clamp(72px, 12vh, 128px); }
.chapter--stat { min-height: 115vh; }
.chapter--outro { min-height: 150vh; justify-content: flex-end; align-items: center; padding-bottom: clamp(56px, 9vh, 96px); }

.display { font-size: clamp(40px, 5.6vw, 72px); font-weight: 700; line-height: 1.3; }
html[lang="en"] .display { line-height: 1.08; letter-spacing: -0.02em; }
.count { font-variant-numeric: tabular-nums; color: var(--gold); }
.chapter__text { margin-top: 24px; max-width: var(--measure); font-size: 21px; color: rgba(255, 255, 255, 0.8); }
.chapter__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.chapter--outro .chapter__actions { margin-top: 0; justify-content: center; }

/* =========================================================
   ABOUT: portrait on a light band, statement, numbers
   ========================================================= */
.about { position: relative; padding: 0 var(--pad) clamp(80px, 10vw, 128px); }
.about__band { position: absolute; inset: 0 0 auto; height: clamp(110px, 14vw, 180px); background: var(--paper); }
.about__row {
  position: relative; display: grid; grid-template-columns: minmax(280px, 440px) 1fr;
  gap: clamp(32px, 6vw, 96px); align-items: end;
  max-width: 1160px; margin: 0 auto; padding-top: clamp(56px, 7vw, 90px);
}
.about__photo { aspect-ratio: 4 / 5; overflow: hidden; background: #1a1a1a; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: grayscale(1) contrast(1.08); }
.about__text { padding-bottom: clamp(8px, 2vw, 32px); }
.about__statement { font-size: clamp(24px, 2.4vw, 34px); font-weight: 600; line-height: 1.6; max-width: 22em; }
html[lang="en"] .about__statement { line-height: 1.35; }
.about__note { margin-top: 22px; font-size: 16px; color: var(--grey); max-width: 30em; }
.about__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.numbers {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px 32px;
  max-width: 1160px; margin: clamp(96px, 11vw, 150px) auto 0; text-align: center;
}
.numbers > div { display: flex; flex-direction: column-reverse; gap: 10px; }
.numbers dd { font-size: clamp(40px, 4.4vw, 60px); font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.numbers dt { font-size: 14px; color: var(--grey); }

/* =========================================================
   Other sections
   ========================================================= */
.h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 700; line-height: 1.35; margin-bottom: 28px; }
html[lang="en"] .h2 { line-height: 1.15; letter-spacing: -0.015em; }
.lead { font-size: 21px; max-width: var(--measure); }

.services, .process { padding: clamp(72px, 9vw, 120px) var(--pad); border-top: 1px solid var(--rule); }
.services__list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px clamp(24px, 3vw, 48px); margin-top: 12px; }
.services__list > div { border-top: 2px solid var(--gold); padding-top: 18px; }
.services dt { font-size: 21px; font-weight: 600; }
.services dd { margin-top: 8px; color: var(--grey); max-width: 28em; }

.process__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.process__num { display: block; font-size: 60px; font-weight: 300; line-height: 1; color: var(--gold); }
.process h3 { margin-top: 20px; font-size: 24px; font-weight: 600; line-height: 1.4; }
.process p { margin-top: 8px; color: var(--grey); max-width: 24em; }

.contact { padding: clamp(80px, 11vw, 144px) var(--pad); border-top: 1px solid var(--rule); }
.contact .h2 { font-size: clamp(36px, 5vw, 60px); }
.contact .lead { color: var(--grey); }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 40px; }
.contact__more { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; margin-top: 36px; }
.contact__mail { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; color: var(--grey); text-decoration: none; }
.contact__mail svg { width: 20px; height: 20px; flex: none; }
.contact__mail:hover { color: var(--white); }

/* Social links: round outline buttons, gold on hover */
.socials { display: flex; gap: 10px; }
.socials a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3); color: var(--white);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.socials a:hover { color: var(--black); background: var(--gold); border-color: var(--gold); }
.socials svg { width: 20px; height: 20px; }
.socials--sm a { width: 36px; height: 36px; }
.socials--sm svg { width: 17px; height: 17px; }

.footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px var(--pad); font-size: 14px; color: var(--grey); border-top: 1px solid var(--rule); }
.footer__logo { height: 32px; width: auto; opacity: 0.8; }

/* =========================================================
   COURSES PAGE
   ========================================================= */
.nav__links a[aria-current="page"] { border-bottom-color: var(--gold); }

.co-hero { padding: clamp(150px, 18vw, 220px) var(--pad) clamp(56px, 7vw, 96px); max-width: 1160px; margin: 0 auto; }
.co-hero__title { font-size: clamp(40px, 6vw, 80px); font-weight: 700; line-height: 1.25; text-wrap: balance; }
html[lang="en"] .co-hero__title { line-height: 1.05; letter-spacing: -0.02em; }
.co-hero .lead { margin-top: 28px; color: var(--grey); }

.co-list { max-width: 1160px; margin: 0 auto; padding: 0 var(--pad) clamp(96px, 11vw, 150px); }
.course {
  display: grid; grid-template-columns: 4fr 5fr 3fr; gap: clamp(24px, 4vw, 56px);
  padding: clamp(36px, 4vw, 56px) 0; border-top: 1px solid var(--rule);
}
.course:last-child { border-bottom: 1px solid var(--rule); }
.course__title { font-size: clamp(26px, 2.6vw, 34px); font-weight: 700; line-height: 1.4; text-wrap: balance; }
html[lang="en"] .course__title { line-height: 1.2; }
.course__for { margin-top: 10px; color: var(--gold); font-size: 16px; }
.course__body > p { color: var(--white); max-width: 30em; }
.course__learn { margin-top: 24px; font-size: 16px; font-weight: 600; color: var(--grey); }
.course__body ul { margin-top: 10px; display: grid; gap: 8px; }
.course__body li { position: relative; padding-inline-start: 22px; color: var(--grey); }
.course__body li::before { content: ""; position: absolute; inset-inline-start: 0; top: 0.8em; width: 10px; height: 2px; background: var(--gold); }
.course__side { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.course__meta { display: grid; gap: 14px; }
.course__meta dt { font-size: 14px; color: var(--grey); }
.course__meta dd { font-size: 18px; font-weight: 500; }

.co-teacher { padding-bottom: clamp(80px, 10vw, 128px); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  .nav__logo img { height: 34px; }
  .hero__shade, [dir="ltr"] .hero__shade { background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.75) 45%, rgba(0,0,0,.15) 75%, rgba(0,0,0,.3) 100%); }
  .about__row { grid-template-columns: 1fr; align-items: start; }
  .about__photo { max-width: 420px; }
  .numbers { grid-template-columns: 1fr 1fr; }
  .services__list { grid-template-columns: 1fr 1fr; }
  .process__steps { grid-template-columns: 1fr; gap: 40px; }
  .course { grid-template-columns: 1fr 1fr; }
  .course__head { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .display { font-size: 34px; }
  .co-hero__title { font-size: 34px; }
  .chapter__text, .lead { font-size: 18px; }
  .services__list { grid-template-columns: 1fr; }
  .course { grid-template-columns: 1fr; gap: 20px; }
  .course__side { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
  .course__meta { grid-auto-flow: column; gap: 28px; }
  .btn { min-height: 50px; padding: 0 22px; }
  .footer { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
