/* ==========================================================================
   qais-crm.css — shared design system for the qais.app public site
   (2026-08 big-CRM rebuild; replaces qais-shift.css on redesigned pages)

   Palette:  ink #0C1222 · paper #F7F7F2 · card #fff · gold #E8A020
   Type:     Onest (display + body) · IBM Plex Mono (eyebrows/microcopy/data)
   ========================================================================== */

:root {
  --ink: #0C1222;
  --ink-2: #131A30;
  --ink-3: #1C2440;
  --paper: #F7F7F2;
  --card: #FFFFFF;
  --gold: #E8A020;
  --gold-deep: #B87710;
  --gold-soft: #FBF0DA;
  --slate: #47506B;
  --muted: #6B7390;
  --line: #E4E2D8;
  --line-ink: rgba(255, 255, 255, 0.12);
  --live: #2E9E63;
  --danger: #C2483C;

  --font-sans: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --wrap: 1160px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --shadow-1: 0 1px 2px rgba(12, 18, 34, 0.06), 0 8px 24px rgba(12, 18, 34, 0.07);
  --shadow-2: 0 2px 6px rgba(12, 18, 34, 0.08), 0 24px 64px rgba(12, 18, 34, 0.16);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0; }
button { font: inherit; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 22px; height: 2px;
  background: var(--gold);
}
.band-ink .eyebrow { color: var(--gold); }

.micro {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 2px 0 rgba(12, 18, 34, 0.14), 0 10px 26px rgba(232, 160, 32, 0.35);
}
.btn-gold:hover { background: #F2B23C; }
.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { background: rgba(12, 18, 34, 0.05); }
.band-ink .btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.band-ink .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn-sm { padding: 10px 20px; font-size: 15px; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247, 247, 242, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand img { width: 30px; height: auto; }
.brand .tld { color: var(--gold-deep); font-weight: 700; }
.nav-links { display: flex; gap: 24px; margin-left: 8px; }
.nav-links a {
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--slate);
  padding: 6px 2px;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-spacer { flex: 1; }
.nav-signin {
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
}
.nav-burger {
  display: none;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(40px, 5.2vw, 64px);
  margin: 18px 0 20px;
}
.hero h1 .accent { color: var(--gold-deep); }
.hero-sub {
  font-size: 19px;
  color: var(--slate);
  max-width: 34em;
  margin-bottom: 28px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-derisk {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* slug picker */
.ws-picker {
  margin-top: 30px;
  display: flex;
  max-width: 460px;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-1);
}
.ws-picker input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 14px 0 14px 16px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  outline: none;
}
.ws-picker .suffix {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--muted);
  padding-right: 10px;
}
.ws-picker button {
  border: 0;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  padding: 0 22px;
  cursor: pointer;
}
.ws-picker button:hover { background: var(--ink-3); }
.ws-picker-label {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--muted);
}
.ws-picker-label a { color: var(--gold-deep); font-weight: 600; }

/* ---------- browser-framed screenshot ---------- */
.shot-frame {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.shot-frame .bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #FBFBF8;
}
.shot-frame .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.shot-frame .url {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  background: var(--paper);
  border-radius: 6px;
  padding: 3px 12px;
}
.shot-frame img { width: 100%; height: auto; }
.shot-frame .shot-fallback {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FBF0DA, #EFEEE6);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
}

