/* ==========================================================================
   Content pages (_PageLayout): the same clear language as the home page.
   A hero with the page's stage, cards that lead to the pages below, then
   sections with the heading beside the text.
   ========================================================================== */

/* ---------- Hero ---------- */
.page-hero { position: relative; background: var(--band); --stage-color: var(--stage-on-band); }
.page-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .6fr); gap: 1.5rem 4rem; align-items: center;
  padding-block: clamp(1.75rem, 1rem + 2vw, 2.5rem) clamp(3rem, 2rem + 4vw, 5rem);
}
.crumbs { grid-column: 1 / -1; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .6rem; list-style: none; font-size: .9375rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-inline-end: .6rem; color: var(--line-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }
.page-hero-text { display: grid; gap: 1.25rem; max-width: 44rem; }
.page-hero-text .lead { max-width: 40rem; }
.page-hero .people-spot { width: min(100%, 15rem); }

/* ---------- Error page: where to go from here ---------- */
.error-hero { background: var(--bg); --stage-color: var(--stage); } /* the contact band below is the grey one */
.error-hero .page-hero-grid { min-height: min(62vh, 36rem); padding-block-start: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.error-code { color: var(--cyan-ink); font-weight: 500; }
.error-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block-start: .5rem; }
.error-request { color: var(--muted); font-size: .9375rem; }
.error-request code { font-size: .875rem; }

/* ---------- Cards to the pages below this one ---------- */
.page-links { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.link-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; list-style: none; }
.link-rows a {
  display: flex; flex-direction: column; gap: .75rem; height: 100%;
  padding: 1.6rem 1.5rem 1.5rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff;
  color: var(--text); text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.link-rows a:hover, .link-rows a:focus-visible { border-color: var(--cyan); box-shadow: 0 10px 28px -16px rgb(15 35 56 / .4); }
.link-rows h2 { font-size: 1.375rem; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
:lang(ar) .link-rows h2 { font-weight: 600; line-height: 1.5; }
.link-rows p { flex: 1; color: var(--muted); font-size: 1rem; line-height: 1.55; }
.link-rows .more {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--band); color: var(--ink); transition: background-color .2s var(--ease), color .2s var(--ease);
}
.link-rows a:hover .more, .link-rows a:focus-visible .more { background: var(--ink); color: #fff; }

/* ---------- Sections: heading beside text ---------- */
.page-sections { padding-block: clamp(1rem, .5rem + 2vw, 2rem) clamp(2rem, 1rem + 3vw, 4rem); }
.page-section { padding-block: clamp(1.75rem, 1rem + 2vw, 2.75rem); }
.page-section-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1rem 4rem;
  padding-block-start: 2rem; border-block-start: 1px solid var(--line);
}
.page-section h2 { font-size: clamp(1.5rem, 1.3rem + .7vw, 1.875rem); font-weight: 500; line-height: 1.25; }
:lang(ar) .page-section h2 { font-weight: 600; line-height: 1.5; }
.prose { display: grid; gap: 1rem; max-width: 46rem; }
.prose p + p { margin: 0; }

/* A section without a heading continues the one before it */
.page-section.is-continued { padding-block-start: 0; margin-block-start: -1rem; }
.page-section.is-continued .page-section-grid { border-block-start: 0; padding-block-start: 0; }
.page-sections > .page-section.is-continued:first-child { margin-block-start: 0; }

/* Plain lines, e.g. an address */
.lines { display: grid; gap: .2rem; list-style: none; }

/* Lists: a cyan check circle instead of a bullet */
.ticks { display: grid; gap: .75rem; list-style: none; }
.ticks li { position: relative; padding-inline-start: 2.1rem; line-height: 1.5; }
.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .1rem;
  width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--cyan-soft);
}
.ticks li::after {
  content: ""; position: absolute; inset-inline-start: .48rem; inset-block-start: .38rem;
  width: .42rem; height: .7rem; border: solid var(--cyan-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* ---------- The contact band at the end of each page ---------- */
.contact-band { background: var(--band); --stage-color: var(--stage-on-band); }
.contact-band .section-text { gap: 1.5rem; }

/* ---------- Small screens ---------- */
@media (max-width: 52rem) {
  .page-hero-grid { grid-template-columns: 1fr; }
  .page-hero .people-spot { order: -1; justify-self: start; width: min(42vw, 9rem); }
  .crumbs { order: -2; }
  .page-section-grid { grid-template-columns: 1fr; }
}

/* ---------- Contact page: the form and the direct ways ---------- */
.contact-page { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem) clamp(4rem, 3rem + 4vw, 7rem); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3rem 4rem; align-items: start; }
.contact-form {
  display: grid; gap: 1.4rem; padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border: 1.5px solid var(--line); border-radius: var(--radius-lg); background: #fff;
}
.contact-form h2, .contact-aside h2 { font-size: 1.625rem; font-weight: 500; }
.contact-aside { display: grid; gap: 1.1rem; position: sticky; inset-block-start: calc(var(--header-h) + 2rem); }
.contact-aside > p { color: var(--muted); }
.contact-aside .people-spot { justify-self: start; width: min(100%, 11rem); margin-block-end: 2.5rem; }
.field { display: grid; gap: .45rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.field label, .field legend { color: var(--ink); font-weight: 500; font-size: 1rem; }
.field legend { margin-block-end: .6rem; padding: 0; }
.optional { color: var(--muted); font-weight: 400; }
.field input:not([type="radio"], [type="checkbox"]), .field textarea {
  width: 100%; min-height: 3.25rem; padding: .75rem 1rem;
  border: 1.5px solid var(--line-strong); border-radius: .75rem; background: #fff;
  color: var(--ink); font: inherit; line-height: 1.5;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--cyan-ink); box-shadow: 0 0 0 4px rgb(20 169 203 / .22); }
.field [aria-invalid="true"] { border-color: var(--danger) !important; }
.field-hint { color: var(--muted); font-size: .9375rem; }
.field-error { color: var(--danger); font-size: .9375rem; font-weight: 500; }
.topics { display: flex; flex-wrap: wrap; gap: .5rem; }
.topics legend { width: 100%; }
.choice { position: relative; display: inline-flex; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 2.9rem; padding: .5rem 1.15rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--pill); background: #fff; color: var(--ink); font-size: 1rem; font-weight: 500;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.choice:hover span { border-color: var(--ink); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--cyan-ink); outline-offset: 3px; }
.check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .75rem; align-items: start; font-weight: 400 !important; color: var(--text) !important; cursor: pointer; }
.check input { width: 1.3rem; height: 1.3rem; margin-block-start: .25rem; accent-color: var(--ink); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 1rem 1.2rem; border-radius: .75rem; border-inline-start: 4px solid; }
.notice.is-ok { background: var(--cyan-soft); border-color: var(--cyan-ink); color: var(--ink); }
.notice.is-error { background: rgb(179 38 30 / .07); border-color: var(--danger); color: var(--ink); }
.contact-form .btn { justify-self: start; }
@media (max-width: 52rem) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside { position: static; }
  .field-row { grid-template-columns: 1fr; }
}
