/* Cyber Square site — dispatch #1246
   Multi-page: shared header/nav/footer across Home + How + Who + Why + FAQ.
   Peach servicescape (calm, human, non-tech). Orange reserved for CTA + creation moments.
   No purple/blue AI gradient anywhere in the UI. Logo mark is teal+copper cute AI head (#1367). */

:root {
  --bg-base: #0f0d0b;
  --bg-elevated: #1a1613;
  --bg-sunk: #141110;
  --text-primary: #f7f2ec;
  --text-muted: #b9ada0;
  --text-subtle: #8a7d6f;
  /* Orange is the single action color — CTA + creation only */
  --cta: #e85d2c;
  --cta-hover: #f06a3a;
  --cta-soft: rgba(232, 93, 44, 0.14);
  --border: rgba(247, 242, 236, 0.10);
  --border-strong: rgba(247, 242, 236, 0.18);
  --header-bg: rgba(15, 13, 11, 0.82);
  --card-bg: #1a1613;
  --in-bubble: #221d19;
  --font-sans: "Plus Jakarta Sans", "Noto Sans Arabic", system-ui, sans-serif;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: clamp(3.5rem, 9vw, 6.5rem);
  --max: 1120px;
  --radius: 14px;
  --radius-lg: 20px;
  --header-h: 3.75rem;
  --motion-reveal: 550ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-base: #fdf2e9;
  --bg-elevated: #fbeadd;
  --bg-sunk: #f7dcc7;
  --text-primary: #2a2118;
  --text-muted: #6a5a49;
  --text-subtle: #927f6a;
  --cta: #e85d2c;
  --cta-hover: #d14f22;
  --cta-soft: rgba(232, 93, 44, 0.14);
  --border: rgba(42, 33, 24, 0.13);
  --border-strong: rgba(42, 33, 24, 0.22);
  --header-bg: rgba(253, 242, 233, 0.82);
  --card-bg: #fbeadd;
  --in-bubble: #f5e3d2;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}
html[data-theme="light"] { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html[lang="ar"] body {
  font-size: 1.125rem;
  line-height: 1.85;
}

/* Calibrated soft peach servicescape (Pick-style calm). Gradient kept, no near-white stops. */
html[data-theme="light"] body {
  background:
    radial-gradient(130% 90% at 50% -12%, #fef6ee 0%, rgba(254, 246, 238, 0) 55%),
    linear-gradient(168deg, #fdf2e9 0%, #fbe6d6 50%, #f7dcc7 100%);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

/* Dark mode keeps a warm, near-black base with the faintest ember wash — no cool tones */
html[data-theme="dark"] body {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(208, 102, 47, 0.08) 0%, rgba(208, 102, 47, 0) 55%),
    var(--bg-base);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a { color: var(--cta); text-underline-offset: 0.15em; }
a:hover { color: var(--cta-hover); }

.skip {
  position: absolute;
  inset-inline-start: var(--space-2);
  top: -100%;
  z-index: 100;
  padding: var(--space-1) var(--space-2);
  background: var(--text-primary);
  color: var(--bg-base);
  text-decoration: none;
  border-radius: var(--radius);
}
.skip:focus { top: var(--space-2); }

.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.narrow { max-width: 760px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: var(--header-h);
  padding-block: var(--space-1);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}
.logo-mark { display: block; width: 1.5rem; height: 1.5rem; flex-shrink: 0; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 160ms, border-color 160ms;
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--cta); }
.theme-toggle:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }
.theme-icon { width: 1.15rem; height: 1.15rem; }
[data-theme="dark"] .theme-icon-sun, :root:not([data-theme="light"]) .theme-icon-sun { display: block; }
[data-theme="dark"] .theme-icon-moon, :root:not([data-theme="light"]) .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }
[data-theme="light"] .theme-icon-moon { display: block; }

.lang-switch {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.2rem;
}
.lang-btn {
  font: inherit;
  font-size: 0.8125rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.7rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 160ms, color 160ms;
}
.lang-btn[aria-pressed="true"] { background: var(--cta-soft); color: var(--cta); font-weight: 600; }
.lang-btn:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }

/* Primary site nav (one nav, shared across pages) */
.header-row { flex-wrap: wrap; row-gap: 0.4rem; }
.site-nav {
  order: 3;
  width: 100%;
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.15rem;
}
.site-nav::-webkit-scrollbar { display: none; }
.nav-link {
  flex-shrink: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 160ms, background 160ms;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link[aria-current="page"] { color: var(--cta); background: var(--cta-soft); font-weight: 600; }
.nav-link:focus-visible { outline: 2px solid var(--cta); outline-offset: 2px; }

@media (min-width: 900px) {
  .header-row { flex-wrap: nowrap; }
  .site-nav {
    order: 0;
    width: auto;
    flex: 1;
    justify-content: center;
    overflow: visible;
    padding-bottom: 0;
  }
}

/* Interior page hero (How / Who / Why / FAQ) */
.page-hero { padding-block: clamp(2.5rem, 6vw, 4rem) var(--space-3); text-align: center; }
.page-hero .eyebrow { margin-bottom: var(--space-2); }
.page-hero-title {
  margin: 0 0 var(--space-2);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.page-hero-lede { margin: 0 auto; max-width: 46ch; font-size: 1.1875rem; color: var(--text-muted); }

/* Home value strip (keeps Home short) */
.section-strip { text-align: center; }
.strip-title { margin: 0 0 var(--space-1); font-size: clamp(1.5rem, 4.5vw, 2.1rem); font-weight: 700; letter-spacing: -0.02em; }
.strip-body { margin: 0 auto; max-width: 48ch; color: var(--text-muted); font-size: 1.1rem; }

/* Buttons — orange CTA only */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  min-height: 3rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms, transform 120ms;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--cta); color: #fff; box-shadow: 0 6px 24px -8px var(--cta); }
.btn-primary:hover { background: var(--cta-hover); color: #fff; }
.btn-lg { min-height: 3.4rem; padding: 1rem 2rem; font-size: 1.0625rem; }

/* Sections */
.section { padding-block: var(--space-5); }
.section-eyebrow {
  margin: 0 0 var(--space-1);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cta);
}
.section-eyebrow.center { text-align: center; }
.section-title {
  margin: 0 0 var(--space-2);
  font-size: clamp(1.6rem, 4.5vw, 2.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.section-title.big { font-size: clamp(1.9rem, 5.5vw, 2.9rem); }
.section-title.center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cta);
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--cta-soft);
  border-radius: 999px;
  background: var(--cta-soft);
}

/* ARC 1 — Hero */
.section-hero { padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero-grid {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-5); }
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.hero-title {
  margin: 0;
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.hero-lede { margin: 0; font-size: 1.1875rem; color: var(--text-muted); max-width: 34ch; }
.hero-cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-1); }
.hero-jump { font-size: 1rem; color: var(--text-muted); text-decoration: none; }
.hero-jump:hover { color: var(--cta); }
.hero-note { margin: 0; font-size: 0.9375rem; color: var(--text-subtle); }

