/* ==========================================================================
   Home page (option C, docs/design/home-option-c-design.md). Loaded by the
   home page only, after site.css. Same rules as site.css: logical properties,
   colour tokens only, targets at least 44 px, no scripts. Type sizes grow
   from the phone to the desktop: clamp(phone size, ..., desktop size).
   ========================================================================== */

.home-button {
  padding-block: 14px;
  font-size: clamp(17px, 16.56px + 0.112vw, 18px);
}

/* --- The top: headline, introduction and actions beside the main picture.
   The text comes first in the page, so a phone reads the headline first.   */
.home-hero { padding-block: clamp(32px, 20px + 3vw, 56px) clamp(8px, 4px + 1vw, 16px); }
.home-hero__inner {
  display: grid;
  gap: 24px;
  align-items: center;
}
.home-hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(16px, 13px + 0.8vw, 24px);
  min-inline-size: 0;
}
.home-hero__headline {
  margin: 0;
  color: var(--brand);
  font-size: clamp(32px, 24px + 2.2vw, 52px);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
html[lang="en"] .home-hero__headline {
  font-size: clamp(30px, 24px + 1.6vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.home-hero__intro {
  max-inline-size: 34em;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 16px + 0.25vw, 19px);
  line-height: 1.8;
}
html[lang="en"] .home-hero__intro { line-height: 1.65; }
.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}
.home-hero__about {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  font-weight: 600;
}

/* The main picture: the globe, or the photograph staff uploaded, cut to the
   frame. The globe is never mirrored: its useful part is on its right, so it
   is anchored to the right edge in both languages (a position in per cent,
   not a side). */
.home-hero__media { position: relative; min-inline-size: 0; }
.home-hero__picture {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 7 / 5;
  border-radius: var(--radius-l);
  background: var(--deep);
}
.home-hero__picture img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: 100% 50%;
}

/* The next conference: a deep card on the picture's lower inside corner on
   wide screens, under the picture on narrow ones. */
.home-conference {
  margin-block-start: 16px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--deep);
  color: var(--on-deep-muted);
  box-shadow: var(--shadow-card);
  overflow-wrap: anywhere;
}
.home-conference__label { margin: 0 0 4px; color: var(--on-deep-gold); font-size: 14px; font-weight: 600; }
.home-conference__title { margin: 0; font-size: clamp(22px, 20px + 0.5vw, 26px); line-height: 1.3; }
.home-conference__title a {
  display: inline-block;
  min-block-size: var(--target);
  color: var(--on-deep);
  text-decoration: none;
}
.home-conference__title a:hover { text-decoration: underline; }
/* The other language's title: the <p> keeps the page's direction, so the gold line sits at the
   page's start edge; the inner <span> carries the title's own lang and dir. */
.home-conference__other {
  margin-block: 0 6px;
  padding-inline-start: 10px;
  border-inline-start: 2px solid var(--gold-line);
  color: var(--on-deep-gold);
  font-size: 15px;
  font-weight: 600;
}
.home-conference__meta { margin: 0; color: var(--on-deep-muted); font-size: 16px; }
.home-conference__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-block-start: 14px;
}
.home-conference .button--outline { border-color: var(--on-deep-gold); color: var(--on-deep); }
.home-conference .button--outline:hover { background: transparent; border-color: var(--on-deep); color: var(--on-deep); }
.home-conference__programme {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  color: var(--on-deep);
  font-weight: 600;
}

@media (min-width: 64em) {
  .home-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
  /* The card overlaps only the picture's lowest 72 px, clear of Syria (at
     58 % of its height), and stays in the flow, so the section ends under it. */
  .home-conference {
    position: relative;
    inline-size: min(320px, 62%);
    margin-block-start: -72px;
    margin-inline-start: -32px;
  }
}

/* Phones and tablets: the picture under the text, the globe drawn closer so
   Europe to the Gulf fills the frame (zoomed on Syria). */
@media (max-width: 63.99em) {
  .home-hero__picture { aspect-ratio: 7 / 5; }
  .home-hero__picture--globe img { transform: scale(1.6); transform-origin: 82% 58%; }
}

/* Section titles on the home page: Amiri/Montserrat in the brand colour. */
.home-section-title {
  margin: 0;
  color: var(--brand);
  font-size: clamp(26px, 21.37px + 1.2vw, 36px);
  font-weight: 700;
}
html[lang="en"] .home-section-title { font-size: clamp(24px, 21.37px + 0.674vw, 30px); }

/* Every section below the top starts the same distance under the one before. */
.home-section { padding-block: clamp(40px, 28px + 3vw, 72px) 0; }
.home-section .container > .home-section-title { margin-block-end: clamp(20px, 16px + 1vw, 28px); }

/* "What we do": four columns, each under a gold line; no boxes. With a
   picture for every card, each column starts with its picture. */
