/*
 * safarcrm.com — marketing site styles.
 * Colour, type, spacing and radius all come from tokens.css, which is a copy of
 * the app's src/styles/tokens.css (the deploy workflow refreshes it on every
 * publish, so the site and the app can never drift apart).
 *
 * Browser floor matches the app: iOS 14.5+, Chrome 87+. No :has(), no
 * container queries. Mobile-first; one breakpoint at 860px.
 */

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

body {
  margin: 0;
  background: var(--surface-base);
  color: var(--ink-strong);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
p { margin: 0; }
img, svg { max-width: 100%; }

a { color: var(--brand-text); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 760px; }

/* Off-screen until tabbed to, then shown over the page. */
.skip {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip:focus {
  position: fixed;
  top: 12px; left: 12px;
  width: auto; height: auto;
  margin: 0; padding: 10px 16px;
  overflow: visible;
  clip: auto;
  z-index: 50;
  background: var(--brand);
  color: var(--on-brand);
  border-radius: var(--radius-md);
  font-weight: 700;
}

/* ── Nav ─────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface-base);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.nav-links { display: none; gap: 28px; align-items: center; }
.nav-links a { color: var(--ink-muted); font-size: 14px; font-weight: 700; }
.nav-links a:hover { color: var(--ink-strong); }

.lockup { display: inline-flex; align-items: center; gap: 10px; }
.wordmark { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink-strong); }
.wordmark span { font-weight: 500; color: var(--brand-text); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.btn-secondary { background: var(--surface-raised); color: var(--ink-strong); border-color: var(--border-strong); }
.btn-ghost { min-height: 44px; padding: 0 14px; background: transparent; color: var(--brand-text); }
@media (hover: hover) {
  .btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
  .btn-secondary:hover { background: var(--brand-tint); }
}

/* ── Section scaffolding ─────────────────────────────────────────── */
section { padding-block: 56px; }
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 10px;
}
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; }
.section-head h2 { font-size: 28px; }
.section-head p { color: var(--ink-muted); max-width: 60ch; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero { padding-block: 48px 56px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-tint);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero h1 { font-size: 34px; margin-block: 22px 18px; }
.hero .quoted { color: var(--brand-text); }
.hero-sub { font-size: 17px; color: var(--ink-muted); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--ink-muted); }