/* Phone demo */
.hero-demo { display: flex; justify-content: center; }
.phone {
  width: min(100%, 22rem);
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  padding: 0.85rem;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.5);
}
.phone-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.85rem;
}
.phone-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--cta); }
.phone-title { font-weight: 600; font-size: 0.9375rem; }
.thread { display: flex; flex-direction: column; gap: 0.7rem; min-height: 15rem; }
.bubble {
  max-width: 88%;
  padding: 0.7rem 0.95rem;
  border-radius: 16px;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.bubble-in {
  align-self: flex-end;
  background: var(--cta);
  color: #fff;
  border-bottom-right-radius: 5px;
  min-height: 1.5rem;
}
html[dir="rtl"] .bubble-in { border-bottom-right-radius: 16px; border-bottom-left-radius: 5px; }
.build-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  font-size: 0.875rem;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 250ms;
}
.build-line.is-on { opacity: 1; }
.build-dot {
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: var(--cta);
  animation: pulse 1.4s ease-in-out infinite;
}
.employee-card {
  align-self: flex-start;
  width: 100%;
  background: var(--bg-sunk);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 0.85rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.employee-card.is-on { opacity: 1; transform: translateY(0); }
.employee-head { display: flex; align-items: center; gap: 0.6rem; }
.employee-spark {
  width: 1.9rem; height: 1.9rem; border-radius: 9px; flex-shrink: 0;
  background: var(--cta-soft);
  position: relative;
}
.employee-spark::before {
  content: "✦";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--cta); font-size: 1rem;
}
.employee-name { font-weight: 700; font-size: 0.9375rem; }
.employee-job { font-size: 0.8125rem; color: var(--text-muted); }
.employee-live {
  margin-inline-start: auto;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cta);
  background: var(--cta-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}
.employee-said {
  margin: 0.7rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.55;
}

/* ARC 2 — Agitation */
.section-agitate { background: var(--bg-elevated); border-block: 1px solid var(--border); }
.pain-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.pain-list li {
  position: relative;
  padding-inline-start: 1.9rem;
  font-size: 1.0625rem;
  color: var(--text-muted);
}
.pain-list li::before {
  content: "×";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 1.35rem; height: 1.35rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-subtle);
  font-size: 0.9rem;
  font-weight: 700;
}

/* ARC 3 — Reveal */
.section-reveal { text-align: center; }
.reveal-stack { display: flex; flex-direction: column; gap: var(--space-2); align-items: center; margin-inline: auto; }
.reveal-lede { margin: 0; font-size: 1.1875rem; color: var(--text-muted); max-width: 52ch; }