.verb-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.verb-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-inline-size: 0;
  padding-block: 16px 8px;
  border-block-start: 2px solid var(--gold-line);
  overflow-wrap: anywhere;
}
.verb-list--pictures .verb-row { padding-block-start: 0; border-block-start: 0; }
.verb-row__picture {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 4 / 3;
  margin-block-end: 8px;
  object-fit: cover;
  border-block-end: 2px solid var(--gold-line);
  border-radius: var(--radius) var(--radius) 0 0;
}
.verb-row__verb {
  margin: 0;
  color: var(--brand);
  font-size: clamp(26px, 24px + 0.5vw, 30px);
  line-height: 1.3;
}
html[lang="en"] .verb-row__verb { font-size: clamp(22px, 21px + 0.3vw, 25px); }
.verb-row__text { margin: 0; color: var(--muted); font-size: 16px; }
.verb-row__link {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  font-size: 16px;
  font-weight: 600;
}
/* The line under the columns pointing to "For patients" (an inline link in a sentence). */
.home-verbs__patients { margin-block: 20px 0; max-inline-size: var(--measure); }

/* Latest news: up to three cards side by side, newest first. */
.home-news { padding-block-end: clamp(48px, 30.47px + 4.494vw, 88px); }
.home-news__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  margin-block-end: clamp(16px, 10.74px + 1.348vw, 28px);
}
.home-news__all {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  font-size: clamp(16px, 15.56px + 0.112vw, 17px);
  font-weight: 600;
}
.home-news__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
/* In the narrow home columns the image sits above the text, full width. */
.home-news .news-card { flex-direction: column; }
.home-news .news-card__text { flex: 1 1 auto; }
.home-news .news-card__image { inline-size: 100%; }
.home-news .news-card__title { font-size: clamp(22px, 21.12px + 0.225vw, 24px); }

/* With its optional picture the band shows it at its start, beside the words. */
.join-band__picture {
  flex: 0 0 auto;
  inline-size: clamp(160px, 20vw, 260px);
  block-size: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
}
.join-band--picture .join-band__text { flex-basis: 300px; }

/* Join band: the deep band (dots from .band), full width, at the foot of the page. */
.join-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px 64px;
  padding-block: clamp(44px, 31.73px + 3.146vw, 72px);
}
.join-band__text {
  flex: 1 1 520px;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.join-band__title {
  margin: 0;
  color: var(--on-deep);
  font-size: clamp(32px, 28.49px + 0.899vw, 40px);
  line-height: 1.4;
}
html[lang="en"] .join-band__title { line-height: 1.2; }
.join-band__invitation {
  max-inline-size: 36em;
  margin: 0;
  color: var(--on-deep-muted);
  font-size: clamp(16px, 14.69px + 0.337vw, 19px);
}

@media (max-width: 759.98px) {
  .join-band .button,
  .join-band__picture { inline-size: 100%; }
  .home-news__list { grid-template-columns: 1fr; }
  .join-band__inner { flex-direction: column; align-items: stretch; gap: 16px; }
  .join-band__text { flex: none; }
}

/* The next lecture: a section like the others, then the shared card. */
.home-lecture .next-lecture__head { margin-block-end: clamp(20px, 16px + 1vw, 28px); }
.home-lecture .next-lecture__clock { font-size: 32px; }

/* >>> The next-lecture card: lectures.css and home.css hold this block word for word. */
/* --- The next lecture (lectures hub, lecture page, home page) ---------------------------
   One featured card: the lecture on one side, a tinted panel for its speakers
   on the other (lectures/_next_lecture.html); stacked on phones.             */
.next-lecture__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 32px;
  margin-block-end: 20px;
}
.page .next-lecture { margin-block: 32px 8px; }
.next-lecture__all {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  font-weight: 600;
}
.next-lecture__card {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  padding: clamp(18px, 14.5px + 0.9vw, 28px);
  background: var(--card);
  border: 1px solid var(--line);
  border-block-start: 3px solid var(--gold);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
}
.next-lecture__main {
  display: flex;
  flex: 1 1 380px;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-inline-size: 0;
  overflow-wrap: anywhere;
}
.next-lecture__labels { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.next-lecture__when { margin: 0; color: var(--muted); font-size: 15px; }
.next-lecture__when time {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 14px;
  margin-inline-end: 8px;
  color: var(--ink);
}
.next-lecture__clock { color: var(--brand); font-size: 26px; font-weight: 700; }
.next-lecture__date { font-size: 16px; font-weight: 600; }
.next-lecture__title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 23.4px + 0.67vw, 32px);
  line-height: 1.45;
  text-wrap: balance;
}
html[lang="en"] .next-lecture__title { font-size: clamp(23px, 21.2px + 0.45vw, 27px); line-height: 1.3; }
/* The other language's title, beside a gold line at the page's start edge. */
.next-lecture__other {
  margin: 0;
  padding-inline-start: 10px;
  border-inline-start: 2px solid var(--gold-line);
  color: var(--on-gold-tint);
  font-size: 15px;
  font-weight: 600;
}
.next-lecture__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 8px 0 0; }
.next-lecture__note { color: var(--muted); font-size: 14px; }
.next-lecture__speakers {
  display: flex;
  flex: 1 1 320px;
  flex-direction: column;
  gap: 12px;
  min-inline-size: 0;
  padding: 20px 22px;
  background: var(--tint);
  border-inline-start: 2px solid var(--gold-line);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}
