/* ============================================================
   Bos AI Solutions — shared styles
   Brand theme: cactus-circuit green ("Crew Intelligence & Operating
   Systems"). Edit the tokens below to re-theme the whole site +
   dashboard in one place.
   ============================================================ */

:root {
  /* Neutrals (cool sage-gray scale, green-tinted) */
  --c-bg:        #f3f7f4;   /* page background */
  --c-surface:   #ffffff;   /* cards / panels */
  --c-surface-2: #eaf1ec;   /* subtle fills */
  --c-border:    #dce6df;
  --c-border-2:  #c5d4ca;

  /* Text */
  --c-ink:       #0f2a1d;   /* headings */
  --c-text:      #2c3f33;   /* body */
  --c-muted:     #5e7468;   /* secondary text */
  --c-faint:     #8a9c91;

  /* Accent (forest green, matching the brand mark) */
  --c-accent:      #1f5e3d;
  --c-accent-700:  #163f29;
  --c-accent-soft: #e3f1e7;
  --c-accent-2:    #4f9468;  /* lighter green for gradients */

  /* Status colors */
  --s-new:       #2563eb;
  --s-contacted: #7c3aed;
  --s-qualified: #0891b2;
  --s-won:       #1f5e3d;
  --s-lost:      #9aa3af;

  /* Shape & depth */
  --radius:    14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 42, 29, .07), 0 1px 1px rgba(15, 42, 29, .05);
  --shadow:    0 6px 20px rgba(15, 42, 29, .09), 0 2px 6px rgba(15, 42, 29, .06);
  --shadow-lg: 0 18px 50px rgba(15, 42, 29, .15);

  /* Layout */
  --maxw: 1120px;
  --space: 22px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  color: var(--c-ink);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  font-weight: 700;
}

p { margin: 0 0 1em; }

a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-accent-700); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-muted);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .15s ease,
              background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--c-accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--c-accent-700); color: #fff; }

.btn-ghost {
  background: var(--c-surface);
  color: var(--c-ink);
  border-color: var(--c-border-2);
}
.btn-ghost:hover { background: var(--c-surface-2); }

.btn-sm { padding: 8px 14px; font-size: .85rem; }

