/* ==========================================================================
   Bosswala — shared design tokens & components (landing, privacy, terms)

   Carries over the actual shipped app's "Ink, sharpened" system exactly
   (see bosswala-app/lib/design/{colors,typography,spacing}.dart) rather
   than inventing a separate marketing-site identity: near-black ink,
   crisp white, one deliberate teal accent, Space Grotesk for display
   moments, the platform's own system font for everything else — same
   as the app. Light-only, same as the app itself (it has no dark
   theme), plus one honest respect for prefers-color-scheme so an
   OS-dark visitor doesn't get a flash of glaring white on the rest of
   the web page chrome.
   ========================================================================== */

:root {
  /* Neutrals */
  --background: #FFFFFF;
  --surface: #FFFFFF;
  --surface-alt: #F4F4F5;
  --border: #E4E4E7;
  --text-primary: #09090B;
  --text-secondary: #71717A;
  --text-disabled: #A1A1AA;

  /* Ink (primary buttons — near-black, not accent-colored, same as the app) */
  --ink: #09090B;
  --ink-pressed: #18181B;
  --on-ink: #FFFFFF;
  --ink-shadow: rgba(0, 0, 0, 0.16);

  /* Accent (one brand color — focus, links, small in-context touches) */
  --accent: #0F6E5C;
  --accent-pressed: #0B5548;
  --accent-surface: #E3F3EF;
  --on-accent: #FFFFFF;

  /* Shadows — two-layer, soft elevation rather than a drawn border */
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 24px -8px rgba(0, 0, 0, 0.10);
  --shadow-tight: 0 1px 1px rgba(0, 0, 0, 0.04);

  /* Radius scale — crisp rather than very rounded, matches the app */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 72px;

  color-scheme: light;
}

/* This site is deliberately light-only, matching the shipped app, which
   has no dark theme of its own — see the doc comment above. */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -48px;
  z-index: 100;
  background: var(--ink);
  color: var(--on-ink);
  padding: 10px 18px;
  border-radius: var(--radius-sm, 8px);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--space-md);
}

.display-font {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* -- Layout shell -- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.wrap--narrow {
  max-width: 680px;
}

@media (min-width: 640px) {
  .wrap {
    padding-inline: var(--space-xl);
  }
}

/* -- Brand mark (mirrors the actual app icon: dark rounded tile,
      white "B", teal accent squircle) -- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--text-primary);
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: var(--radius-md);
  background: var(--ink);
  display: grid;
  place-items: center;
}

.brand-mark span {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--on-ink);
  line-height: 1;
  transform: translateY(-0.5px);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 13px;
  height: 13px;
  border-radius: 5px;
  background: var(--accent);
  border: 2px solid var(--background);
}

.brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.4px;
}

/* -- Header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: 14px;
}

.site-nav {
  display: none;
  align-items: center;
  gap: var(--space-lg);
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--text-primary);
}

@media (min-width: 760px) {
  .site-nav {
    display: flex;
  }
}

/* -- Buttons -- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1px;
  padding: 12px 20px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: 0 1px 2px var(--ink-shadow), 0 8px 20px -8px var(--ink-shadow);
}

.btn-primary:hover {
  background: var(--ink-pressed);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--text-disabled);
}

.btn-sm {
  padding: 9px 16px;
  font-size: 14px;
}

/* -- Type -- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--accent);
  background: var(--accent-surface);
  padding: 6px 12px;
  border-radius: 999px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

h1, h2, h3 {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(34px, 5.4vw, 54px);
  line-height: 1.08;
}

h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.4px;
}

h3 {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

p {
  margin: 0;
  color: var(--text-secondary);
}

.lede {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 46ch;
}

/* -- Sections -- */

section {
  padding-block: var(--space-3xl);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-2xl);
}

.section-head p {
  margin-top: var(--space-sm);
}

/* -- Hero -- */

.hero {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-2xl);
}

.hero .wrap {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1.05fr 0.95fr;
  }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

.hero-copy h1 {
  margin-top: var(--space-sm);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.hero-actions a.text-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}

.hero-actions a.text-link:hover {
  color: var(--text-primary);
}

/* -- Phone mock (a real reproduction of the app's own home screen
      copy/layout — see bosswala-app/lib/features/home/home_screen.dart —
      not a generic illustration) -- */

.phone-mock {
  justify-self: center;
  width: 100%;
  max-width: 300px;
  border-radius: 34px;
  background: var(--ink);
  padding: 10px;
  box-shadow: var(--shadow-soft);
}

.phone-mock-screen {
  background: var(--background);
  border-radius: 26px;
  padding: 22px 16px 20px;
  min-height: 460px;
}

