/* VOXN8 CRM page only (loaded through page meta "css": "crm"). Shared components live in styles.css.
   Parts: hero · at a glance · inbox · coexistence · module grid · feature rows (add-ons) · calling blocks ·
   messaging/flows/AI · sales flow · team tree · add-ons · how to start · FAQ */

.crm-lead { max-width: 31em; }
.crm-shot { margin: 0; min-width: 0; }

/* ---------- hero ---------- */
.crm-btn-free { border-color: var(--accent-line); color: var(--accent); }
.crm-btn-free:hover { background: var(--accent-soft); }
.crm-hero__site {
  margin-top: 1.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; color: var(--mute);
}
.crm-hero__site .badge { color: var(--live); border-color: rgba(61, 220, 151, .35); }

/* ---------- at a glance (spec bar under the hero) ---------- */
.crm-glance { background: var(--panel); border-bottom: 1px solid var(--line); }
.crm-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.crm-facts__item { min-width: 0; padding: 1.1rem 0 1.2rem 1.1rem; border-left: 1px solid var(--line); }
.crm-facts__item:nth-child(odd) { padding-left: 0; border-left: 0; }
.crm-facts__item:nth-child(n + 3) { border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .crm-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .crm-facts__item, .crm-facts__item:nth-child(odd) { padding: 1.5rem 0 1.55rem 1.6rem; border-left: 1px solid var(--line); }
  .crm-facts__item:first-child { padding-left: 0; border-left: 0; }
  .crm-facts__item:nth-child(n + 3) { border-top: 0; }
}
.crm-facts dt {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--mute);
}
.crm-facts dt::before { content: ""; width: 6px; height: 6px; flex: none; background: var(--accent); transform: rotate(45deg); }
.crm-facts dd { margin: .55rem 0 0; font-family: var(--font-mono); font-size: clamp(.86rem, .25vw + .8rem, 1rem); line-height: 1.4; color: var(--bone); }

/* ---------- 01 inbox ---------- */
.crm-inbox__points { margin-top: clamp(2rem, 4vw, 3rem); }