/* ---------- Top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 247, 244, .8);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--c-ink);
  letter-spacing: -0.02em;
}
.brand .logo-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--c-accent), var(--c-accent-2));
  color: #fff;
  display: grid; place-items: center;
  font-size: .85rem; font-weight: 800;
  overflow: hidden;
}
.brand .logo-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }

.brand-logo img {
  height: 56px;
  width: auto;
  display: block;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  color: var(--c-muted);
  font-size: .92rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--c-accent);
  border-radius: var(--radius-pill);
  transition: right .2s ease;
}
.nav-links a:hover { color: var(--c-ink); }
.nav-links a.active { color: var(--c-ink); }
.nav-links a.active::after { right: 0; }

/* ---------- Hero ---------- */
.hero {
  padding: 104px 0 92px;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 50% 0%, #14402b 0%, rgba(20,64,43,0) 60%),
    linear-gradient(180deg, #0a1f15 0%, #08160f 100%);
  border-bottom: 1px solid rgba(79,148,104,.25);
}
/* Motherboard circuit traces — glowing brand-green on the dark hero */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%234f9468' stroke-width='1.3' stroke-opacity='0.55'%3E%3Cpath d='M16 24h40v32h36M56 24v-16M92 56v28h44M136 84h16M92 84v40M20 96h28v40M48 116h40M120 16v28h28M148 44v40M16 60v44h24'/%3E%3Cg fill='%2358c98a' stroke='none'%3E%3Ccircle cx='16' cy='24' r='3'/%3E%3Ccircle cx='56' cy='56' r='3'/%3E%3Ccircle cx='92' cy='56' r='3'/%3E%3Ccircle cx='136' cy='84' r='3'/%3E%3Ccircle cx='92' cy='124' r='3'/%3E%3Ccircle cx='48' cy='116' r='3'/%3E%3Ccircle cx='120' cy='44' r='3'/%3E%3Ccircle cx='148' cy='44' r='3'/%3E%3C/g%3E%3Crect x='66' y='66' width='24' height='24' rx='3' stroke='%234f9468' stroke-opacity='0.45'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 300px 300px;
  background-repeat: repeat;
  opacity: .35;
  mask-image: radial-gradient(75% 75% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(75% 75% at 50% 40%, #000 30%, transparent 100%);
  animation: circuit-pulse 6s ease-in-out infinite;
}
/* Soft glow bloom behind the headline */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(40% 36% at 50% 38%, rgba(88,201,138,.22) 0%, rgba(88,201,138,0) 70%);
  pointer-events: none;
}
@keyframes circuit-pulse {
  0%, 100% { opacity: .28; }
  50%      { opacity: .42; }
}
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow {
  color: #7fdcab;
  background: rgba(127,220,171,.10);
  border-color: rgba(127,220,171,.35);
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  max-width: 18ch;
  margin: 0 auto .5em;
  color: #ffffff;
  text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.hero .lead {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: #cfe3d7;
  max-width: 58ch;
  margin: 0 auto 28px;
  /* Reset the dashboard .lead card styling so it doesn't paint a white box here */
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.hero .lead strong { color: #ffffff; font-weight: 700; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
/* On the dark hero, make the ghost button readable */
.hero .btn-ghost {
  color: #eafff3;
  border-color: rgba(127,220,171,.5);
  background: rgba(255,255,255,.04);
}
.hero .btn-ghost:hover {
  border-color: #7fdcab;
  background: rgba(127,220,171,.12);
  color: #ffffff;
}

/* ---------- Sections ---------- */
.section { padding: 78px 0; }
.section-head { max-width: 60ch; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.section-head p { color: var(--c-muted); font-size: 1.08rem; margin: 0; }

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

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--c-border-2); }

/* ---------- How-it-works flow ---------- */
.flow {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 48px;
  flex-wrap: wrap;
  justify-content: center;
}
.flow-step {
  flex: 1;
  min-width: 180px;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 20px 18px;
  text-align: left;
}
.flow-num {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--c-accent); color: #fff;
  font-size: .85rem; font-weight: 700;
  margin-bottom: 12px;
}
.flow-step h4 { font-size: 1rem; margin-bottom: 4px; }
.flow-step p { color: var(--c-muted); font-size: .9rem; margin: 0; }
.flow-arrow {
  align-self: center;
  color: var(--c-faint);
  font-size: 1.5rem;
  font-weight: 700;
}
@media (max-width: 860px) {
  .flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); align-self: center; }
}

