/*
 * TOA V2.1 — THE OTHER PUBLIC PAGES IN MODEL B, "لوحة الأثر".
 *
 * Owner decision 14 October 2026 (docs/47-pages-model-b.md): About,
 * Experience, Projects, Contact, the Digital Card, the 404 and the
 * maintenance page wear the homepage's visual language.
 *
 * HOW THE TWO FILES SPLIT. home.css is the model B design system the homepage
 * introduced (tiles, the green board tile, section headings, numbered cards,
 * the career by employer, achievement steps, project cards, buttons, social
 * glyphs) and these pages load it as it is. This file only ADDS what the
 * homepage has no need for: the page board, prose, the contact form, the
 * channel list, the card page and the two standalone status pages. Every
 * rule is scoped under `.hb-page` or a `pg-` class, so the homepage is
 * untouched by it.
 *
 * LIGHT MODE ONLY. Green is the primary; gold is decoration only, and
 * gold-coloured text uses the accessible --gold-text, or sits on green.
 *
 * CSP: presentation lives here and in home.css only — the markup carries no
 * style attribute. Motion stops under prefers-reduced-motion (home.css and the
 * end of this file).
 */

/* ---------- the page board: one green tile, as on the homepage ---------- */
.pg-hero {
  grid-column: span 4; grid-row: auto; min-height: 0;
  align-content: start; gap: 12px; padding: 34px 32px;
}
.pg-hero-full { grid-column: 1 / -1; }
.pg-hero::before {
  /* A quiet gold rule on the inline-start edge: decoration only. */
  content: ""; position: absolute; inset-block: 30px; inset-inline-start: 0;
  width: 3px; border-radius: 3px; background: var(--gold);
}

/* The page heading uses the SAME scale as the section headings and the
   owner's name on the homepage (max 2.125rem = 34px): no giant hero. */
.pg-title {
  margin: 0; max-width: 30ch;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem);
  font-weight: 800; line-height: 1.4; color: #FFF;
}
html[dir="rtl"] .pg-title { line-height: 1.9; }
.pg-statement { font-size: 1.1rem; }
.pg-lede { font-size: 1.02rem; line-height: 1.9; }

/* Side tile (About): portrait, Main Position and Employer. */
.pg-side {
  grid-column: span 2; align-content: center; gap: 16px;
  background: var(--hb-ivory);
}
.pg-portrait { position: relative; justify-self: stretch; }
.pg-portrait > img:first-child {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 14px; background: var(--green-soft);
}
.pg-portrait-mark {
  position: absolute; inset-block-end: 10px; inset-inline-end: 10px;
  display: inline-flex; padding: 5px 7px; border-radius: 8px; background: var(--hb-ivory);
}
.pg-portrait-mark img { display: block; width: 48px; height: auto; }

.pg-role { display: grid; gap: 6px; margin: 0; }
.pg-role-title { font-size: 1.1rem; font-weight: 800; color: var(--green); line-height: 1.6; }
html[dir="rtl"] .pg-role-title { line-height: 1.9; }
.pg-role-org { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .95rem; }
.pg-role-org .icon { color: var(--gold-text); flex: none; }

/* ---------- body sections ---------- */
.pg-sec { padding-block: 40px 64px; }

.pg-prose {
  padding: 28px 32px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
}
.pg-prose p { font-size: 1.05rem; line-height: 2; }
html[lang|="en"] .pg-prose p { line-height: 1.8; }
.hb .pg-prose p + p { margin-top: 1em; }

/* About: the bio and, beside it, the philosophy in the homepage's quote tile. */
.pg-about { display: grid; gap: 16px; align-items: start; }
.pg-about-two { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.pg-quote {
  grid-column: auto; margin: 0; gap: 12px; padding: 30px 32px;
  background: var(--hb-ivory); border-color: var(--hb-gold-line);
}
.pg-quote .hb-quote-body p { font-size: clamp(1.15rem, 1rem + .5vw, 1.35rem); }

.hb-page .hb-areas,
.hb-page .hb-achs { margin-top: 22px; }

.pg-empty { color: var(--muted); }

/* A smaller heading inside a section (Contact). */
.pg-h3 {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-size: 1.2rem; font-weight: 800; color: var(--green); line-height: 1.6;
}
.pg-h3::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--gold); flex: none; }
* + .pg-h3 { margin-top: 28px; }

/* Professional values: a balanced last row (ABOUT-VALUES-UX-01, kept in
   model B). Six tracks, each card spanning two, so a leftover card sits on a
   half-column boundary: five values read 3 + a centred 2, never 4 + 1.
   Counted from each card's position, not hard-coded. Desktop only. */
@media (min-width: 860px) {
  .pg-values { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .pg-values > .hb-area { grid-column: span 2; }
  .pg-values > .hb-area:last-child:nth-child(3n + 1) { grid-column: 3 / span 2; }
  .pg-values > .hb-area:nth-last-child(2):nth-child(3n + 1) { grid-column: 2 / span 2; }
}

/* ---------- projects ---------- */
.pg-project-no {
  position: absolute; inset-block-start: 14px; inset-inline-start: 16px;
  font-size: .85rem; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums;
}
.hb-page .hb-projects { margin-top: 0; }

/* ---------- contact ---------- */
.pg-contact {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 20px; align-items: start;
}
.pg-contact-details,
.pg-form-tile {
  padding: 24px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
}

.pg-channels { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pg-channel {
  display: flex; align-items: center; gap: 12px; min-height: 56px;
  padding: 8px 12px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-weight: 700;
}
.pg-channel:hover { border-color: var(--green); color: var(--green); }
.pg-channel-icon {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 10px; background: var(--green-soft); color: var(--green);
}
.pg-channel-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pg-channel-go { color: var(--muted); display: inline-flex; }

.pg-socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pg-social {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 4px 14px 4px 6px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-weight: 700; font-size: .95rem;
}
html[dir="rtl"] .pg-social { padding: 4px 6px 4px 14px; }
.pg-social:hover { border-color: var(--green); color: var(--green); }
.pg-social-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--green-soft); color: var(--green);
}