/* ARC 4 — Steps */
.steps {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  counter-reset: step;
}
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem; height: 2.4rem;
  border-radius: 12px;
  background: var(--cta-soft);
  color: var(--cta);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: var(--space-2);
}
.step-title { margin: 0 0 0.4rem; font-size: 1.1875rem; font-weight: 700; }
.step-body { margin: 0; color: var(--text-muted); font-size: 1rem; }

/* ARC 5 — Who */
.who-grid { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
@media (min-width: 820px) { .who-grid { grid-template-columns: repeat(3, 1fr); } }
.who-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}
.who-role { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 700; color: var(--cta); }
.who-line { margin: 0; font-size: 1.0625rem; color: var(--text-primary); font-style: italic; }

/* ARC 6 — Proof */
.section-proof { background: var(--bg-elevated); border-block: 1px solid var(--border); }
.proof-caption { margin: 0 auto var(--space-4); max-width: 54ch; color: var(--text-muted); font-size: 0.9375rem; }
.proof-grid { display: grid; gap: var(--space-2); }
@media (min-width: 820px) { .proof-grid { grid-template-columns: repeat(3, 1fr); } }
.thread-card {
  margin: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.thread-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.redact-name { font-weight: 700; letter-spacing: 0.05em; color: var(--text-subtle); }
.thread-time { font-size: 0.75rem; color: var(--text-subtle); }
.mini-bubble {
  max-width: 92%;
  padding: 0.55rem 0.8rem;
  border-radius: 13px;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.mini-in { align-self: flex-start; background: var(--in-bubble); color: var(--text-primary); border-bottom-left-radius: 4px; }
.mini-out { align-self: flex-end; background: var(--cta); color: #fff; border-bottom-right-radius: 4px; }
html[dir="rtl"] .mini-in { border-bottom-left-radius: 13px; border-bottom-right-radius: 4px; }
html[dir="rtl"] .mini-out { border-bottom-right-radius: 13px; border-bottom-left-radius: 4px; }
.thread-tag { margin-top: 0.3rem; font-size: 0.8125rem; color: var(--text-muted); }

/* ARC 7 — Compare */
.table-scroll { margin-top: var(--space-3); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.compare-table th, .compare-table td {
  padding: 0.8rem 0.7rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.compare-table thead th { color: var(--text-muted); font-weight: 600; font-size: 0.875rem; }
.compare-table tbody th {
  text-align: start;
  font-weight: 600;
  color: var(--text-primary);
}
.compare-table td { color: var(--text-muted); }
.compare-table .col-us { color: var(--cta); font-weight: 700; }
.compare-table thead th.col-us {
  color: var(--cta);
  background: var(--cta-soft);
  border-radius: 10px 10px 0 0;
}
.compare-table tbody td.col-us { background: var(--cta-soft); }
.compare-note { margin: var(--space-3) auto 0; max-width: 52ch; color: var(--text-muted); }

/* ARC 8 — Trust */
.trust-grid { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
@media (min-width: 820px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}
.trust-head { margin: 0 0 0.4rem; font-size: 1.0625rem; font-weight: 700; }
.trust-body { margin: 0; color: var(--text-muted); font-size: 1rem; }

/* ARC 9 — FAQ */
.faq-list { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); }
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem var(--space-2);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.0625rem;
  padding: 0.7rem 0;
  list-style: none;
  min-height: 3rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; color: var(--cta); font-weight: 700; font-size: 1.2rem; }
.faq-item[open] summary::before { content: "–"; }
.faq-item p { margin: 0 0 0.8rem; color: var(--text-muted); font-size: 1rem; }

/* ARC 10 — Final CTA */
.section-cta { background: var(--bg-elevated); border-top: 1px solid var(--border); }
.cta-stack { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; margin-inline: auto; }
.cta-lede { margin: 0; font-size: 1.1875rem; color: var(--text-muted); max-width: 44ch; }
.cta-trust { margin: 0; font-size: 0.875rem; color: var(--text-subtle); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: var(--space-3); }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.footer-copy { margin: 0; font-size: 0.875rem; color: var(--text-muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; }
.footer-links a:hover { color: var(--cta); }

/* Scroll reveal */
.reveal-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity var(--motion-reveal) var(--ease-out), transform var(--motion-reveal) var(--ease-out); }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.hero-reveal { opacity: 0; transform: translateY(18px); animation: fadeUp var(--motion-reveal) var(--ease-out) forwards; }
.hero-reveal:nth-child(1) { animation-delay: 40ms; }
.hero-reveal:nth-child(2) { animation-delay: 120ms; }
.hero-reveal:nth-child(3) { animation-delay: 200ms; }
.hero-reveal:nth-child(4) { animation-delay: 280ms; }
.hero-reveal:nth-child(5) { animation-delay: 360ms; }
.hero-demo.hero-reveal { animation-delay: 240ms; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.45; transform: scale(0.85); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-reveal, .reveal-on-scroll { opacity: 1; transform: none; animation: none; transition: none; }
  .build-dot { animation: none; }
  .btn:active { transform: none; }
  .build-line { opacity: 1; }
}
