/* =====================================================================
   Hawiyah · Welcome page additions (about grid, founders, contact, chat)
   Loaded after theme.css. Uses the theme tokens so dark/light both work.
   ===================================================================== */

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; margin-top: 48px; align-items: start; }
.about-quote { font-weight: 300; font-size: clamp(20px,2.4vw,26px); line-height: 1.35; letter-spacing: -.3px; color: var(--fg); }
html[lang="ar"] .about-quote { font-family: var(--font-arabic); font-weight: 400; line-height: 1.7; letter-spacing: 0; }

.founders { display: grid; gap: 20px; }
.founder { display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: start;
  padding: 24px; background: var(--surface-card); border: 1px solid var(--line); }
.founder__photo { width: 120px; height: 132px; object-fit: cover; object-position: top; display: block;
  filter: grayscale(1) contrast(1.05); border: 1px solid var(--line); }
.founder__name { margin: 0; font-size: 20px; font-weight: 500; color: var(--fg); letter-spacing: -.01em; }
html[lang="ar"] .founder__name { font-family: var(--font-arabic); font-weight: 600; }
.founder__role { margin-top: 4px; font: var(--eyebrow); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--purple-light); }
html[lang="ar"] .founder__role { font-family: var(--font-arabic); letter-spacing: 0; text-transform: none; font-size: 13px; }
.founder__bio { margin: 12px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--fg-soft); font-weight: 300; }
html[lang="ar"] .founder__bio { font-family: var(--font-arabic); font-weight: 400; line-height: 1.85; }

/* ---------- Contact grid ---------- */
.contact-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.contact-card { display: flex; flex-direction: column; gap: 10px; padding: 26px 26px 28px; background: var(--surface);
  color: var(--fg); text-decoration: none; transition: background var(--dur) var(--ease-soft); min-height: 132px; }
a.contact-card:hover { background: var(--hover-purple-tint); }
.contact-card__label { font: var(--eyebrow); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--fg-muted); }
html[lang="ar"] .contact-card__label { font-family: var(--font-arabic); letter-spacing: 0; text-transform: none; font-size: 13px; }
.contact-card__value { font-size: 17px; font-weight: 400; line-height: 1.5; color: var(--fg); }
html[lang="ar"] .contact-card__value { font-family: var(--font-arabic); line-height: 1.8; }
.contact-card__value.is-latin { font-family: var(--font-latin) !important; }
a.contact-card .contact-card__value { color: var(--purple-light); }
html[data-theme="light"] a.contact-card .contact-card__value { color: var(--purple); }

/* nav CTA as a button */
button.nav__cta { cursor: pointer; font: inherit; }

/* ---------- Chat launcher ---------- */
.chat-fab { position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 90;
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px;
  background: var(--purple); color: #fff; border: 0; border-radius: 0; cursor: pointer;
  font: 500 14px/1 var(--font-latin); box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: background var(--dur) var(--ease-soft), transform var(--dur) var(--ease-soft); }
