/* =====================================================================
   ICAIRE Connect — the whole stylesheet. No framework, no build step.

   THIS PROJECT OWNS THESE VALUES. They are ICAIRE's brand colours, copied
   from the centre's design system as VALUES, not imported as code — this
   site shares no build with the platform, which is the point of it being a
   separate project. If the brand palette ever changes, it changes here too.
   ===================================================================== */

:root {
  /* Brand */
  --midnight: #0f2a38;
  --forest: #1c5631;
  --lime: #8dc63f;

  /* Type: Latin uses the same system stack the centre's site uses; Arabic
     uses Almarai, loaded from Google Fonts by the page. */
  --font-latin: Calibri, Carlito, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-arabic: Almarai, "Noto Kufi Arabic", "Segoe UI", sans-serif;

  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* Never let the page scroll sideways on a phone. */
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--midnight);
  color: #fff;
  font-family: var(--font-latin);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Stops iOS Safari inflating text in one orientation only. */
  -webkit-text-size-adjust: 100%;
}

html[dir="rtl"] body {
  font-family: var(--font-arabic);
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Keyboard focus must stay visible on the dark field, where a forest ring
   would be invisible. Lime clears 3:1 against Midnight. */
:where(a, button):focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

/* --- Layout -------------------------------------------------------- */

.page {
  position: relative;
  /* `clip`, not `hidden`: it contains the glow below without turning this
     element into a scroll container. */
  overflow: clip;
  min-height: 100vh;
}

/* A single soft forest glow behind the identity block, so the surface reads
   as one card rather than a stack of bands. Decoration only. */
.page::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 32rem;
  background: radial-gradient(80% 60% at 50% 0%, rgba(28, 86, 49, 0.55), transparent 70%);
  pointer-events: none;
}

.shell {
  position: relative;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

/* --- Top row: logo + language switch -------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  height: 2.5rem;
  width: auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  /* 44px minimum touch target — a link nobody can hit is not a link. */
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.875rem;
  transition: border-color 0.2s, color 0.2s;
}

.lang-switch:hover {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

/* --- Identity: the profile header ------------------------------------ */

.identity {
  margin-top: 2rem;
  text-align: center;
}

/* The mark, as a profile avatar. A ring in Signal Lime lifts it off the field
   and ties it to the accent used by the chips and headings below. */
.avatar {
  display: block;
  width: 6rem;
  height: 6rem;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(141, 198, 63, 0.5);
}

h1 {
  margin: 1.125rem 0 0;
  font-weight: 600;
  font-size: clamp(2rem, 8vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.full-name {
  margin: 0.375rem auto 0;
  max-width: 24rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
}

/* The trust marker — the equivalent of a verified tick, and the most valuable
   element on the page for a stranger: it is what makes the centre checkable
   rather than merely claimed. Lime tick, white text on a translucent pill:
   the tick is a GRAPHIC on lime, never text on a lime fill. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0.875rem 0 0;
  padding: 0.3125rem 0.75rem 0.3125rem 0.5rem;
  border: 1px solid rgba(141, 198, 63, 0.35);
  border-radius: var(--radius-pill);
  background: rgba(141, 198, 63, 0.12);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
}

.badge-icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--lime);
}

.tagline {
  margin: 1rem auto 0;
  max-width: 30rem;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  text-wrap: balance;
}

/* --- Social icon row -------------------------------------------------- */

/* Compact by design. Following is a low-commitment action, so it must not carry
   the same visual weight as the destinations below; recognisable glyphs buy
   that for one line of height and no reading. */
.socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
}

.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 44px — small glyphs still need a full-size target (Fitts, and every mobile
     accessibility guideline). The icon is 22px; the reach is 44. */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.socials a:hover {
  border-color: var(--lime);
  background: rgba(141, 198, 63, 0.12);
  color: #fff;
}

.socials svg {
  width: 22px;
  height: 22px;
}

/* --- Share controls -------------------------------------------------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: filter 0.2s, border-color 0.2s, color 0.2s;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* Lime is a GRAPHIC colour: dark text on it, never white. */
.btn-primary {
  background: var(--lime);
  color: var(--midnight);
}

.btn-primary:hover {
  filter: brightness(0.95);
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* Hidden until JavaScript confirms the browser can actually share. Showing a
   button that does nothing is worse than showing no button. */
.btn-share[hidden] {
  display: none;
}

/* --- About ------------------------------------------------------------ */

.about {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  /* START-aligned inside a centred header, on purpose. Centred prose is harder
     to read past a line or two: every line begins in a different place, so the
     eye has to hunt for the start of each one. The identity above is short
     enough to centre; this is not. */
  text-align: start;
}

.about-body {
  margin: 0 0 0.875rem;
  color: rgba(255, 255, 255, 0.78);
}

.about-body:last-of-type {
  margin-bottom: 0;
}

/* --- Sections -------------------------------------------------------- */

section {
  margin-top: 3rem;
}

.section-heading {
  margin: 0 0 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lime);
}

html[dir="rtl"] .section-heading {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8125rem;
}

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

/* --- Tiles ----------------------------------------------------------- */

/* FLAT on purpose: no shadow, no lift. Hover only lightens the border and
   tints the title — and because touch devices have no hover at all, every
   tile is fully legible and fully tappable without it. */
.tile {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s, background-color 0.2s;
}

.tile:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.09);
}

.tile:hover .tile-title,
.tile:hover .tile-title .arrow {
  color: var(--lime);
}