.hero-demo {
  margin-top: 40px;
  min-width: 0;
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.demo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.demo-label { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
}
.pill-confirmed { background: var(--status-confirmed-tint); color: var(--status-confirmed); }
.demo-arrow { color: var(--ink-muted); font-size: 13px; font-weight: 700; margin-block: 14px; }
.bubble {
  background: var(--brand-tint);
  color: var(--ink-strong);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
  padding: 14px 16px;
  font-size: 14px;
  max-width: 46ch;
}
.bubble-meta { margin-top: 10px; font-size: 12px; color: var(--ink-muted); }

/* ── Alternating bands ───────────────────────────────────────────── */
.band { background: var(--surface-sunken); }

/* ── Split sections (copy beside a product illustration) ─────────── */
.split { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
.split-copy { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.split-copy h2 { font-size: 26px; margin-bottom: 4px; }
.split-copy p { font-size: 15px; color: var(--ink-muted); max-width: 56ch; }

/* ── Product illustrations ───────────────────────────────────────── */
.ui-card {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-ui { margin-top: 36px; }
.ui-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ui-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.ui-title { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; margin-top: 3px; }
.ui-meta { font-size: 13px; color: var(--ink-muted); }
.ref { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }

.meter { height: 8px; border-radius: var(--radius-pill); background: var(--surface-sunken); overflow: hidden; }
.meter span { display: block; height: 8px; border-radius: var(--radius-pill); background: var(--accent-fill); }

.ui-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ui-stat { display: flex; flex-direction: column; gap: 3px; padding: 12px; background: var(--surface-base); border-radius: var(--radius-md); min-width: 0; }
.ui-stat .n { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ui-stat .n.accent { color: var(--accent-text); }
.ui-stat .l { font-size: 11px; color: var(--ink-muted); line-height: 1.3; }

.ui-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ui-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 9px 0; border-bottom: 1px solid var(--border-subtle); }
.ui-list li:last-child { border-bottom: 0; }
.ui-list .v { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot.ok { background: var(--status-confirmed); }
.dot.warn { background: var(--accent-fill); }
.dot.idle { background: var(--border-strong); }
.ui-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 4px; }

.ui-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ui-rows li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border-subtle); }
.ui-rows li:last-child { border-bottom: 0; }
.av {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--brand); color: var(--on-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.who { display: flex; flex-direction: column; min-width: 0; }
.who b { font-size: 14px; font-weight: 700; }
.who small { font-size: 12px; color: var(--ink-muted); }
.ui-rows .pill { margin-left: auto; flex-shrink: 0; }
.pill-pending { background: var(--accent-tint); color: var(--accent-text); }

/* ── Three-up ────────────────────────────────────────────────────── */
.trio { display: grid; grid-template-columns: 1fr; gap: 16px; }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  min-width: 0;
}
.card h3 { font-size: 17px; margin-bottom: 10px; }
.card p { font-size: 14px; color: var(--ink-muted); }
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--brand-tint);
  color: var(--brand-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* ── Features ────────────────────────────────────────────────────── */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature-num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-text);
  padding-top: 3px;
}
.feature-body { min-width: 0; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { font-size: 14px; color: var(--ink-muted); }
.tag {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.tag-live { background: var(--status-confirmed-tint); color: var(--status-confirmed); }
.tag-next { background: var(--surface-sunken); color: var(--ink-muted); }
.roadmap-note {
  margin-top: 28px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent-fill);
  background: var(--accent-tint);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 14px;
  color: var(--accent-text);
}

/* ── Halal band ──────────────────────────────────────────────────── */
.halal { background: var(--brand); color: var(--on-brand); }
.halal h2 { font-size: 26px; margin-bottom: 16px; }
.halal p { color: var(--on-brand-muted); max-width: 62ch; }
.halal-mark {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* ── Pricing ─────────────────────────────────────────────────────── */
.tiers { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.tier {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tier-popular { border: 2px solid var(--brand); }
.tier-name { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); }
.tier-popular .tier-name { color: var(--brand-text); }
.tier-price { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.tier-price span { font-size: 14px; font-weight: 500; color: var(--ink-muted); letter-spacing: 0; }
.tier-cap { font-size: 14px; font-weight: 700; }
.tier .btn { margin-top: auto; }
.tier ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.tier li { font-size: 14px; color: var(--ink-muted); padding-left: 22px; position: relative; }
.tier li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--status-confirmed);
  border-bottom: 2px solid var(--status-confirmed);
  transform: rotate(-45deg);
}
.tier li.soon { color: var(--ink-muted); }
.tier li.soon::before { border-color: var(--border-strong); }
.pricing-note { margin-top: 24px; font-size: 13px; color: var(--ink-muted); max-width: 70ch; }

/* ── Data / trust ────────────────────────────────────────────────── */
.trust { background: var(--surface-sunken); }
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* ── Final CTA ───────────────────────────────────────────────────── */
.cta { text-align: center; }
.cta h2 { font-size: 26px; margin-bottom: 14px; }
.cta p { color: var(--ink-muted); max-width: 54ch; margin-inline: auto; }
.cta .hero-actions { justify-content: center; }

/* ── Footer ──────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border-subtle);
  padding-block: 32px 40px;
  font-size: 13px;
  color: var(--ink-muted);
}
.foot-inner { display: flex; flex-direction: column; gap: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-links a { color: var(--ink-muted); font-weight: 700; }
.foot-links a:hover { color: var(--ink-strong); }

/* ── Wider screens ───────────────────────────────────────────────── */
@media (min-width: 860px) {
  section { padding-block: 80px; }
  .nav-links { display: flex; }
  .hero { padding-block: 72px 80px; }
  .hero h1 { font-size: 44px; }
  .hero-sub { font-size: 18px; }
  .section-head h2 { font-size: 36px; }
  .halal h2 { font-size: 32px; }
  .cta h2 { font-size: 34px; }
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .features-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
  .foot-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
  .split-copy h2 { font-size: 32px; }
  .split-reverse .split-copy { order: 2; }
  .ui-card { padding: 24px; }
}

@media (min-width: 640px) and (max-width: 859px) {
  .card-grid, .trio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The hero reads as one column until there is room for the demo beside it. */
@media (min-width: 1024px) {
  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
  }
  .hero-copy { min-width: 0; }
  .hero h1 { font-size: 46px; }
  .hero-demo { margin-top: 0; }
  .bubble { max-width: none; }
}