.phone-mock-greeting {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.4px;
  margin-bottom: 2px;
}

.phone-mock-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.mock-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-tight);
  margin-bottom: var(--space-md);
  background: var(--surface);
}

.mock-card-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--text-primary);
}

.mock-card p {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.mock-btn {
  display: inline-block;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}

.mock-card--leads .mock-btn {
  background: var(--ink);
}

.mock-lead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
}

.mock-lead-row:first-of-type {
  border-top: none;
}

.mock-lead-name {
  font-weight: 600;
}

.mock-lead-status {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-surface);
  padding: 2px 8px;
  border-radius: 999px;
}

.mock-wa {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-surface);
  display: grid;
  place-items: center;
  flex: none;
}

/* -- Pain points strip -- */

.pain-strip {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pain-grid {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

@media (min-width: 700px) {
  .pain-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pain-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.pain-card q {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  quotes: none;
  margin-bottom: var(--space-sm);
}

.pain-card p {
  font-size: 14px;
}

.pain-answer {
  text-align: center;
  margin-top: var(--space-xl);
  font-size: 17px;
  color: var(--text-primary);
  font-weight: 600;
}

/* -- Feature blocks -- */

.feature {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
  padding-block: var(--space-2xl);
}

.feature:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

@media (min-width: 860px) {
  .feature {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .feature--reverse .feature-visual {
    order: 2;
  }
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-surface);
  display: grid;
  place-items: center;
  margin-bottom: var(--space-md);
}

.feature-copy p {
  margin-top: var(--space-sm);
  font-size: 16px;
  max-width: 48ch;
}

.feature-chip {
  display: inline-block;
  margin-top: var(--space-md);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

.feature-visual {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  padding: var(--space-xl);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -- Worksite geofence illustration -- */

.geofence-illo {
  position: relative;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1;
}

/* -- WhatsApp follow-up illustration (built from mock-card parts) -- */

.wa-illo {
  width: 100%;
  max-width: 280px;
}

/* -- Steps (how it works) -- */

.steps {
  display: grid;
  gap: var(--space-lg);
  counter-reset: step;
  margin-top: var(--space-2xl);
}

@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  position: relative;
  padding-top: var(--space-2xl);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
}

.step h3 {
  margin-bottom: 6px;
}

.step p {
  font-size: 14.5px;
}

/* -- Audience band -- */

.audience {
  background: var(--ink);
  color: var(--on-ink);
}

.audience h2 {
  color: var(--on-ink);
}

.audience .lede {
  color: rgba(255, 255, 255, 0.68);
}

.audience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.audience-tags span {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 7px 14px;
  border-radius: 999px;
}

/* -- Contact / CTA band -- */

.cta-band {
  text-align: center;
}

.cta-band .wrap--narrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.cta-band .lede {
  text-align: center;
}

/* -- Footer -- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-xl);
}

.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

@media (min-width: 700px) {
  .site-footer .wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer-links a {
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-meta {
  font-size: 13px;
  color: var(--text-disabled);
}

/* ==========================================================================
   Legal pages (privacy.html, terms.html) — utilitarian document treatment:
   same tokens/header/footer as the landing page, but the body is set for
   reading, not for scanning: one narrow column, a real heading hierarchy,
   generous spacing.
   ========================================================================== */

.legal-header {
  padding-block: var(--space-2xl) var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.legal-header .eyebrow {
  margin-bottom: var(--space-md);
}

.legal-meta {
  margin-top: var(--space-sm);
  font-size: 14px;
  color: var(--text-secondary);
}

.legal-body {
  padding-block: var(--space-2xl) var(--space-3xl);
}

.legal-body h2 {
  font-size: 21px;
  letter-spacing: -0.3px;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-sm);
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p,
.legal-body li {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-primary);
}

.legal-body p {
  margin-bottom: var(--space-md);
}

.legal-body ul {
  margin: 0 0 var(--space-md);
  padding-left: 1.3em;
}

.legal-body li {
  margin-bottom: var(--space-sm);
}

.legal-body li:last-child {
  margin-bottom: 0;
}

.legal-body strong {
  color: var(--text-primary);
}

.legal-body a {
  font-weight: 500;
}

.legal-toc {
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
}

.legal-toc p {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.2em;
  columns: 2;
  column-gap: var(--space-lg);
}

.legal-toc li {
  font-size: 13.5px;
  margin-bottom: 6px;
  break-inside: avoid;
}

.legal-toc a {
  color: var(--text-primary);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--accent);
}

.tbd {
  background: var(--accent-surface);
  color: var(--accent-pressed);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .legal-toc ol {
    columns: 1;
  }
}