.hb .pg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }

.pg-form { display: grid; gap: 16px; }
.pg-field { display: grid; gap: 6px; margin: 0; }
.pg-field label { font-weight: 700; font-size: .95rem; color: var(--green); }
.pg-field input,
.pg-field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--hb-ivory); color: var(--text); font: inherit;
}
.pg-field textarea { min-height: 150px; resize: vertical; line-height: 1.8; }
.pg-field input:focus-visible,
.pg-field textarea:focus-visible {
  outline: 2px solid var(--green); outline-offset: 1px; background: var(--surface);
}
.pg-field [aria-invalid="true"] { border-color: var(--error); }
.hb .pg-form .pg-actions { margin-top: 4px; }
.pg-form button[disabled] { opacity: .6; cursor: not-allowed; }

.hb .pg-note {
  display: flex; align-items: center; gap: 8px; margin: 0 0 16px;
  padding: 12px 14px; border-radius: 12px; font-weight: 700;
}
.pg-note-ok { background: var(--green-soft); color: var(--success); border: 1px solid var(--success); }
.pg-note-warn { background: var(--gold-soft); color: var(--warning); border: 1px solid var(--warning); }

/* ---------- the digital card ---------- */
.pg-card-page { padding-block: 32px 64px; }
.pg-card { display: grid; gap: 14px; width: min(100%, 460px); margin-inline: auto; }

.pg-card-face {
  position: relative; overflow: hidden; display: grid; gap: 6px;
  padding: 24px; border-radius: 22px; color: #FFF;
  background: linear-gradient(135deg, var(--hb-green-2), var(--green) 45%, var(--hb-green-deep));
  box-shadow: 0 30px 60px -30px rgba(5, 51, 33, .55);
}
.pg-card-top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 10px; }
.pg-card-mark { display: inline-flex; padding: 6px 8px; border-radius: 10px; background: var(--hb-ivory); }
.pg-card-mark img { display: block; width: 64px; height: auto; }
.pg-card .vcard-photo {
  width: 88px; height: 88px; object-fit: cover; border-radius: 50%;
  border: 3px solid var(--hb-ivory); margin-bottom: 6px;
}
.pg-card .vcard-name { margin: 0; font-size: 1.5rem; font-weight: 800; line-height: 1.5; color: #FFF; }
html[lang|="en"] .pg-card .vcard-name { text-transform: uppercase; letter-spacing: .03em; }
.pg-card .vcard-role { margin: 0; color: var(--gold); font-weight: 700; line-height: 1.6; }
.pg-card-org { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--hb-on-green); font-size: .92rem; }
.pg-card-org .icon { color: var(--gold); flex: none; }
.hb .pg-card-tagline {
  margin: 10px 0 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14);
  font-weight: 700; line-height: 1.8;
}
.pg-card-shine {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at 20% 0%, rgba(255, 255, 255, .12), transparent 55%);
}

.pg-card-body {
  display: grid; gap: 14px; padding: 18px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border);
}
.pg-card-social { justify-content: center; }
.pg-card-actions { display: grid; gap: 10px; margin: 0; }
.pg-card-actions .hb-btn { justify-content: center; width: 100%; }
.pg-card-actions .hb-btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }

.pg-card-qr {
  display: grid; justify-items: center; gap: 12px; margin: 0;
  padding: 20px; border-radius: 18px; background: var(--hb-ivory); border: 1px solid var(--border);
}
.pg-card-qr img {
  width: 168px; height: 168px; padding: 10px; border-radius: 14px;
  background: #FFF; border: 1px solid var(--hb-gold-line);
}
.pg-card-qr figcaption { display: grid; justify-items: center; gap: 6px; text-align: center; }
.pg-card-hint { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .92rem; }
.pg-card-hint .icon { color: var(--gold-text); flex: none; }
.pg-card .vcard-url {
  direction: ltr; unicode-bidi: isolate; font-size: .85rem; color: var(--green);
  background: transparent; letter-spacing: .02em; overflow-wrap: anywhere;
}

/* ---------- standalone status pages (404, maintenance) ---------- */
.pg-standalone { background: var(--bg); }
.pg-standalone main { min-height: 70vh; display: grid; align-content: center; padding-block: 48px; }
.pg-status { min-height: 0; }
.pg-mini-footer { padding-block: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.pg-mini-footer p { margin: 0; }
.pg-mini-footer .footer-domain { color: var(--gold-text); font-weight: 800; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .pg-channel, .pg-social { transition: border-color .25s, color .25s; }
}
@media (prefers-reduced-motion: reduce) {
  .hb-page *, .hb-page *::before, .hb-page *::after { animation: none !important; transition: none !important; }
}

/* ---------- narrower screens ---------- */
@media (max-width: 860px) {
  .pg-hero, .pg-side { grid-column: 1 / -1; }
  .pg-hero { padding: 26px 24px; }
  .pg-side { grid-template-columns: minmax(0, 1fr); }
  .pg-portrait { max-width: 320px; }
  .pg-contact, .pg-about-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .pg-sec { padding-block: 28px 48px; }
  .pg-prose, .pg-quote { padding: 22px 20px; }
  .pg-contact-details, .pg-form-tile { padding: 18px; }
  .pg-card-page { padding-block: 20px 48px; }
}