.tile-small {
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  min-height: 56px;
  border-radius: var(--radius-md);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: rgba(141, 198, 63, 0.15);
  color: var(--lime);
}

.chip svg {
  width: 18px;
  height: 18px;
}

/* The primary tiles get the solid chip: bigger, higher contrast, and the
   glyph is Midnight on lime — never light-on-lime. */
.tile-large .chip {
  width: 2.75rem;
  height: 2.75rem;
  background: var(--lime);
  color: var(--midnight);
}

.tile-large .chip svg {
  width: 22px;
  height: 22px;
}

.tile-body {
  min-width: 0;
  flex: 1;
}

.tile-title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.35;
  transition: color 0.2s;
}

.tile-small .tile-title {
  font-size: 0.875rem;
}

.tile-blurb {
  margin: 0.375rem 0 0;
  color: rgba(255, 255, 255, 0.7);
}

.tile-small .tile-blurb {
  margin-top: 0.125rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.arrow {
  flex: none;
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s;
}

/* Directional arrows mirror in Arabic; the icons inside chips do not. */
html[dir="rtl"] .arrow {
  transform: scaleX(-1);
}

.arrow-end {
  margin-inline-start: auto;
}

/* The handle and the email address are proper nouns — always left-to-right,
   even on the Arabic page. */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

html[dir="rtl"] .ltr {
  text-align: right;
}

@media (min-width: 640px) {
  .shell {
    padding-top: 2rem;
  }

  .logo {
    height: 3rem;
  }

  .links-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tile {
    padding: 1.25rem;
  }
}

/* --- Team ------------------------------------------------------------ */

/* --- The roster tree: director → team → interns ---------------------- */

/* The director's own tier. Bigger portrait, a stated role, and a rule beneath —
   the structure has to be visible, not inferred from grid position, because the
   first cell of a grid reads as "first alphabetically" to most people. */
.director {
  margin-bottom: 2.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.director-photo {
  display: block;
  width: 7rem;
  height: 7rem;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 2px rgba(141, 198, 63, 0.4);
}

.director .member-name {
  font-size: 1.0625rem;
}

.director .member-social {
  width: 24px;
  height: 24px;
}

.director .member-social svg {
  width: 14px;
  height: 14px;
}

.director-title {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.875rem;
  color: var(--lime);
}

/* Group labels inside the roster. Quieter than a section heading: these divide
   one list, they do not open a new part of the page. */
.section-subheading {
  margin: 2.25rem 0 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

html[dir="rtl"] .section-subheading {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.875rem;
}

.team-lead {
  margin: -0.5rem 0 1.5rem;
  color: rgba(255, 255, 255, 0.7);
}

.team {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem 1rem;
}

@media (min-width: 640px) {
  .team {
    grid-template-columns: repeat(4, 1fr);
  }
}

.member {
  text-align: center;
}

.member img,
.member .placeholder {
  display: block;
  width: 4rem;
  height: 4rem;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 640px) {
  .member img,
  .member .placeholder {
    width: 5rem;
    height: 5rem;
  }
}

/* The stand-in for a colleague with no portrait on file. A quiet drawn mark,
   never initials (two letters on a disc read as a broken avatar and pull the
   eye harder than the real photographs) and never a stock face. The figure is
   LIME because on Midnight the darker brand green measures under 1.4:1 and the
   mark simply disappears. */
.member .placeholder {
  background: rgba(141, 198, 63, 0.15);
  box-shadow: inset 0 0 0 1px rgba(141, 198, 63, 0.3);
  color: var(--lime);
}

.member-name {
  display: block;
  margin-top: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

/* A member with a profile: the whole card is the target, and the LinkedIn glyph
   sits inline after the name so it reads as "this name is a link" rather than
   as a separate control competing with it. */
.member-link {
  display: block;
  border-radius: var(--radius-md);
  padding: 0.25rem;
  transition: background-color 0.2s;
}

.member-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.member-link:hover .member-name {
  color: var(--lime);
}

/* The portrait, as a positioning context for the badge on its corner. */
.member-photo {
  position: relative;
  display: inline-block;
}

/* The LinkedIn badge. Lime disc, Midnight glyph — a graphic on lime, never
   text on it. Ringed in the page background so it reads as sitting ON the
   portrait rather than being part of the photograph. */
.member-social {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--midnight);
  box-shadow: 0 0 0 2px var(--midnight);
}

.member-social svg {
  width: 12px;
  height: 12px;
}

.member-link:hover .member-social {
  filter: brightness(1.1);
}

/* --- Closing --------------------------------------------------------- */

.closing {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.closing-mail {
  display: inline-block;
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.closing-mail:hover {
  color: var(--lime);
}

/* --- QR overlay ------------------------------------------------------- */

.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: rgba(15, 42, 56, 0.97);
}

.qr-overlay[hidden] {
  display: none;
}

/* A WHITE CARD, not the dark field. Scanners need a light quiet zone around
   the modules; a code floated straight onto a dark background is the classic
   reason a "working" QR fails in a hall. */
.qr-card {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: #fff;
}

.qr-card img {
  display: block;
  /* Big on purpose: a phone held up across a table is a low-light, off-angle,
     small-target scan. Bounded by BOTH viewport axes — a landscape phone is
     short, not narrow. */
  width: min(72vw, 72vh, 22rem);
  height: auto;
}

.qr-url {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Honour a reader who has asked for less motion. Nothing here is essential
   to reading the page, so it all simply stops. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
