/* ==========================================================================
   Abide CRM — marketing site
   Palette is the logo's own: signal red + charcoal. Light surfaces, one dark band.
   Display type is Archivo set wide and heavy to echo the wordmark.
   ========================================================================== */

:root {
  --ink:       #202226;
  --ink-soft:  #4B4E57;
  --grey:      #6B6E76;
  --paper:     #FFFFFF;
  --mist:      #F4F4F2;
  --line:      #E3E3E0;
  --red:       #CB0E2D;
  --red-deep:  #A50B24;
  --red-tint:  #FBE9EC;

  --display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --body:    "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

  --radius:  10px;   /* surfaces that hold content */
  --radius-s: 5px;   /* controls */
  --wrap: 1160px;
}

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

/* The header is sticky, so anything scrolled or tabbed into view must clear it. */
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }

a, button, input, select, textarea { touch-action: manipulation; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--red); text-underline-offset: .18em; }
a:hover { color: var(--red-deep); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 3px; }
/* The charcoal ring vanishes on charcoal and red, so those areas get a white one. */
.band :focus-visible, .site-footer :focus-visible, .cta :focus-visible { outline-color: #fff; }

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 112%;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 4.6vw, 4rem); font-weight: 800; line-height: 1.02; letter-spacing: -.025em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem);  font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
h3 { font-size: 1.2rem;                         font-weight: 700; line-height: 1.25;  letter-spacing: -.01em; }

p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-s);
}
.skip-link:focus { top: 1rem; }

/* ---- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem/1 var(--body);
  padding: .95rem 1.35rem;
  border: 2px solid transparent;
  border-radius: var(--radius-s);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn[disabled] { opacity: .7; cursor: progress; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); color: #fff; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-line-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / .6); }
.btn-line-light:hover { background: #fff; color: var(--ink); }

/* ---- Header ------------------------------------------------------------ */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.5rem; flex-wrap: wrap; }
.brand { display: flex; line-height: 0; }
.brand img { height: 34px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .97rem; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:not(.btn):hover { border-bottom-color: var(--red); color: var(--ink); }
.nav-cta { padding: .7rem 1.1rem; font-size: .95rem; }

.nav-toggle {
  display: none;
  font: 600 .95rem var(--body); color: var(--ink);
  background: none; border: 2px solid var(--ink); border-radius: var(--radius-s);
  padding: .5rem .9rem; cursor: pointer;
}

@media (max-width: 860px) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 1rem; }
  .js .site-nav.open { display: flex; }
  .js .site-nav a:not(.btn) { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .js .nav-cta { margin-top: 1rem; }
  .site-nav { gap: .9rem 1.2rem; padding-bottom: .8rem; }   /* no-JS: wraps under the logo */
}

/* ---- Sections ---------------------------------------------------------- */

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.mist { background: var(--mist); }

.section-head { max-width: 46rem; margin-bottom: 3rem; }
.section-head p { font-size: 1.15rem; margin-top: 1rem; }

.lead { font-size: 1.22rem; line-height: 1.55; max-width: 36rem; }

/* ---- Hero -------------------------------------------------------------- */

.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-bottom: 1.4rem; }
.hero .lead { margin-bottom: 2rem; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.5rem; font-size: .95rem; color: var(--grey); }

@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }

