/* Cadence: the AI operating system product page, on Trail.
   An offer page: the engagement is a dashed trail gutter (start, two stops
   ahead, the flag), the packages are cards that say "Book a call", and the
   page closes on the one juniper band. The gear motif marks "What you get",
   once. Shared components (route, cards, labels, faq, compare, close band)
   come from global.css; this file only places them. */

/* ---------- Hero ---------- */
.cd-hero { padding: clamp(var(--space-7), 6vw, var(--space-9)) 0 clamp(var(--space-7), 6vw, var(--space-9)); }
.cd-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(var(--space-6), 5vw, var(--space-8)); align-items: center;
}
.cd-hero-copy h1 { font-size: clamp(46px, 6vw, 84px); line-height: 1; letter-spacing: -0.025em; max-width: 14ch; }
.cd-hero-copy .lead { margin: var(--space-5) 0 var(--space-4); max-width: 40ch; }
.cd-hero-note { margin: 0 0 var(--space-6); color: var(--ink); font-weight: 600; max-width: 40ch; }
.cd-hero-portrait { margin: 0; max-width: 360px; justify-self: end; width: 100%; }
.cd-hero-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-card); }

/* Section heads: room for a heading on two lines at most. */
.v2-cadence .section-head { max-width: 46rem; }

/* ---------- The four conditions ---------- */
.cd-sequence {
  list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6) clamp(var(--space-4), 3vw, var(--space-6));
}
.cd-sequence > li { padding-top: var(--space-4); border-top: 2px solid var(--ink); }
.cd-seq-step {
  font-size: var(--text-label); font-weight: 700; letter-spacing: 0.08em;
  color: var(--trail-text);
}
.cd-sequence h3 { font-size: var(--text-step); margin: var(--space-2) 0; }
.cd-sequence p { font-size: var(--text-small); line-height: 1.55; }

.cd-outcome {
  margin-top: var(--space-7); padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: var(--space-4);
  align-items: baseline;
}
.cd-outcome p { font-family: var(--font-display); color: var(--ink); font-size: var(--fs-lead); line-height: 1.4; max-width: 46ch; }

/* ---------- What changes ---------- */
.cd-payoffs { border-top: 2px solid var(--ink); }
.cd-payoffs > div {
  display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: var(--space-3) clamp(var(--space-5), 4vw, var(--space-7));
  padding: var(--space-5) 0; border-bottom: 1px solid var(--line);
}
.cd-payoffs dt { font-family: var(--font-display); font-size: 24px; font-weight: 500; line-height: 1.2; color: var(--ink); }
.cd-payoffs dd { max-width: var(--measure); }

/* ---------- What you get ---------- */
.cd-get-head { display: flex; gap: var(--space-5); align-items: flex-start; max-width: none; }
.cd-get-head > div { max-width: 40ch; }
.cd-motif { width: 48px; height: 48px; flex: none; margin-top: 4px; }
.cd-get {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(var(--space-6), 5vw, var(--space-8)); align-items: start;
}
/* The repository's contents, set as a table of contents. */
.cd-tree {
  font-size: var(--text-small); line-height: 1.5;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: var(--space-5);
  max-width: 460px; width: 100%;
}
.tr-root {
  font-size: var(--text-label); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding-bottom: var(--space-4); margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}
.tr { list-style: none; }
.cd-tree > .tr > li + li { margin-top: var(--space-4); }
/* Nested lists only: the nested lists are .tr too, so a bare `.tr li` rule
   would strip the rails off the children. */