/* the signature: agent execution receipt */
.hero-visual { position: relative; }
.receipt {
  position: absolute;
  left: -26px;
  bottom: 28px;
  width: min(320px, 82%);
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  padding: 14px 16px;
}
.receipt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
}
.receipt-head img { width: 20px; height: auto; }
.receipt-head .status {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: #7BD9A4;
}
.receipt-line {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}
.tool-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tool-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--line-ink);
  color: #F3D9A6;
}
.receipt-audit {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- ink bands ---------- */
.band-ink {
  background: var(--ink);
  color: #fff;
}
.band-ink h2 { color: #fff; }

/* stats band */
.stats { padding: 42px 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .eyebrow::before { display: none; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); margin-top: 14px; }
.section-head .lede { margin-top: 14px; font-size: 18px; color: var(--slate); }
.band-ink .section-head .lede { color: rgba(255, 255, 255, 0.72); }

/* ---------- lifecycle tabs ---------- */
.tabs-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.tab-btn {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tab-btn .n {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-deep);
}
.tab-btn:hover { color: var(--ink); }
.tab-btn[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--gold);
}
.tab-panel { display: none; }
.tab-panel.is-active {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
  animation: panelIn 0.35s ease;
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.tab-panel h3 { font-size: 26px; margin-bottom: 12px; }
.tab-panel .blurb { color: var(--slate); margin-bottom: 20px; }
.feat-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.feat-list li { display: flex; gap: 10px; align-items: baseline; font-size: 15.5px; }
.feat-list li::before {
  content: '';
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-1px);
}
.feat-list b { font-weight: 700; }
.text-link {
  font-weight: 700;
  color: var(--gold-deep);
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

/* ---------- agent band ---------- */
.agent-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 56px;
  align-items: center;
}
.agent-chat {
  background: var(--ink-2);
  border: 1px solid var(--line-ink);
  border-radius: var(--r-lg);
  padding: 22px;
  display: grid;
  gap: 14px;
  box-shadow: var(--shadow-2);
}
.msg { max-width: 92%; }
.msg .who {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.msg .who img { width: 15px; height: auto; }
.msg .bubble {
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 14.5px;
  line-height: 1.5;
}
.msg-user { justify-self: end; text-align: right; }
.msg-user .who { justify-content: flex-end; }
.msg-user .bubble { background: var(--ink-3); color: #fff; }
.msg-qais .bubble { background: rgba(232, 160, 32, 0.1); border: 1px solid rgba(232, 160, 32, 0.25); color: #F6EFDF; }
.agent-cards { display: grid; gap: 16px; }
.agent-card {
  border: 1px solid var(--line-ink);
  border-radius: var(--r-md);
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.03);
}
.agent-card h4 { font-size: 17px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.agent-card p { font-size: 14.5px; color: rgba(255, 255, 255, 0.7); }
.agent-card .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid rgba(232, 160, 32, 0.4);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---------- breadth grid ---------- */
.areas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.area {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.area:hover { box-shadow: var(--shadow-1); transform: translateY(-2px); }
.area .count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold-deep);
}
.area h4 { font-size: 16.5px; margin: 6px 0 4px; }
.area p { font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* ---------- mobile app section ---------- */
.mobile-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}
.phone-shot {
  width: min(300px, 70%);
  height: auto;
  margin: 0 auto;
  border-radius: 36px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}

/* ---------- video reels ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  max-width: 760px;
  margin: 0 auto;
}
.video-card { margin: 0; }
.video-card video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: var(--ink);
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.video-card figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
}
.video-card figcaption b {
  display: block;
  color: var(--ink);
  font-size: 16px;
}
@media (max-width: 700px) {
  .video-grid { grid-template-columns: 1fr; max-width: 340px; }
}

/* ---------- pricing ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
}
.plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan.is-featured {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), var(--shadow-1);
}
.plan .flag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.plan .name { font-weight: 800; font-size: 18px; }
.plan .price {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 10px;
}
.plan .per { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.plan .blurb { margin: 12px 0 16px; font-size: 14.5px; color: var(--slate); }
.plan ul {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--slate);
}
.plan ul li { display: flex; gap: 8px; align-items: baseline; }
.plan ul li::before { content: '✓'; color: var(--live); font-weight: 700; }
.plan .btn { margin-top: auto; }

/* ---------- trust row ---------- */
.trust-row {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}
.trust-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 34px;
  justify-content: center;
  align-items: center;
}
.trust-items .micro { color: var(--slate); }
.trust-note { text-align: center; margin-top: 12px; font-size: 14px; color: var(--muted); }
.trust-note a { color: var(--gold-deep); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 17px;
  padding: 16px 34px 16px 0;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
  font-size: 24px;
  color: var(--gold-deep);
}
.faq details[open] summary::after { content: '−'; }
.faq .answer { padding: 0 0 18px; color: var(--slate); font-size: 15.5px; max-width: 60em; }

/* ---------- final CTA ---------- */
.final-cta { text-align: center; padding: 96px 0; }
.final-cta h2 { font-size: clamp(32px, 4vw, 52px); }
.final-cta .lede { margin: 16px auto 30px; max-width: 36em; color: rgba(255, 255, 255, 0.72); font-size: 18px; }
.final-cta .ws-picker { margin: 0 auto; border-color: rgba(255, 255, 255, 0.35); }
.final-cta .ws-picker button { background: var(--gold); color: var(--ink); }
.final-cta .ws-picker button:hover { background: #F2B23C; }
.final-cta .hero-derisk { color: rgba(255, 255, 255, 0.5); }

/* ---------- footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 40px;
}
.footer a { color: rgba(255, 255, 255, 0.75); text-decoration: none; font-size: 14.5px; }
.footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-ink);
}
.footer-brand .brand { color: #fff; }
.footer-brand p { margin-top: 12px; font-size: 14px; color: rgba(255, 255, 255, 0.55); max-width: 26em; }
.footer h5 {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tab-panel.is-active { animation: none; }
  .btn, .area { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid, .agent-grid, .mobile-grid { grid-template-columns: 1fr; gap: 40px; }
  .tab-panel.is-active { grid-template-columns: 1fr; gap: 28px; }
  .areas { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .receipt { position: static; width: auto; margin-top: 14px; }
  .hero { padding-top: 48px; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .nav-inner { gap: 16px; }
  .nav .brand .tld { display: none; }
  .nav-links, .nav-signin { display: none; }
  .nav-burger { display: inline-flex; }
  .nav.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 18px 24px 22px;
    gap: 16px;
  }
  .section { padding: 60px 0; }
  .plans { grid-template-columns: 1fr; }
  .areas { grid-template-columns: 1fr; }
  .tabs-nav { gap: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tabs-nav::-webkit-scrollbar { display: none; }
  .tab-btn { flex: none; }
  .ws-picker { flex-wrap: wrap; }
  .ws-picker button { width: 100%; padding: 13px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