/* The record graph: one contact, everything linked to them. */
.graph { width: 100%; height: auto; display: block; }
.graph .link { stroke: var(--red); stroke-width: 2.5; fill: none; stroke-linecap: round; }
.graph .node rect { fill: #fff; stroke: var(--line); stroke-width: 1.5; }
/* Sizes are in SVG units and scale with the graph, so they are set larger than they
   would be on a desktop-only page to stay readable at phone width. */
.graph .node .kind { font: 600 13px var(--body); fill: var(--grey); }
.graph .node .val  { font: 700 15px var(--display); fill: var(--ink); }
.graph .node .dot  { fill: var(--red); }
.graph .core rect { fill: var(--red); stroke: none; }
.graph .core text { fill: #fff; font-family: var(--display); }
.graph .core .name { font-size: 17px; font-weight: 800; }
.graph .core .sub  { font-size: 11.5px; font-weight: 500; fill: rgb(255 255 255 / .85); font-family: var(--body); }
.graph .core .halo { fill: none; stroke: var(--red); stroke-width: 2; opacity: .25; }

/* One orchestrated moment: the links draw in, then the records appear. */
@media (prefers-reduced-motion: no-preference) {
  /* Each link grows out from the client at the centre. Transform and opacity only. */
  .graph .link { transform-origin: 280px 230px; opacity: 0; transform: scale(0); animation: draw .8s cubic-bezier(.2,.7,.2,1) forwards; animation-delay: calc(.25s + var(--i) * .12s); }
  .graph .node { opacity: 0; animation: appear .4s ease forwards; animation-delay: calc(.7s + var(--i) * .12s); }
  .graph .core { animation: none; opacity: 1; }
  @keyframes draw   { to { opacity: 1; transform: scale(1); } }
  @keyframes appear { to { opacity: 1; } }
}

/* ---- Modules grid ------------------------------------------------------ */

.modules { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); }
.module { padding: 1.6rem 1.4rem 1.8rem 0; border-bottom: 1px solid var(--line); }
.module h3 { margin-bottom: .5rem; }
.module p { margin: 0; font-size: .97rem; }
@media (max-width: 980px) { .modules { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .modules { grid-template-columns: 1fr; } }

/* ---- Quote to cash ----------------------------------------------------- */

.chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); counter-reset: step; }
.chain li { position: relative; padding: 2.4rem 1.2rem 0 0; counter-increment: step; }
.chain li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--red); color: #fff;
  display: grid; place-items: center; font: 700 .9rem var(--display);
}
.chain li::after { content: ""; position: absolute; top: .93rem; left: 2.2rem; right: .4rem; height: 2px; background: var(--red); opacity: .35; }
.chain li:last-child::after { display: none; }
.chain strong { display: block; color: var(--ink); font-family: var(--display); font-weight: 700; margin-bottom: .3rem; }
.chain span { font-size: .95rem; display: block; }
@media (max-width: 820px) {
  .chain { grid-template-columns: 1fr; gap: 1.4rem; }
  .chain li { padding: 0 0 0 2.8rem; }
  .chain li::after { display: none; }
}

/* ---- Dark band --------------------------------------------------------- */

.band { background: var(--ink); color: #C9CBD1; }
.band h2, .band h3 { color: #fff; }
.band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.band ul { list-style: none; margin: 1.6rem 0 0; padding: 0; }
.band li { padding: .9rem 0 .9rem 1.6rem; border-top: 1px solid rgb(255 255 255 / .14); position: relative; }
.band li::before { content: ""; position: absolute; left: 0; top: 1.5rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--red); }
.band li strong { color: #fff; font-weight: 600; }
@media (max-width: 860px) { .band-grid { grid-template-columns: 1fr; } }

/* ---- Facts / pairs ----------------------------------------------------- */

.pairs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(2rem, 5vw, 4rem); }
.pair { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.pair h3 { margin-bottom: .45rem; }
.pair p { margin: 0; }
@media (max-width: 760px) { .pairs { grid-template-columns: 1fr; } }

/* ---- CTA --------------------------------------------------------------- */

.cta { background: var(--red); color: #fff; padding-block: clamp(3rem, 6vw, 4.5rem); }
.cta-grid { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta h2 { color: #fff; max-width: 30rem; }
.cta .btn { background: #fff; color: var(--red); }
.cta .btn:hover { background: var(--ink); color: #fff; }

/* ---- Page intro (inner pages) ------------------------------------------ */

.page-intro { padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-intro h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); max-width: 18ch; margin-bottom: 1.2rem; }
.page-intro .lead { margin: 0; }

/* ---- Feature groups ---------------------------------------------------- */

.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(1.5rem, 5vw, 4rem); padding-block: 3rem; border-bottom: 1px solid var(--line); }
.feature:last-of-type { border-bottom: 0; }
.feature h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: .8rem; }
.feature ul { margin: 0; padding-left: 1.1rem; }
.feature li { margin-bottom: .55rem; padding-left: .2rem; }
.feature li::marker { color: var(--red); }
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; gap: 1rem; } }

/* ---- Tables ------------------------------------------------------------ */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .97rem; }
td, .tier .price { font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--mist); color: var(--ink); font-weight: 600; font-size: .92rem; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--ink); font-weight: 500; }

