/* ──────────────────────────────────────────────────────────────
   Slade CRM — landing page
   Two colours and a lot of air, carried over from the product:
   a pale cyan ground and a deep teal ink, with one warm accent.
   ────────────────────────────────────────────────────────────── */

:root {
  --ink: #073742;
  --ink-2: #0f4d5c;
  --ink-soft: #3d6b78;
  --ink-faint: #7ba3ae;
  --ground: #ebfafe;
  --ground-2: #f4fbfd;
  --white: #fff;
  --line: #cfe9f1;
  --accent: #ff9566;
  --accent-soft: #ffd9c7;
  --shadow: 0 1px 2px rgba(7, 55, 66, .04), 0 10px 28px -14px rgba(7, 55, 66, .2);
  --shadow-lg: 0 2px 6px rgba(7, 55, 66, .05), 0 30px 60px -28px rgba(7, 55, 66, .35);
  --shell: 1140px;
  --r: 18px;
  --r-lg: 28px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.08; letter-spacing: -.03em; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }

.shell { width: min(100% - 40px, var(--shell)); margin-inline: auto; }

.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip:focus {
  position: fixed; inset: 12px auto auto 12px; z-index: 100;
  background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: 999px;
}

:where(a, button, input):focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
}
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-dark { background: var(--ink); color: var(--ground); }
.btn-dark:hover { background: var(--ink-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: rgba(255, 255, 255, .55); }
.btn-ghost:hover { border-color: var(--ink-faint); transform: translateY(-2px); }

.linkish {
  background: none; border: 0; padding: 0; font: inherit; color: var(--ink);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ── nav ─────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--ground) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 24px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand-mark svg { width: 30px; height: 30px; display: block; }
.brand-mark rect { fill: var(--ink); }
.brand-mark text { fill: var(--ground); font-size: 19px; font-weight: 700; font-family: inherit; }
.brand-word { font-size: 19px; letter-spacing: -.03em; }
.brand-dim { color: var(--ink-faint); margin-left: 2px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft); transition: .2s;
}
.nav-links a:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.nav-cta { font-size: 14.5px; padding: 9px 18px; }
/* The two buttons travel together: the links between them and the brand
   disappear under 900px, and `margin-left: auto` has to land on whichever
   of the two is still in the bar. */
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-links + .nav-actions { margin-left: 0; }

/* ── hero ────────────────────────────────────────────────── */
/* The hero clips its own decoration. overflow-x on body does not contain
   absolutely-positioned descendants, and the blobs are wider than a phone. */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 110px) 0 clamp(60px, 8vw, 100px); }
.hero-inner { position: relative; z-index: 1; text-align: center; }

.aurora { position: absolute; inset: -20% 0 auto; height: 780px; pointer-events: none; filter: blur(70px); opacity: .75; }
.blob { position: absolute; border-radius: 50%; display: block; }
.blob-1 { width: 520px; height: 520px; left: 4%; top: 2%;  background: #9fe0f2; animation: drift1 22s var(--ease) infinite alternate; }
.blob-2 { width: 460px; height: 460px; right: 6%; top: 12%; background: var(--accent-soft); animation: drift2 26s var(--ease) infinite alternate; }
.blob-3 { width: 420px; height: 420px; left: 38%; top: 30%; background: #bdf0dd; animation: drift3 19s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate3d(90px, 60px, 0) scale(1.15); } }
@keyframes drift2 { to { transform: translate3d(-110px, 40px, 0) scale(1.1); } }
@keyframes drift3 { to { transform: translate3d(40px, -70px, 0) scale(.9); } }

.eyebrow {
  text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 600;
  color: var(--ink-soft); margin-bottom: 18px;
}
.eyebrow-light { color: var(--ink-faint); }

h1 { font-size: clamp(40px, 7.2vw, 78px); }

/* the word that swaps: "say" → "want" */
.ink-swap {
  display: inline-grid; vertical-align: baseline; text-align: left;
  color: var(--accent);
}
.ink-swap > span { grid-area: 1 / 1; }
.ink-swap > span:first-child { animation: swapOut 5.6s var(--ease) infinite; }
.ink-swap > span:last-child  { animation: swapIn  5.6s var(--ease) infinite; }
@keyframes swapOut {
  0%, 38% { opacity: 1; transform: none; }
  46%, 92% { opacity: 0; transform: translateY(-.5em); }
  100% { opacity: 1; transform: none; }
}
@keyframes swapIn {
  0%, 38% { opacity: 0; transform: translateY(.5em); }
  46%, 92% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(.5em); }
}

.lede {
  max-width: 620px; margin: 22px auto 0; font-size: clamp(16.5px, 1.6vw, 19px);
  color: var(--ink-soft);
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }

/* ── the A/B demo ────────────────────────────────────────── */
.hero-demo {
  margin: clamp(42px, 6vw, 70px) auto 0; max-width: 940px;
  background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  overflow: hidden; text-align: left;
}
.demo-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid var(--ground);
  font-size: 13px; color: var(--ink-soft);
}
.demo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.demo-title strong { color: var(--ink); }
.demo-progress { margin-left: auto; width: 140px; height: 5px; border-radius: 999px; background: var(--ground); overflow: hidden; }
.demo-progress i { display: block; height: 100%; width: 8%; background: var(--ink); border-radius: 999px; transition: width .6s var(--ease); }

