/* ════════════════════════════════════════════════════════════════
   Page-specific styles · About, Contact, Terms, Privacy
   Shares tokens from landing.css
   ════════════════════════════════════════════════════════════════ */

/* ── Page hero (smaller than landing hero) ───────────────────── */
.page-hero {
  padding-block: 72px 56px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(50% 50% at 50% 0%, rgba(45,127,249,0.10) 0%, transparent 70%);
  pointer-events: none;
}
html[data-theme="dark"] .page-hero::before {
  background: radial-gradient(50% 50% at 50% 0%, rgba(45,127,249,0.22) 0%, transparent 70%);
}
.page-hero-inner { position: relative; z-index: 1; max-width: 760px; }
.page-hero .eyebrow { margin-bottom: 24px; }
.page-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.028em;
  line-height: 1.05;
  margin-bottom: 18px;
}
.page-hero .lede { font-size: 19px; }

/* ── Prose (long-form text) ───────────────────────────────── */
.prose {
  max-width: 720px;
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
}
.prose > * + *,
.prose .lang-en > * + *,
.prose .lang-ar > * + * { margin-top: 1em; }
.prose .lang-en > *:first-child,
.prose .lang-ar > *:first-child { margin-top: 0; }
.prose h2 {
  font-size: 24px;
  letter-spacing: -0.018em;
  margin-top: 2.2em;
  margin-bottom: 0.4em;
  scroll-margin-top: 88px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 18px;
  letter-spacing: -0.012em;
  font-weight: 600;
  margin-top: 1.4em;
  margin-bottom: 0.4em;
}
.prose p { color: var(--ink); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; }
.prose ul, .prose ol { padding-inline-start: 24px; margin: 0.5em 0; }
.prose li { margin-bottom: 0.4em; color: var(--ink); }
.prose li::marker { color: var(--ink-soft); }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--brand-dark); }
.prose code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--surface-subtle);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--ink-muted);
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 2em 0;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
}
.prose th, .prose td {
  text-align: start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
  vertical-align: top;
}
.prose th {
  background: var(--surface-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}
.prose tr:last-child td { border-bottom: none; }
.prose blockquote {
  border-inline-start: 3px solid var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
  padding: 18px 22px;
  border-radius: 0 12px 12px 0;
  color: var(--ink);
  margin: 1.4em 0;
}
.prose blockquote p { margin: 0; }
.prose blockquote strong { color: var(--brand-dark); }
html[data-theme="dark"] .prose blockquote strong { color: var(--brand-light); }

/* RTL adjustments for prose */
html[lang="ar"] .prose { line-height: 1.85; font-size: 16.5px; }
html[lang="ar"] .prose h2 { line-height: 1.4; }

/* ── Legal layout w/ sidebar TOC ──────────────────────────── */
.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: flex-start;
  padding-bottom: 96px;
}
@media (max-width: 880px) {
  .legal-layout { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static !important; max-height: none !important; }
}
.legal-toc {
  position: sticky; top: 88px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-inline-end: 12px;
}
.legal-toc h4 {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 12px;
}
.legal-toc ol {
  list-style: none;
  padding: 0; margin: 0;
  counter-reset: toc;
}
.legal-toc li {
  counter-increment: toc;
  padding: 4px 0;
}
.legal-toc a {
  color: var(--ink-muted);
  font-size: 13px;
  display: block;
  padding: 4px 0;
  border-inline-start: 2px solid transparent;
  padding-inline-start: 10px;
  transition: color .15s, border-color .15s;
  line-height: 1.4;
}
.legal-toc a:hover { color: var(--ink); }
.legal-toc a.active {
  color: var(--brand);
  border-inline-start-color: var(--brand);
}
.legal-toc a::before {
  content: counter(toc) ".";
  display: inline-block;
  width: 22px;
  color: var(--ink-soft);
  margin-inline-end: 4px;
  font-variant-numeric: tabular-nums;
}

/* ── About page ───────────────────────────────────────────── */
.founders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 96px;
}
@media (max-width: 580px) {
  .founders-grid { grid-template-columns: 1fr; gap: 20px; }
}
.about-body { display: flex; flex-direction: column; gap: 20px; }
.about-body p { font-size: 16.5px; line-height: 1.7; color: var(--ink); }
.about-body p strong { font-weight: 600; }
.about-body p .accent { color: var(--brand); font-weight: 600; }

