/* Arab City Lab — landing page
   Brand palette:
   Carbon Black #161616 · Paper White #F7F6F2 · Pure White #FFFFFF
   Cartographic Blue #247DB3 · Graphite Grey #858585
   Type: Futura (EN) + Noto Naskh Arabic (AR). Jost is the free web
   fallback for Futura until a Futura webfont licence is in place. */

:root {
  --black: #161616;
  --paper: #f7f6f2;
  --blue: #247db3;
  --grey: #858585;
  --rule: #dcdad3;
  --en: "Futura PT", Futura, "Jost", "Century Gothic", sans-serif;
  --ar: "Noto Naskh Arabic", "Geeza Pro", serif;
  --pad: clamp(24px, 7vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--black);
  font-family: var(--en);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[lang="ar"] { font-family: var(--ar); }

.page {
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 9vw, 104px);
}

/* Logo */
.logo { display: block; width: clamp(180px, 22vw, 260px); height: auto; }

/* Bilingual introduction: headings share one row, paragraphs another,
   so Arabic and English text start on the same line */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  column-gap: clamp(32px, 6vw, 96px);
  row-gap: 20px;
}

.intro .col {
  display: grid;
  grid-row: span 2;
  grid-template-rows: subgrid;
}

.intro h1 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 500;
  line-height: 1.2;
  align-self: end;
}

.col-ar h1 { font-weight: 600; line-height: 1.35; }

.intro p { margin: 0; max-width: 32em; color: #3a3a3a; font-size: 17px; line-height: 30px; }
.col-ar p { font-size: 18px; line-height: 30px; }

/* Forthcoming sections */
.label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--black);
}

.label-row [lang="ar"] { letter-spacing: 0; font-size: 14px; }

details { border-bottom: 1px solid var(--rule); }

summary {
  display: grid;
  grid-template-columns: 40px 1fr auto 28px;
  align-items: baseline;
  padding: 22px 0;
  font-size: 18px;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

summary .num { font-size: 12px; color: var(--grey); }
summary .ar { font-size: 19px; }

/* Minimal chevron */
.chev {
  justify-self: end;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--black);
  border-bottom: 1.5px solid var(--black);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

details[open] .chev { transform: translateY(1px) rotate(-135deg); }

summary:hover .en,
summary:hover .ar,
summary:focus-visible .en,
summary:focus-visible .ar { color: var(--blue); }
summary:hover .chev,
summary:focus-visible .chev { border-color: var(--blue); }
summary:focus-visible { outline: none; }

.desc {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 0 28px 22px 40px;
  font-size: 15px;
  color: #3a3a3a;
}

.desc p { margin: 0; }

/* Footer */
.footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  font-size: 13px;
}

.links { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }

.footer a { color: var(--black); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.arr { width: 9px; height: 9px; flex: none; }
.footer a:hover, .footer a:focus-visible { color: var(--blue); }

.footer small { color: var(--grey); font-size: 12px; }

/* Mobile: Arabic first, then English */
@media (max-width: 760px) {
  .intro { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 40px; }
  .intro .col { display: flex; flex-direction: column; gap: 16px; grid-row: auto; }
  .col-ar { order: -1; }
  .desc { flex-direction: column; gap: 6px; padding-right: 0; }
  .desc [lang="ar"] { text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  .chev { transition: none; }
}

/* Fields of study (collapsible, like the Forthcoming rows) */
.fields { margin-top: calc(-1 * clamp(56px, 9vw, 104px)); }
.about { margin-top: calc(-1 * clamp(24px, 4vw, 48px)); }
.about details { border-top: 1px solid var(--rule); }
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(32px, 6vw, 96px);
  padding: 0 28px 24px 40px;
}
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; font-size: 14px; line-height: 26px; color: #5a5a5a; }
.tags li:not(:last-child)::after { content: "·"; margin: 0 8px; color: var(--grey); }
.tags-ar { font-size: 15px; }

@media (max-width: 760px) {
  .fields-grid { grid-template-columns: 1fr; row-gap: 20px; padding-right: 0; }
  .tags-ar { order: -1; }
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(32px, 6vw, 96px);
  padding: 0 28px 24px 40px;
  font-size: 16px;
  line-height: 28px;
  color: #3a3a3a;
}
.about-grid p { margin: 0; max-width: 34em; }
.about-grid p[lang="ar"] { font-size: 17px; justify-self: end; text-align: right; }
.about-grid a, .credit a { color: var(--black); text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 3px; }
.about-grid a:hover, .credit a:hover { color: var(--blue); }

/* Footer credit */
.credit { display: flex; flex-direction: column; gap: 2px; align-self: end; }
.footer .credit small { color: var(--grey); font-size: 12px; white-space: nowrap; }
.footer .credit small[lang="ar"] { align-self: flex-start; font-size: 13px; }
.credit a[dir="ltr"] { font-family: var(--en); font-size: 12px; }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; row-gap: 12px; padding-right: 0; }
  .about-grid p[lang="ar"] { order: -1; }
}