.next-lecture__speakers-label { margin: 0; color: var(--brand-2); font-size: 14px; font-weight: 600; }
.next-lecture__speakers .avatar {
  inline-size: 72px;
  block-size: 72px;
  border-width: 2px;
  background: var(--card);
  font-size: 24px;
}
.next-lecture__speakers--many .avatar { inline-size: 56px; block-size: 56px; font-size: 19px; }
.next-lecture__speakers .person__name { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.next-lecture__speakers .person__name:lang(en) { font-family: var(--font-latin); font-size: 18px; }
.next-lecture__speakers a.person__name { text-decoration: none; }
.next-lecture__speakers a.person__name:hover { text-decoration: underline; }
/* The speaker with the résumé is written twice and only one is displayed (display: none also
   hides the other from screen readers and the keyboard): open from 760 px, behind the name on a
   phone, so the card stays short there. No script. */
.next-lecture__wide { display: contents; }
.next-lecture__narrow { display: none; }
@media (max-width: 759.98px) {
  .next-lecture__wide { display: none; }
  .next-lecture__narrow { display: contents; }
}
@media (max-width: 479.98px) {
  .next-lecture__speakers { padding: 16px; }
  .next-lecture__speakers .avatar { inline-size: 56px; block-size: 56px; font-size: 19px; }
}
/* The zone after a time ("(Damascus time)"), in the card and on the lecture page. */
.lecture-zone { color: var(--muted); font-weight: 400; font-size: 16px; }
/* <<< The next-lecture card. */

/* A section's heading row: the title, and its "all" link at the far end. */
.home-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 32px;
  margin-block-end: clamp(20px, 16px + 1vw, 28px);
}
.home-section__head .home-section-title { margin: 0; }
.home-section__more {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  font-weight: 600;
}

/* --- Calendar: this month's grid in a card; the month's lectures beside it
   (under it below 48em). A lecture day is a filled square linking to it. */
.home-cal__body { display: grid; gap: 24px 40px; align-items: start; }
.home-cal__month {
  padding: 16px clamp(12px, 8px + 1vw, 20px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.home-cal__grid {
  inline-size: 100%;
  border-collapse: separate;
  border-spacing: 2px;
  table-layout: fixed;
  color: var(--ink);
  font-size: 15px;
  text-align: center;
}
.home-cal__caption {
  margin-block-end: 8px;
  color: var(--brand);
  font-size: 18px;
  font-weight: 700;
  text-align: start;
}
.home-cal__grid th { padding-block: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.home-cal__grid td { block-size: var(--target); padding: 0; }
.home-cal__grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--target);
  border-radius: var(--radius-s);
  background: var(--btn);
  color: var(--on-btn);
  font-weight: 700;
  text-decoration: none;
}
.home-cal__day--conference:not(.home-cal__day--lecture) a { background: var(--tint); color: var(--brand); }
.home-cal__grid a:hover { background: var(--brand-2); color: var(--on-btn); }
/* A conference or workshop day, also a lecture day: a gold line at its foot, kept off the
   day's own ground by a stripe of the card (3:1 on the card, light and dark; the tint is not). */
.home-cal__day--conference a { border-block-end: 3px solid var(--gold); box-shadow: inset 0 -2px 0 var(--card); }
.home-cal__day[aria-current="date"] { outline: 2px solid var(--gold); outline-offset: -2px; border-radius: var(--radius-s); }
.home-cal__note { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
/* The list: date, time and title in columns shared by every row (subgrid), so
   they line up whatever the longest date; on phones the title goes under them. */
.home-cal__list {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  column-gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-block-start: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.home-cal__entry {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  border-block-end: 1px solid var(--line);
}
.home-cal__entry a {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: baseline;
  gap: 2px 20px;
  min-block-size: var(--target);
  min-inline-size: 0;
  padding-block: 10px;
  color: var(--ink);
  text-decoration: none;
}
.home-cal__entry a:hover .home-cal__title { text-decoration: underline; }
.home-cal__date { font-weight: 700; font-size: 15px; }
.home-cal__time { color: var(--muted); font-size: 15px; }
.home-cal__title { min-inline-size: 0; }
.home-cal__empty, .home-cal__more { margin: 12px 0 0; color: var(--muted); }
.home-cal__more a, .home-cal__empty a {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target);
  font-weight: 600;
}

@media (min-width: 48em) {
  .home-cal__body { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
}
@media (max-width: 47.99em) {
  .home-cal__list { grid-template-columns: max-content minmax(0, 1fr); }
  .home-cal__title { grid-column: 1 / -1; }
}
/* At 360 px and under the month spans the screen, so each of the seven days
   keeps a 44 px wide target (44 at a true 320 px). */
@media (max-width: 22.5em) {
  .home-cal__month {
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: 2px;
    border-inline: 0;
    border-radius: 0;
  }
  .home-cal__grid { border-spacing: 1px; }
  .home-cal__caption, .home-cal__note { padding-inline: 18px; }
  .home-cal__grid th { font-size: 11px; }
}
