@charset "UTF-8";
/* ==========================================================================
   برمجي — Content layer
   Page header, breadcrumbs, long-form prose, and the native contact form.
   This is what renders the ~105 content pages, so it carries most of the
   reading experience. Monochrome only; sizes come from type.css.
   ========================================================================== */

/* ---------- Logo normalisation ----------
   The brand asset is a white wordmark, made for the old dark footer. On the
   white header and the white drawer it was invisible. brightness(0) crushes any
   colour to pure black; on the dark footer we force it back to pure white, so
   one asset serves both surfaces and both are exactly on-brand. */
.bx-header .brand img,
.drawer .brand img { filter: brightness(0); }
.bx-footer .brand img { filter: brightness(0) invert(1); }

/* ---------- Page header ---------- */
.pagehead {
  position: relative;
  background: var(--ink);
  color: #fff;
  padding-block: clamp(1.75rem, 3.2vw, 2.75rem);
  overflow: hidden;
}
.pagehead::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 100% at 75% 0%, #000 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 100% at 75% 0%, #000 20%, transparent 72%);
  pointer-events: none;
}
.pagehead > .shell { position: relative; z-index: 1; }
/* The page-head h1 was inheriting the homepage hero size (--fs-5xl, 64px),
   which pushed the first line of the article 66% down the first screen. */
.pagehead h1 {
  color: #fff;
  font-size: var(--fs-3xl);
  max-width: 24ch;
  letter-spacing: -.02em;
}
.pagehead__lead {
  margin-top: 1rem;
  color: var(--on-dark-muted);
  font-size: var(--fs-lg);
  max-width: var(--measure);
}
.pagehead__actions { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: .75rem; }

/* Meta and CTAs share one row once there is width for it. */
@media (min-width: 780px) {
  .pagehead__row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; flex-wrap: wrap; margin-top: 1.25rem;
  }
  .pagehead__row .pagemeta,
  .pagehead__row .pagehead__actions { margin-top: 0; }
}

/* ---------- Breadcrumbs ---------- */
.crumbs { margin-bottom: .75rem; }
.crumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
  font-size: var(--fs-2xs); color: var(--on-dark-faint);
}
.crumbs li { display: inline-flex; align-items: center; gap: .4rem; }
.crumbs li + li::before {
  content: "/";
  color: var(--on-dark-faint);
  opacity: .6;
}
.crumbs a { color: var(--on-dark-muted); }
.crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current="page"] { color: #fff; }

/* ---------- Prose ----------
   Overrides the global `.bx p { margin: 0 }` reset deliberately: inside long-form
   content, vertical rhythm is the whole point. */
.prose {
  max-width: var(--measure);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  color: var(--ink-2);
}
/* Vertical rhythm.
   `.prose p { margin: 0 }` (0,1,1) used to beat `.prose > * + *` (0,1,0), which
   silently deleted every paragraph gap on all ~105 content pages. Spacing is now
   stated once, per relationship, at equal specificity. */
.prose p,
.prose ul,
.prose ol,
.prose figure,
.prose blockquote { margin-block: 0; }

.prose > * + * { margin-block-start: 1.35em; }

.prose > * + h2 { margin-block-start: 2.4em; }
.prose > * + h3 { margin-block-start: 1.9em; }
.prose > * + h4 { margin-block-start: 1.6em; }

/* A heading binds to what follows it, not to what precedes it. */
.prose h2 + *,
.prose h3 + *,
.prose h4 + * { margin-block-start: .85em; }

.prose h2,
.prose h3,
.prose h4 {
  margin-block: 0;
  max-width: 34ch;
  scroll-margin-top: 96px;
}
.prose h2 {
  font-size: var(--fs-2xl);
  padding-block-end: .6rem;
}
.prose h3 { font-size: var(--fs-xl); }
.prose h4 { font-size: var(--fs-lg); }
.prose > :first-child { margin-block-start: 0; }

/* Inline SVG pasted into content (icon glyphs in old copy) arrives with no
   width/height and expands to fill the column — 716×1146px each, measured. */
.prose svg { width: 1em; height: 1em; display: inline-block; vertical-align: -.12em; flex: none; }
.prose li > svg:first-child { margin-inline-end: .4rem; }

/* Old copy sometimes wraps a heading inside a list item; it must not get a bullet. */
.prose li:has(> h2, > h3, > h4)::before { display: none; }
.prose li:has(> h2, > h3, > h4) { padding-inline-start: 0; }

.prose strong, .prose b { font-weight: var(--fw-bold); color: var(--ink); }
.prose em { font-style: italic; }

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--dur) var(--ease);
}
.prose a:hover { text-decoration-color: var(--ink); }