.feature .ico {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.feature h3 { font-size: 1.12rem; }
.feature p { color: var(--c-muted); margin: 0; font-size: .97rem; }

/* ---------- Portfolio cards ---------- */
.portfolio-card { display: flex; flex-direction: column; }
.portfolio-card.linked { cursor: pointer; }
.portfolio-card.linked:hover .pf-top { filter: brightness(1.08); }
.pf-link { white-space: nowrap; }
.portfolio-card .pf-top {
  height: 120px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #eef1f5, #dfe4ea);
  display: grid; place-items: center;
  color: var(--c-faint);
  font-weight: 700; letter-spacing: .04em;
  margin-bottom: 18px;
  border: 1px solid var(--c-border);
}
.portfolio-card.active .pf-top {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
  color: #fff;
}
.portfolio-card .pf-top.has-img { padding: 0; overflow: hidden; background: var(--c-surface-2); }
.portfolio-card .pf-top.has-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* Logo treatment: centered on a clean white backdrop with padding. */
.portfolio-card .pf-top.has-logo {
  background: #ffffff;
  padding: 18px 24px;
}
.portfolio-card .pf-top.has-logo img {
  max-width: 78%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; display: block;
}
.portfolio-card h3 { font-size: 1.18rem; margin-bottom: 6px; }
.portfolio-card p { color: var(--c-muted); font-size: .97rem; flex: 1; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--radius-pill);
}
.badge-active { background: #e7f6ec; color: var(--s-won); }
.badge-soon   { background: var(--c-surface-2); color: var(--c-muted); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pf-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }

/* ---------- Contact form ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.form-card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .86rem; font-weight: 600; color: var(--c-ink); margin-bottom: 6px; }
.field input, .field textarea, select {
  width: 100%;
  font: inherit;
  color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-border-2);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, select:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(31, 94, 61, .15);
}
.form-note { font-size: .82rem; color: var(--c-faint); margin: 4px 0 0; }
.form-success {
  display: none;
  background: #e7f6ec; border: 1px solid #b7e3c4; color: #15803d;
  padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 500;
}
.form-success.show { display: block; }
.field-error { color: #dc2626; font-size: .8rem; margin-top: 5px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: #dc2626; }
.field.invalid .field-error { display: block; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--c-border); padding: 40px 0; color: var(--c-muted); font-size: .9rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   Leads dashboard specific
   ============================================================ */
.dash-header { background: var(--c-surface); border-bottom: 1px solid var(--c-border); padding: 22px 0; }
.dash-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash-title { display: flex; flex-direction: column; }
.dash-title small { color: var(--c-muted); font-weight: 500; }

.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); padding: 12px 18px; min-width: 92px;
  box-shadow: var(--shadow-sm);
}
.stat .num { font-size: 1.5rem; font-weight: 800; color: var(--c-ink); line-height: 1; }
.stat .lbl { font-size: .76rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .05em; }

.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 26px 0; }
.toolbar .search { flex: 1; min-width: 200px; }
.toolbar select, .toolbar .search input { max-width: 100%; }
.spacer { flex: 1; }

.lead-list { display: grid; gap: 14px; }
.lead {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
}
.lead-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.lead-name { font-size: 1.08rem; font-weight: 700; color: var(--c-ink); }
.lead-sub { font-size: .9rem; color: var(--c-muted); margin-top: 2px; }
.lead-sub a { color: var(--c-accent); }
.lead-date { font-size: .8rem; color: var(--c-faint); white-space: nowrap; }
.lead-msg { margin: 14px 0; color: var(--c-text); font-size: .95rem; background: var(--c-surface-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.lead-controls { display: grid; grid-template-columns: 180px 1fr auto; gap: 12px; align-items: center; }
.lead-controls textarea { min-height: 40px; resize: vertical; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 700; padding: 4px 10px;
  border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: .04em;
}
.status-New { background: #e8efff; color: var(--s-new); }
.status-Contacted { background: #f1e9ff; color: var(--s-contacted); }
.status-Qualified { background: #e2f6fa; color: var(--s-qualified); }
.status-Won { background: #e7f6ec; color: var(--s-won); }
.status-Lost { background: var(--c-surface-2); color: var(--s-lost); }

.empty {
  text-align: center; padding: 70px 24px; color: var(--c-muted);
  border: 1px dashed var(--c-border-2); border-radius: var(--radius); background: var(--c-surface);
}
.empty h3 { color: var(--c-ink); }
.icon-btn {
  border: 1px solid var(--c-border-2); background: var(--c-surface); color: var(--c-muted);
  border-radius: var(--radius-sm); padding: 8px 12px; cursor: pointer; font: inherit; font-size: .85rem;
}
.icon-btn:hover { background: #fff0f0; color: #dc2626; border-color: #f3c2c2; }

/* ---------- Footer brand ---------- */
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 26px; width: auto; opacity: .85; }

/* ---------- Scroll-reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; gap: 28px; }
  .nav-links { display: none; }
  .lead-controls { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}

/* ===================== FAQ ===================== */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}
.faq-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius, 12px);
  margin-bottom: 12px;
  padding: 4px 20px;
  transition: border-color 0.2s;
}
.faq-item[open] {
  border-color: var(--c-border-2);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--c-ink);
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--c-accent);
  margin-left: 16px;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: "\2212"; /* minus */
}
.faq-item p {
  color: var(--c-text);
  padding: 0 0 18px;
  margin: 0;
  line-height: 1.6;
}