/* ---------- 02 coexistence: app · number · CRM ---------- */
.crm-coexist { --link: 2.75rem; list-style: none; display: grid; gap: var(--link); }
.crm-node {
  position: relative; display: grid; gap: .55rem; justify-items: center; align-content: center; text-align: center;
  padding: clamp(1.4rem, 2.4vw, 2.1rem) clamp(1.1rem, 2vw, 1.75rem);
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--panel);
}
.crm-node--hub {
  border-color: var(--accent-line);
  background: radial-gradient(120% 90% at 50% 0%, rgba(245, 165, 36, .14), transparent 62%), var(--panel);
  box-shadow: 0 0 0 4px rgba(245, 165, 36, .07), 0 30px 80px -40px rgba(245, 165, 36, .55);
}
.crm-node__kicker { font-family: var(--font-mono); font-weight: 500; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.crm-node__title { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.2; color: var(--bone); }
.crm-node__text { max-width: 22em; font-size: .95rem; color: var(--mute); }
/* connectors (vertical on phones, horizontal from 900px) with one packet each, running out from the number */
.crm-node + .crm-node::before {
  content: ""; position: absolute; left: 50%; top: calc(-1 * var(--link) - 1px); height: var(--link);
  border-left: 1px dashed var(--accent-line);
}
.crm-node + .crm-node::after {
  content: ""; position: absolute; left: 50%; top: calc(-1 * var(--link) - 1px); width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px rgba(245, 165, 36, .9);
}
/* the packets run once the diagram is on screen, two passes (4.8 s), then rest at the start of their link */
.crm-coexist:not(.is-pending) .crm-node + .crm-node::after { animation: crm-packet-y 2.4s var(--ease) 2; }
.crm-coexist:not(.is-pending) .crm-node--hub::after { animation-direction: reverse; }
@media (prefers-reduced-motion: reduce) { .crm-node + .crm-node::after { display: none; } }
@keyframes crm-packet-y {
  0% { transform: translateY(0); opacity: 0; }
  20%, 80% { opacity: 1; }
  100% { transform: translateY(calc(var(--link) - 6px)); opacity: 0; }
}
@keyframes crm-packet-x {
  0% { transform: translateX(0); opacity: 0; }
  20%, 80% { opacity: 1; }
  100% { transform: translateX(calc(var(--link) - 6px)); opacity: 0; }
}
@media (min-width: 900px) {
  .crm-coexist { --link: clamp(2.5rem, 4.5vw, 4.5rem); grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .crm-node + .crm-node::before { left: calc(-1 * var(--link) - 1px); top: 50%; width: var(--link); height: 0; border-left: 0; border-top: 1px dashed var(--accent-line); }
  .crm-node + .crm-node::after { left: calc(-1 * var(--link) - 1px); top: 50%; margin: -3px 0 0; animation-name: crm-packet-x; }
}
.crm-number__foot {
  margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: clamp(1.5rem, 3vw, 2.25rem); border-top: 1px solid var(--line);
  display: grid; gap: 1.25rem 2.5rem; align-items: center;
}
@media (min-width: 960px) { .crm-number__foot { grid-template-columns: auto minmax(0, 1fr) auto; } }
.crm-number__setup { display: flex; align-items: center; gap: 1rem; }
.crm-number__n { font-family: var(--font-display); font-size: clamp(2.6rem, 4.4vw, 3.6rem); line-height: 1; color: var(--accent); }
.crm-number__unit { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; line-height: 1.6; color: var(--mute); }
.crm-number__text { max-width: 34em; color: var(--mute); }

/* ---------- 03 module grid (hairline grid; 1px gaps show the lines) ---------- */
.crm-mods {
  list-style: none; display: grid; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden;
}
@media (min-width: 700px) { .crm-mods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .crm-mods { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.crm-mod {
  position: relative; min-width: 0; display: flex; flex-direction: column; gap: .85rem;
  padding: clamp(1.4rem, 2.3vw, 2rem); background: var(--panel);
  transition: background-color .3s var(--ease);
}
.crm-mod::before { /* amber scan line on hover */
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--accent), transparent); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.crm-mod:hover { background: var(--panel-2); }
.crm-mod:hover::before { transform: scaleX(1); }
.crm-mod__num { font-family: var(--font-dot); font-weight: 800; font-size: .9rem; letter-spacing: .14em; color: var(--accent); }
.crm-mod__title { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.2; color: var(--bone); }
.crm-mod__tag { margin-top: 1rem; }
/* wider screens: always open, the summary is just the heading; phones: a tap opens the group (main.js, details[data-fold]) */
.crm-mod__fold { flex: 1; }
.crm-mod__head { display: grid; gap: .85rem; list-style: none; cursor: default; }
.crm-mod__head::-webkit-details-marker { display: none; }
.crm-mod__fold .crm-list { margin-top: .85rem; }
.crm-mod__icon { display: none; }
@media (max-width: 699.98px) {
  .crm-mod { padding-block: 0; }
  .crm-mod__head { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem; min-height: 56px; padding-block: .9rem; cursor: pointer; }
  .crm-mod__head:focus-visible { outline-offset: -2px; }
  .crm-mod__icon { display: block; position: relative; width: 14px; height: 14px; transition: transform .3s var(--ease); }
  .crm-mod__icon::before, .crm-mod__icon::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1.5px; margin-top: -.75px; background: var(--accent); }
  .crm-mod__icon::after { transform: rotate(90deg); }
  .crm-mod__fold[open] .crm-mod__icon { transform: rotate(135deg); }
  .crm-mod__fold .crm-list { margin: 0 0 1.3rem; }
  .crm-mod__fold .crm-mod__tag { margin: -.4rem 0 1.3rem; }
}

/* bullet list used by the module grid and the terminal cards */
.crm-list { list-style: none; display: grid; gap: .5rem; }
.crm-list li { position: relative; padding-left: 1.2rem; font-size: .95rem; line-height: 1.5; color: var(--mute); }
.crm-list li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px;
  border: 1.5px solid var(--accent); transform: rotate(45deg);
}

/* ---------- feature rows: screenshot beside text (add-ons) ---------- */
.crm-row { display: grid; gap: 1.5rem; grid-template-areas: "head" "media" "body"; }
.crm-row + .crm-row { margin-top: clamp(3.5rem, 7vw, 6.5rem); }
.crm-row__head { grid-area: head; display: grid; gap: .75rem; align-content: start; }
.crm-row__media { grid-area: media; }
.crm-row__body { grid-area: body; min-width: 0; }
.crm-row__kicker { font-family: var(--font-mono); font-weight: 500; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.crm-row__title { font-family: var(--font-display); font-size: clamp(1.25rem, 1vw + 1rem, 1.8rem); line-height: 1.2; max-width: 18em; }
.crm-row__text { max-width: 30em; font-size: var(--fs-lead); line-height: 1.55; color: var(--mute); }
.crm-row__body > .chips { margin-top: 1.4rem; }
@media (min-width: 1024px) {
  .crm-row {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas: ". media" "head media" "body media" ". media";
    column-gap: clamp(2.5rem, 4.5vw, 5rem); row-gap: 1.6rem;
  }
  .crm-row--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "media ." "media head" "media body" "media ."; }
}
@media (min-width: 1024px) {
  .crm-row--wide { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .crm-row--wide.crm-row--flip { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
}

/* ---------- 04 calling: full-width screenshot blocks with points below ---------- */
.crm-feat + .crm-feat { margin-top: clamp(4rem, 8vw, 7rem); }
.crm-feat__head { display: grid; gap: .75rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.crm-feat__points { margin-top: clamp(1.75rem, 3.5vw, 2.75rem); }
.crm-feat__also { margin-top: 1.6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.1rem; }
.crm-feat__also-label { font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--mute); }

/* ---------- 05 messaging, flows, AI ---------- */
.crm-rules__grid { list-style: none; }
.crm-term .term__body { gap: 1.1rem; }
.crm-term--ai { border-color: var(--accent-line); }
.crm-term--ai .term__bar { background: linear-gradient(90deg, rgba(245, 165, 36, .12), transparent 70%), var(--panel-2); }

/* ---------- 06 sales flow ---------- */
.crm-flow { grid-auto-columns: minmax(10.5rem, 1fr); }
@media (min-width: 1200px) { .crm-flow { grid-auto-columns: minmax(0, 1fr); } }
.crm-flow__sub { margin-top: -.4rem; font-size: .84rem; line-height: 1.45; color: var(--mute); }
.crm-sales__links { margin-top: clamp(1.75rem, 3vw, 2.5rem); display: flex; flex-wrap: wrap; gap: .5rem 2.5rem; }

/* ---------- 07 team: department tree ---------- */
.crm-team__grid { display: grid; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
@media (min-width: 1024px) { .crm-team__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; } }
.crm-tree { margin: 0; }
.crm-tree__body { display: flex; flex-direction: column; align-items: center; padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1rem, 2.5vw, 2rem) clamp(1.4rem, 2.5vw, 2rem); }
.crm-tree__node, .crm-tree__agent {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: .4rem 1.15rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--ink);
  font-family: var(--font-mono); font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--bone);
}
.crm-tree__node--owner { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.crm-tree__dept {
  position: relative; width: 100%; margin-top: 2.2rem; padding: 2rem .75rem 1.4rem;
  border: 1px dashed var(--line-strong); border-radius: var(--r-card);
  display: flex; flex-direction: column; align-items: center;
}
.crm-tree__dept::before { /* owner down to leader */
  content: ""; position: absolute; left: 50%; top: calc(-2.2rem - 1px); height: calc(4.2rem + 1px); border-left: 1px solid var(--accent-line);
}
.crm-tree__dept-label {
  position: absolute; left: 1rem; top: 0; transform: translateY(-50%); padding: 0 .55rem; background: var(--panel);
  font-family: var(--font-mono); font-weight: 500; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--mute);
}
.crm-tree__dept .crm-tree__node { z-index: 1; }
.crm-tree__agents { position: relative; display: flex; justify-content: center; gap: .6rem; width: 100%; margin-top: 2.2rem; }
.crm-tree__agents::before { /* leader down to the bus */
  content: ""; position: absolute; left: 50%; top: -2.2rem; height: 1.1rem; border-left: 1px solid var(--line-strong);
}
.crm-tree__agent { padding-inline: .8rem; letter-spacing: .12em; }
.crm-tree__agent::before { content: ""; position: absolute; left: 50%; bottom: 100%; height: 1.1rem; border-left: 1px solid var(--line-strong); }
.crm-tree__agent::after { content: ""; position: absolute; left: -.3rem; right: -.3rem; bottom: calc(100% + 1.1rem); border-top: 1px solid var(--line-strong); }
.crm-tree__agent:first-child::after { left: 50%; }
.crm-tree__agent:last-child::after { right: 50%; }
/* round-robin: each agent lights once in turn when the card comes into view (5 s in all), then the tree rests */
.crm-tree:not(.is-pending) .crm-tree__agent { animation: crm-rr 3s 1; }
.crm-tree:not(.is-pending) .crm-tree__agent:nth-child(2) { animation-delay: 1s; }
.crm-tree:not(.is-pending) .crm-tree__agent:nth-child(3) { animation-delay: 2s; }
@keyframes crm-rr {
  0%, 30% { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 18px rgba(245, 165, 36, .35); }
  36%, 100% { border-color: var(--line-strong); color: var(--bone); box-shadow: none; }
}
.crm-tree__rr {
  margin-top: 1.5rem; display: inline-flex; align-items: center; gap: .65rem;
  font-family: var(--font-mono); font-size: .68rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
}
.crm-tree__rr::before {
  content: ""; width: 12px; height: 12px; flex: none; border-radius: 50%;
  border: 1.5px solid currentColor; border-right-color: transparent;
}
.crm-tree:not(.is-pending) .crm-tree__rr::before { animation: crm-spin 2.4s linear 2; }
@keyframes crm-spin { to { transform: rotate(360deg); } }
.crm-tree__cap { padding: 1rem 1.25rem 1.15rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--mute); }

/* ---------- 08 add-ons ---------- */
.crm-addons__more { list-style: none; margin-top: clamp(3rem, 6vw, 5rem); }

/* ---------- 09 how to start ---------- */
.crm-start__cta { margin-top: clamp(2rem, 4vw, 3rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.crm-start__site { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; color: var(--mute); }

/* ---------- 10 FAQ ---------- */
.crm-faq__lead { margin-top: 1.4rem; }
.crm-faq__ask { margin-top: 1.25rem; }