/* Lists — the city pages lean on these heavily (48 items on some). */
.prose ul, .prose ol { padding-inline-start: 0; list-style: none; }
.prose ol { counter-reset: bxlist; }
.prose li { position: relative; padding-inline-start: 1.7rem; }
.prose li + li { margin-block-start: .6rem; }
.prose ul > li::before {
  content: "";
  position: absolute; inset-inline-start: .35rem; top: .78em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink);
}
.prose ol > li::before {
  counter-increment: bxlist;
  content: counter(bxlist);
  position: absolute; inset-inline-start: 0; top: .1em;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  color: var(--muted-2);
}
.prose li > strong:first-child { color: var(--ink); }

.prose blockquote {
  margin: 0;
  padding-inline-start: 1.1rem;
  border-inline-start: 3px solid var(--ink);
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
  color: var(--ink);
}

.prose img { border-radius: var(--r); }
.prose figure { margin: 0; }
.prose figcaption,
.prose .wp-caption-text {
  margin-block-start: .6rem;
  font-size: var(--fs-2xs);
  color: var(--muted);
  text-align: center;
}
.prose .wp-caption { max-width: 100%; }

.prose table { font-size: var(--fs-sm); display: block; overflow-x: auto; }
.prose th, .prose td { border-color: var(--line); }
.prose th { background: var(--surface-3); }

.prose code, .prose kbd {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .1em .38em;
  direction: ltr;
  unicode-bidi: embed;
}
.prose pre {
  background: var(--ink);
  color: #E8EAEB;
  border-radius: var(--r);
  padding: 1.1rem 1.25rem;
  direction: ltr;
  text-align: left;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  line-height: var(--lh-code);
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }

.prose hr { margin-block: 2.5em; border-top: 1px solid var(--line); opacity: 1; }

.prose__pages { margin-block-start: 2rem; display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Child-page nav ---------- */
.childnav { margin-block-start: clamp(2.5rem, 5vw, 4rem); }
.childnav h2 { font-size: var(--fs-xl); margin-block-end: 1rem; }

/* ---------- Native contact form ---------- */
.bxform__trap {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  white-space: nowrap;
}

.bxform__row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .bxform__row { grid-template-columns: 1fr 1fr; } }

.bxform__field { margin: 0 0 1rem; }
.bxform__row .bxform__field { margin-bottom: 0; }
.bxform__row + .bxform__row,
.bxform__row + .bxform__field { margin-top: 1rem; }

.bxform label {
  display: block;
  margin-bottom: .35rem;
  font-family: var(--font-display);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--ink-2);
}

.bxform input[type="text"],
.bxform input[type="tel"],
.bxform input[type="email"],
.bxform select,
.bxform textarea {
  width: 100%;
  padding: .8rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: #fff;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  line-height: var(--lh-ui);
  color: var(--ink-2);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.bxform textarea { resize: vertical; min-height: 8rem; line-height: var(--lh-body); }

.bxform input:focus,
.bxform select:focus,
.bxform textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0,0,0,.10);
}
.bxform input:user-invalid,
.bxform textarea:user-invalid { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }

.bxform select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: left 1.1rem top 55%, left 0.8rem top 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-inline-start: 2.25rem;
}

.bxform__submit { margin-top: 1.25rem; width: 100%; }
.bxform__legal {
  margin-top: .85rem;
  font-size: var(--fs-3xs);
  color: var(--muted-2);
  line-height: var(--lh-ui);
}

.formnote {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .9rem 1.1rem;
  margin-bottom: 1.25rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  border: 1px solid var(--ink);
  background: var(--surface-3);
  color: var(--ink);
}
.formnote svg { flex: none; margin-top: .25em; }
.formnote--err { background: #fff; border-style: dashed; }

/* ---------- Search / archive / 404 ---------- */
.entrylist { display: grid; gap: 1.25rem; }
.entrylist article {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  transition: border-color var(--dur) var(--ease);
}
.entrylist article:hover { border-color: var(--ink); }
.entrylist h2 { font-size: var(--fs-xl); }
.entrylist p { margin-top: .5rem; color: var(--muted); }