.chat-fab:hover { background: #4A3577; }
.chat-fab .dot { width: 8px; height: 8px; background: var(--mint, #16C95C); border-radius: 50%; box-shadow: 0 0 0 0 rgba(22,201,92,.6); animation: hawPulse 2.2s infinite; }
@keyframes hawPulse { 0%{box-shadow:0 0 0 0 rgba(22,201,92,.55)} 70%{box-shadow:0 0 0 10px rgba(22,201,92,0)} 100%{box-shadow:0 0 0 0 rgba(22,201,92,0)} }
html[lang="ar"] .chat-fab { font-family: var(--font-arabic); }
body.chat-open .chat-fab { display: none; }

/* ---------- Chat panel ---------- */
.chat { position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 95;
  width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100vh - 48px));
  display: none; flex-direction: column; background: var(--surface-elev); color: var(--fg);
  border: 1px solid var(--line-strong); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
body.chat-open .chat { display: flex; }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-card); }
.chat__head img { width: 22px; height: 22px; }
.chat__title { font-size: 14px; font-weight: 500; }
.chat__sub { font-size: 12px; color: var(--fg-muted); }
html[lang="ar"] .chat__title, html[lang="ar"] .chat__sub { font-family: var(--font-arabic); }
.chat__close { margin-inline-start: auto; background: transparent; border: 0; color: var(--fg-muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 6px; }
.chat__close:hover { color: var(--fg); }
.chat__log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { max-width: 86%; padding: 11px 14px; font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; animation: hawFadeUp 320ms var(--ease-out) both; }
html[lang="ar"] .msg { font-family: var(--font-arabic); line-height: 1.85; }
.msg--bot { align-self: flex-start; background: var(--surface-card); border: 1px solid var(--line); color: var(--fg); }
.msg--user { align-self: flex-end; background: var(--purple); color: #fff; }
.msg--sys { align-self: center; font-size: 12px; color: var(--fg-muted); background: transparent; padding: 4px; }
.msg .typing { display: inline-flex; gap: 4px; }
.msg .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-muted); animation: hawBlink 1.2s infinite; }
.msg .typing i:nth-child(2){animation-delay:.2s} .msg .typing i:nth-child(3){animation-delay:.4s}
@keyframes hawBlink { 0%,80%,100%{opacity:.25} 40%{opacity:1} }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.chip { padding: 8px 14px; background: transparent; color: var(--fg); border: 1px solid var(--line-strong); cursor: pointer; font: 400 13px/1.2 var(--font-latin); border-radius: 0; transition: all var(--dur) var(--ease-soft); }
html[lang="ar"] .chip { font-family: var(--font-arabic); }
.chip:hover { border-color: var(--purple-light); color: var(--purple-light); }
.chat__form { display: flex; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--surface-card); }
.chat__input { flex: 1; min-width: 0; padding: 11px 12px; background: var(--surface); color: var(--fg); border: 1px solid var(--line-strong); border-radius: 0; font: 400 14px/1.4 var(--font-latin); resize: none; max-height: 96px; }
html[lang="ar"] .chat__input { font-family: var(--font-arabic); }
.chat__input:focus { outline: none; border-color: var(--purple-light); }
.chat__send { padding: 0 16px; background: var(--purple); color: #fff; border: 0; cursor: pointer; font: 500 13px/1 var(--font-latin); border-radius: 0; }
.chat__send:disabled { opacity: .5; cursor: default; }
.chat__form[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .contact-grid { grid-template-columns: 1fr; }
  .founder { grid-template-columns: 88px 1fr; gap: 16px; padding: 18px; }
  .founder__photo { width: 88px; height: 96px; }
  .chat { bottom: 0; inset-inline-end: 0; width: 100vw; height: 100dvh; border: 0; }
}

/* nav CTA: never wrap; hide on small screens (the chat launcher covers it) */
.nav__cta { white-space: nowrap; }
@media (max-width: 640px) { .nav__cta { display: none; } }

/* ---------- QA fixes (2026-09-02) ---------- */
/* 1. Decorative arrows in the services list read as "clickable" — removed */
.numlist__arrow { display: none; }
.numlist__row { grid-template-columns: 88px 1fr 1fr; }
@media (max-width: 760px) { .numlist__row { grid-template-columns: 64px 1fr; } }
/* 2. Contact-section wave: keep the pattern at its natural scale instead of stretching it to cover tall mobile sections */
.cta-block::before { background-size: 1200px 600px; background-repeat: repeat; background-position: center top; }
.cta-block > .wrap { position: relative; z-index: 1; }
/* 3. Tap targets: language + theme buttons at least 40px on touch screens */
@media (max-width: 900px) {
  .nav__lang button, .theme-toggle { min-width: 40px; min-height: 40px; }
  .eyebrow { letter-spacing: .18em; }
  .founder__role { letter-spacing: .08em; font-size: 11px; }
  .footer { padding-bottom: 96px; }           /* room for the chat launcher */
  .wa-link { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .hero .fade-seq { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .chat-fab .dot { animation: none; }
}

.nowrap { white-space: nowrap; }
@media (max-width: 760px) { .cta-block::before { opacity: .12; } }

/* ---------- Contact section: clean background, no pattern ---------- */
.cta-block::before { display: none; }