.tr .tr { padding-left: .4em; margin-top: 2px; }
.tr .tr > li { position: relative; padding: 2px 0 2px 1.1em; }
.tr .tr > li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--line-strong); }
.tr .tr > li:last-child::before { bottom: auto; height: .8em; }
.tr .tr > li::after { content: ""; position: absolute; left: 0; top: .8em; width: .7em; border-top: 1px solid var(--line-strong); }
.tr-group { display: block; font-family: var(--font-display); font-weight: 500; font-size: 18px; color: var(--ink); }
.tr-note { color: var(--muted); font-size: var(--text-label); }
.tr-note::before { content: " · "; }
.tr li.is-key > .tr-group {
  display: inline-block; background: var(--juniper-tint); color: var(--juniper);
  padding: 0 10px; border-radius: var(--radius-pill);
}
.cd-get-list { list-style: none; }
.cd-get-list li { padding: var(--space-4) 0; border-top: 1px solid var(--line); max-width: var(--measure); }
.cd-get-list li:first-child { border-top: 0; padding-top: 0; }
/* The set-up list runs two columns wide on desktop, one on phones. */
.cd-get-list--wide { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); column-gap: var(--space-7); }
.cd-get-list--wide li, .cd-get-list--wide li:first-child { border-top: 1px solid var(--line); padding-top: var(--space-4); }
.cd-connect { margin-top: var(--space-6); color: var(--muted); font-size: var(--text-small); max-width: var(--measure); }

/* ---------- The engagement route ---------- */
.cd-route .section-head { margin-bottom: var(--space-6); }
.cd-route .stop__body { padding-bottom: var(--space-6); max-width: var(--measure); }
.cd-route .stop:not(.stop--start) .stop__body { padding-top: 28px; border-top: 1px solid var(--line); }
.cd-route .stop--goal .stop__body { padding-bottom: 0; }
.cd-route h3 { font-size: var(--text-step); margin-bottom: var(--space-2); }

/* ---------- Packages ---------- */
/* Four packages: four across, two by two, then one column. Never three and
   an orphan. */
.cd-packages { list-style: none; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .cd-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cd-packages { grid-template-columns: 1fr; } }
.cd-package .label { align-self: flex-start; }
.cd-package--start .label { background: var(--juniper); color: var(--on-juniper); }
.cd-package h3 { font-size: var(--text-step); }
.cd-points { list-style: none; display: grid; gap: 6px; font-size: var(--text-small); color: var(--muted); }
.cd-points li { position: relative; padding-left: 16px; }
.cd-points li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.cd-package > :last-child { margin-top: auto; align-self: flex-start; }

/* ---------- Questions ---------- */
.cd-faq { max-width: 62rem; }
.cd-a > * + * { margin-top: var(--space-4); }
.cd-a .checks { max-width: var(--measure); }
.cd-table-scroll { overflow-x: auto; }
.cd-table { min-width: 36rem; font-size: var(--text-small); }
.cd-table th, .cd-table td { vertical-align: top; line-height: 1.5; }
.cd-table tbody th { font-size: 17px; }
.cd-table tr.is-ours { background: var(--juniper-tint); }
.cd-table tr.is-ours :is(th, td) { color: var(--juniper); font-weight: 600; }
.cd-table tr.is-ours th { padding-left: 12px; }
.cd-table-note { font-size: var(--text-small); color: var(--muted); }

/* ---------- Playbooks (from partials/playbook-list.njk) ---------- */
.pbl-list { list-style: none; max-width: 42rem; border-top: 2px solid var(--ink); }
.pbl-list li { border-bottom: 1px solid var(--line); }
.pbl-list a {
  display: block; padding: var(--space-4) 0; text-decoration: none;
  font-family: var(--font-display); font-size: 22px; font-weight: 500; line-height: 1.25; color: var(--ink);
}
.pbl-list a:hover { color: var(--juniper); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cd-hero-grid { grid-template-columns: 1fr; }
  .cd-hero-portrait { order: -1; justify-self: start; max-width: 280px; }
  .cd-sequence { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cd-get { grid-template-columns: 1fr; }
  .cd-tree { max-width: none; }
  .cd-payoffs > div { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .cd-sequence { grid-template-columns: 1fr; }
  .cd-outcome { grid-template-columns: 1fr; gap: var(--space-2); }
  .cd-get-head { flex-direction: column; gap: var(--space-3); }
  .cd-motif { width: 40px; height: 40px; }
}