.demo-body { display: grid; grid-template-columns: 1fr 250px; gap: 22px; padding: 22px; }

.ab-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.ab-or { font-size: 12px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .1em; }

.flat {
  border: 1px solid var(--line); border-radius: var(--r); padding: 12px;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s, opacity .45s;
}
.flat.is-picked { border-color: var(--ink); box-shadow: var(--shadow); transform: translateY(-5px); }
.flat.is-passed { opacity: .4; }
.flat-img { height: 94px; border-radius: 12px; margin-bottom: 11px; background-size: 200% 200%; }
.flat-img-a { background-image: linear-gradient(135deg, #bfe8f5, #8fd3e8 60%, #d8f0e4); }
.flat-img-b { background-image: linear-gradient(135deg, #ffe0cf, #ffc2a3 60%, #ffeede); }
.flat-title { font-size: 16px; }
.flat-meta { font-size: 14px; color: var(--ink); margin-top: 3px; font-weight: 500; }
.flat-note { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }

.weights { border-left: 1px solid var(--ground); padding-left: 20px; }
.weights-label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); margin-bottom: 12px; }
.weight-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.weight-list li { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-soft); }
.bar { height: 7px; border-radius: 999px; background: var(--ground); display: block; overflow: hidden; }
.bar b { display: block; height: 100%; width: 20%; border-radius: 999px; background: var(--ink); transition: width .7s var(--ease), background .7s; }
.bar b.is-top { background: var(--accent); }

.demo-foot { padding: 0 22px 18px; font-size: 13px; color: var(--ink-faint); }

/* ── bands ───────────────────────────────────────────────── */
.band { padding: clamp(64px, 9vw, 120px) 0; }
.band-soft { background: var(--ground-2); }
.band-ink { background: var(--ink); color: var(--ground); }
.band-ink h2, .band-ink h3 { color: var(--white); }
.band-ink p { color: #a9cfda; }

.section-title { font-size: clamp(30px, 4.2vw, 48px); max-width: 18ch; }
.section-sub { margin-top: 16px; max-width: 56ch; color: var(--ink-soft); }

/* ── problems ────────────────────────────────────────────── */
.problems { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; margin-top: 44px; }
.problem {
  background: var(--white); border-radius: var(--r-lg); padding: 28px;
  box-shadow: var(--shadow); transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.problem:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.problem-no { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--accent); }
.problem h3 { font-size: 20px; margin: 12px 0 10px; }
.problem p { color: var(--ink-soft); font-size: 15.5px; }

/* ── split (engine) ──────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split-text h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 20px; }
.split-text p + p { margin-top: 14px; }
.ticks { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 11px; }
.ticks li { position: relative; padding-left: 28px; color: #bcdde6; font-size: 15.5px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: 13px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.ticks em { font-style: normal; color: var(--white); }

.radar-wrap { display: grid; place-items: center; }
.radar { width: min(100%, 360px); height: auto; }
.radar-grid polygon { fill: none; stroke: rgba(169, 207, 218, .28); }
.radar-grid line { stroke: rgba(169, 207, 218, .28); }
.radar-shape {
  fill: rgba(255, 149, 102, .22); stroke: var(--accent); stroke-width: 2; stroke-linejoin: round;
  transform-origin: 160px 160px;
  animation: profileForm 9s var(--ease) infinite;
}
@keyframes profileForm {
  0%   { clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%); }
  28%  { clip-path: polygon(50% 9%, 73% 46%, 60% 82%, 40% 62%, 26% 40%); }
  56%  { clip-path: polygon(50% 24%, 86% 36%, 66% 76%, 32% 70%, 20% 33%); }
  84%, 100% { clip-path: polygon(50% 9%, 88% 34%, 72% 78%, 28% 78%, 14% 34%); }
}
.radar-labels text { fill: #a9cfda; font-size: 12px; font-family: inherit; }

/* ── cards ───────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; margin-top: 46px; }
.card {
  grid-column: span 2; background: var(--white); border-radius: var(--r-lg); padding: 28px;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card-wide { grid-column: span 3; }
/* Six cards over a six-column grid: 3+3, then 2+2+2, then one full-width.
   Mixed spans that do not add up leave ragged gaps at the end of a row. */
.card-full { grid-column: span 6; }
.card::after {
  content: ""; position: absolute; inset: auto -40% -70% auto; width: 190px; height: 190px;
  border-radius: 50%; background: var(--ground); opacity: 0; transition: opacity .45s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card:hover::after { opacity: 1; }
.card h3 { font-size: 19px; display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.card p { margin-top: 11px; color: var(--ink-soft); font-size: 15.5px; position: relative; z-index: 1; }
.ico {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  border-radius: 10px; background: var(--ground); color: var(--ink); font-size: 15px;
}

/* ── steps ───────────────────────────────────────────────── */
.steps { list-style: none; margin: 46px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; counter-reset: s; }
.step { background: var(--white); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow); }
.step-no {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--ink); color: var(--ground); font-weight: 700; font-size: 16px;
}
.step h3 { font-size: 19px; margin: 16px 0 9px; }
.step p { color: var(--ink-soft); font-size: 15.5px; }

/* ── cta ─────────────────────────────────────────────────── */
.cta { padding: clamp(64px, 9vw, 120px) 0; }
.cta-inner {
  background: var(--ink); color: var(--ground); border-radius: var(--r-lg);
  padding: clamp(40px, 6vw, 72px); text-align: center; position: relative; overflow: hidden;
}
.cta-inner::before {
  content: ""; position: absolute; inset: -60% -10% auto; height: 340px;
  background: radial-gradient(ellipse at 50% 0, rgba(255, 149, 102, .4), transparent 68%);
  pointer-events: none;
}
.cta-inner > * { position: relative; }
.cta h2 { font-size: clamp(28px, 4vw, 44px); color: var(--white); }
.cta p { margin-top: 16px; color: #a9cfda; max-width: 52ch; margin-inline: auto; }
.cta-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.cta-form input {
  flex: 1 1 290px; max-width: 340px; padding: 15px 20px; border-radius: 999px;
  border: 1px solid rgba(169, 207, 218, .35); background: rgba(255, 255, 255, .08);
  color: var(--white); font: inherit; font-size: 16px;
}
.cta-form input::placeholder { color: #7ea6b2; }
.cta-form input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.cta-form .btn-dark { background: var(--accent); color: #37190c; }
.cta-form .btn-dark:hover { background: #ffa87f; }
.cta-note { margin-top: 16px; font-size: 13.5px; color: #7ea6b2; }
.cta-note.is-error { color: var(--accent-soft); }

/* ── footer ──────────────────────────────────────────────── */
.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); }
.foot-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--ink-soft); font-size: 14.5px; }
.foot-brand { font-size: 17px; color: var(--ink); }
.foot-small { margin-left: auto; color: var(--ink-faint); font-size: 13.5px; }

/* ── scroll reveal ───────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .07s; }
.reveal:nth-child(3) { transition-delay: .14s; }
.reveal:nth-child(4) { transition-delay: .21s; }

/* ── responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  /* With the links gone, the buttons are what has to be pushed right —
     `display: none` does not stop the sibling rule above from matching. */
  .nav-links + .nav-actions { margin-left: auto; }
  .demo-body { grid-template-columns: 1fr; }
  .weights { border-left: 0; border-top: 1px solid var(--ground); padding: 18px 0 0; }
  .split { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card, .card-wide, .card-full { grid-column: span 2; }
}
@media (max-width: 620px) {
  /* Two buttons and a wordmark in 375px. Tightened rather than hidden: the
     bar wraps onto two lines at full size, and a header that stacks is a
     header that looks broken. Both still clear the 44px touch target. */
  .nav-inner { gap: 10px; }
  .nav-cta { font-size: 13.5px; padding: 9px 13px; }
  .nav-actions { gap: 6px; }

  /* Scaled to the screen, so the wash still reads as a wash rather than one
     flat colour filling the whole hero. */
  .blob-1 { width: 260px; height: 260px; }
  .blob-2 { width: 230px; height: 230px; }
  .blob-3 { width: 210px; height: 210px; }
  .aurora { height: 520px; filter: blur(50px); }
  .ab-pair { grid-template-columns: 1fr; }
  .ab-or { justify-self: center; }
  .cards { grid-template-columns: 1fr; }
  .card, .card-wide, .card-full { grid-column: span 1; }
  .foot-small { margin-left: 0; width: 100%; }
}

/* Motion is decoration here; the page must read the same without it. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .ink-swap > span:first-child { opacity: 0; }
}