/* Founder card */
.founder-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card-lg);
  padding: 32px;
  display: flex; flex-direction: column; gap: 20px;
  box-shadow: var(--elev-2);
}
.founder-head {
  display: flex; gap: 18px; align-items: center;
}
.founder-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  display: grid; place-items: center;
  color: #fff;
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  flex-shrink: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 8px 20px -8px rgba(45,127,249,0.4);
}
.founder-name { font-size: 20px; font-weight: 700; letter-spacing: -0.018em; margin: 0 0 4px; }
.founder-title { color: var(--ink-muted); font-size: 14px; }
.founder-bio { color: var(--ink); font-size: 15px; line-height: 1.65; }
.founder-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}
.founder-meta-cell .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-weight: 600; margin-bottom: 4px; }
.founder-meta-cell .val { font-size: 14px; font-weight: 500; }

/* Company facts grid */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 96px;
}
@media (max-width: 800px) { .facts-grid { grid-template-columns: repeat(2, 1fr); } }
.fact-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 20px 22px;
}
.fact-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-soft); font-weight: 600;
  margin-bottom: 8px;
}
.fact-value { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }

/* Values grid */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .values-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .values-grid { grid-template-columns: 1fr; } }
.value-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.value-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--surface-subtle);
  display: grid; place-items: center;
  color: var(--brand);
}
html[data-theme="dark"] .value-icon { color: var(--brand-light); }
.value-icon svg { width: 22px; height: 22px; }
.value-card h3 { font-size: 17px; font-weight: 600; }
.value-card p { color: var(--ink-muted); font-size: 14.5px; line-height: 1.55; }

/* ── Contact page ─────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: flex-start;
  margin-bottom: 96px;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card-lg);
  padding: 32px;
  display: flex; flex-direction: column; gap: 20px;
  box-shadow: var(--elev-2);
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label {
  font-size: 13px; font-weight: 600;
  color: var(--ink);
}
.form-field label .req { color: var(--cancelled); margin-inline-start: 2px; }
.form-field input,
.form-field textarea,
.form-field select {
  appearance: none; -webkit-appearance: none;
  font: inherit;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(45,127,249,0.15);
}
.form-field textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.form-field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%236B7A8F' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-inline-end: 36px;
}
html[dir="rtl"] .form-field select { background-position: left 14px center; }
.form-field .hint {
  font-size: 12px;
  color: var(--ink-soft);
}
.form-actions {
  display: flex; gap: 12px; align-items: center;
  margin-top: 8px;
}

/* Direct contact panel */
.contact-direct {
  display: flex; flex-direction: column; gap: 24px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.contact-card h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-soft); font-weight: 600;
  margin: 0;
}
.contact-line {
  display: flex; align-items: center; gap: 12px;
  font-size: 14.5px;
  color: var(--ink);
}
.contact-line .icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-subtle);
  display: grid; place-items: center;
  color: var(--brand);
  flex-shrink: 0;
}
html[data-theme="dark"] .contact-line .icon { color: var(--brand-light); }
.contact-line .icon svg { width: 17px; height: 17px; }
.contact-line .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-weight: 600; }
.contact-line .val { font-size: 14.5px; color: var(--ink); font-weight: 500; }
.contact-line a { color: var(--brand); font-weight: 500; }

.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--surface);
  padding: 14px 22px;
  border-radius: var(--r-pill);
  box-shadow: var(--elev-3);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 200;
  font-size: 14px;
  display: flex; align-items: center; gap: 10px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--completed); color: #fff; }
.toast.error   { background: var(--cancelled); color: #fff; }

/* ── FAQ accordion ────────────────────────────────────────── */
.faq-section { margin-top: 32px; }
.faq-section h2 {
  font-size: 28px; letter-spacing: -0.018em;
  margin-bottom: 24px;
}
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq-item[open] { border-color: var(--brand); box-shadow: var(--elev-1); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--surface-subtle);
  display: grid; place-items: center;
  color: var(--ink-muted);
  transition: transform .25s, background .2s, color .2s;
  flex-shrink: 0;
}
.faq-item[open] .faq-icon {
  transform: rotate(45deg);
  background: var(--brand);
  color: #fff;
}
.faq-item .faq-icon svg { width: 12px; height: 12px; }
.faq-body {
  padding: 0 22px 22px;
  color: var(--ink-muted);
  line-height: 1.6;
  font-size: 14.5px;
}

/* ── Page-level utilities ─────────────────────────────────── */
.section-divider {
  height: 1px;
  background: var(--hairline);
  margin: 96px 0;
}