.tag { display: inline-block; padding: .15rem .6rem; border-radius: 99px; font-size: .84rem; font-weight: 600; white-space: nowrap; }
.tag-yes    { background: #E4F4EA; color: #17652F; }
.tag-partly { background: #FDF0DA; color: #8A5200; }
.tag-no     { background: var(--mist); color: var(--grey); }

/* ---- Pricing ----------------------------------------------------------- */

.notice { background: var(--red-tint); border-left: 4px solid var(--red); padding: 1rem 1.2rem; border-radius: 0 var(--radius-s) var(--radius-s) 0; color: var(--ink); margin-bottom: 2.5rem; }

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.tier { border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.7rem; display: flex; flex-direction: column; background: #fff; }
.tier.featured { border: 2px solid var(--red); }
.tier .price { font: 800 2.6rem/1 var(--display); font-stretch: 112%; color: var(--ink); margin: 1rem 0 .3rem; }
.tier .per { color: var(--grey); font-size: .95rem; margin-bottom: 1.4rem; }
.tier ul { list-style: none; margin: 0 0 1.8rem; padding: 0; flex: 1; }
.tier li { padding: .5rem 0 .5rem 1.5rem; border-top: 1px solid var(--line); position: relative; }
.tier li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: .6rem; height: .6rem; border-radius: 50%; background: var(--red); }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; } }

/* ---- Demo form --------------------------------------------------------- */

.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 860px) { .demo-grid { grid-template-columns: 1fr; } }

.form { display: grid; gap: 1.2rem; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 560px) { .form .row2 { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: .35rem; font-size: .97rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: .75rem .9rem; background: #fff;
  border: 1.5px solid #B9BBC1; border-radius: var(--radius-s);
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field .err { display: block; color: #B00020; font-size: .9rem; margin-top: .3rem; }
.field .hint { color: var(--grey); font-size: .9rem; font-weight: 400; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.confirm { background: var(--mist); border-radius: var(--radius); padding: 2rem; }
.confirm h2 { font-size: 1.8rem; margin-bottom: .6rem; }

/* ---- Prose (privacy) --------------------------------------------------- */

.prose { max-width: 42rem; }
.prose h2 { font-size: 1.5rem; margin: 2.2rem 0 .6rem; }

/* ---- Footer ------------------------------------------------------------ */

.site-footer { background: var(--ink); color: #A9ACB4; padding-top: 3.5rem; }
.foot { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; padding-bottom: 2.5rem; }
.foot-brand img { height: 34px; width: auto; }
.foot-brand p { margin: .8rem 0 0; font-size: .95rem; }
.foot nav { display: flex; gap: .5rem 1.6rem; flex-wrap: wrap; align-content: flex-start; max-width: 32rem; }
.foot nav a { color: #E6E7EA; text-decoration: none; font-size: .97rem; }
.foot nav a:hover { color: #fff; text-decoration: underline; }
.legal { border-top: 1px solid rgb(255 255 255 / .12); padding-block: 1.3rem; font-size: .88rem; }

/* ---- Policy tables and cookie notice ----------------------------------- */

.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--red); }
.prose code { background: var(--mist); padding: .1rem .35rem; border-radius: 4px; font-size: .92em; }
.prose table.plain { min-width: 0; margin: 0 0 1rem; }
.prose .table-wrap { margin-bottom: 1rem; }

.cookie-notice {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60;
  max-width: 44rem; margin-inline: auto;
  display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; justify-content: space-between;
  background: var(--ink); color: #E6E7EA;
  padding: 1rem 1.25rem; border-radius: var(--radius);
  box-shadow: 0 8px 28px rgb(0 0 0 / .28);   /* it floats over the page, so it earns a shadow */
  font-size: .95rem; line-height: 1.5;
}
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; flex: 1 1 18rem; }
.cookie-notice a { color: #fff; }
.cookie-notice a:hover { color: #fff; text-decoration-thickness: 2px; }
.cookie-notice .btn { padding: .65rem 1.1rem; font-size: .95rem; }
.cookie-notice :focus-visible { outline-color: #fff; }
