/* ==========================================================================
   LUNEXI — landing page
   Built from design_handoff_lunexi_landing. Values are taken from the
   prototype; nothing here animates on load or on scroll by design.
   ========================================================================== */

:root {
  /* colour */
  --ink: #0b132b;
  --accent: #ba3601;
  --accent-hover: #d94304;
  --accent-dark: #e8703f; /* accent on navy */
  --anno: #f0a184;
  --page: #f8f5f0;
  --tint: #f2ede6;
  --card: #ffffff;
  --hairline: #efece7;
  --border: #e5e1db;
  --rule: #cfc9c1;

  /* ink over cream */
  --ink-72: rgba(11, 19, 43, 0.72);
  --ink-62: rgba(11, 19, 43, 0.62);
  --ink-55: rgba(11, 19, 43, 0.55);
  --ink-50: rgba(11, 19, 43, 0.5);
  --ink-45: rgba(11, 19, 43, 0.45);
  --ink-35: rgba(11, 19, 43, 0.35);
  --ink-30: rgba(11, 19, 43, 0.3);
  --ink-24: rgba(11, 19, 43, 0.24);
  --ink-16: rgba(11, 19, 43, 0.16);
  --ink-08: rgba(11, 19, 43, 0.08);

  /* white over navy */
  --w-80: rgba(255, 255, 255, 0.8);
  --w-72: rgba(255, 255, 255, 0.72);
  --w-62: rgba(255, 255, 255, 0.62);
  --w-60: rgba(255, 255, 255, 0.6);
  --w-55: rgba(255, 255, 255, 0.55);
  --w-50: rgba(255, 255, 255, 0.5);
  --w-46: rgba(255, 255, 255, 0.46);
  --w-44: rgba(255, 255, 255, 0.44);
  --w-24: rgba(255, 255, 255, 0.24);
  --w-16: rgba(255, 255, 255, 0.16);
  --w-14: rgba(255, 255, 255, 0.14);
  --w-09: rgba(255, 255, 255, 0.09);
  --w-055: rgba(255, 255, 255, 0.055);

  /* shadow */
  --sh-card: 0 1px 2px rgba(11, 19, 43, 0.04);
  --sh-card-hover: 0 14px 34px rgba(11, 19, 43, 0.08);
  --sh-featured: 0 22px 48px rgba(186, 54, 1, 0.13);
  --sh-btn: 0 12px 30px rgba(186, 54, 1, 0.24);
  --sh-btn-hover: 0 16px 38px rgba(186, 54, 1, 0.34);

  /* geometry */
  --wrap: 1240px;
  --gutter: 32px;
  --sec: 120px;

  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ------------------------------------------------------------------ RESET */

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

html {
  /* the site is light-only; without this the Cal.com embed follows the
     visitor's system preference and renders dark on the cream ground */
  color-scheme: light;
  scroll-behavior: smooth;
  /* the sticky header must not sit over the anchor it jumps to */
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 90;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

/* ---------------------------------------------------------------- HELPERS */

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--sec);
}

.tinted {
  border-top: 1px solid var(--border);
  background: var(--tint);
}

/* Small caption/index type. The design used a mono face for these; the
   brand runs on one family, so they carry weight and tabular figures
   instead. Each rule below keeps its own size, tracking and transform. */
.label {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.accent {
  color: var(--accent);
}

.accent-d {
  color: var(--accent-dark);
}

/* the 1px grid that sits behind hero, navy section and the final CTA box */
.gridlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gridlines--cream {
  background-image: linear-gradient(rgba(11, 19, 43, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 19, 43, 0.045) 1px, transparent 1px);
  background-size: 120px 120px;
}

.gridlines--navy {
  background-image: linear-gradient(var(--w-055) 1px, transparent 1px),
    linear-gradient(90deg, var(--w-055) 1px, transparent 1px);
  background-size: 28px 28px;
}

.gridlines--brick {
  background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* 6px square bullet, used in the logic card and the pricing lists */
.sq {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  background: var(--ink-24);
}

/* ------------------------------------------------------------------- TYPE */

.h1 {
  margin: 0;
  font-size: clamp(40px, 4.9vw, 72px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.036em;
  text-wrap: balance;
}

.h2 {
  margin: 0;
  font-size: clamp(32px, 3.5vw, 50px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.eyebrow {
  margin: 0 0 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-dark);
}

/* two-column section head: heading left, lede right */
.shead {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 80px;
  align-items: start;
  margin-bottom: 64px;
}

.shead--end {
  align-items: end;
  margin-bottom: 72px;
}

.shead__lede {
  margin: 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-62);
}

.shead--dark .shead__lede {
  color: var(--w-62);
}

.problems .shead__lede {
  align-self: end;
  max-width: 44ch;
}

.method .shead__lede {
  max-width: 48ch;
}

.pricing .shead__lede {
  max-width: 52ch;
}

/* ---------------------------------------------------------------- BUTTONS */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 999px;
  font-weight: 600;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.pill--accent {
  padding: 16px 28px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  box-shadow: var(--sh-btn);
}

.pill--outline {
  margin-top: 8px;
  padding: 14px 22px;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: 15px;
}

.pill--block {
  margin-top: 8px;
  padding: 14px 22px;
  font-size: 15px;
  box-shadow: none;
}

.pill--white {
  padding: 18px 34px;
  background: #fff;
  color: var(--accent);
  font-size: 17px;
  font-weight: 700;
}

@media (hover: hover) {

  .pill--accent:hover {
    background: var(--accent-hover);
    box-shadow: var(--sh-btn-hover);
    transform: translateY(-1px);
  }

  .pill--block:hover {
    box-shadow: none;
    transform: none;
  }

  .pill--outline:hover {
    border-color: var(--ink);
  }

  .pill--white:hover {
    background: var(--ink);
    color: #fff;
  }
}

/* underlined text link — the secondary of every CTA pair */
.tlink {
  padding-bottom: 3px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-72);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.tlink--onbrick {
  border-bottom-color: rgba(255, 255, 255, 0.34);
  color: var(--w-80);
}

@media (hover: hover) {
  .tlink:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }

  .tlink--onbrick:hover {
    color: #fff;
    border-bottom-color: #fff;
  }
}

.ctarow {
  margin-top: 44px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.ctarow--tight {
  margin-top: 38px;
}

/* ----------------------------------------------------------------- HEADER */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 245, 240, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -1px 0 var(--ink-08);
}

.header__bar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.brand--light {
  color: #fff;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-72);
  transition: color 0.18s ease;
}

.header__end {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (hover: hover) {
  .nav a:hover {
    color: var(--ink);
  }
}

.navtoggle {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border: 1px solid var(--ink-16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font: inherit;
  cursor: pointer;
}

.navtoggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ink);
}

.navpanel {
  padding: 4px var(--gutter) 22px;
  display: flex;
  flex-direction: column;
  background: rgba(248, 245, 240, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 -1px 0 var(--ink-08);
}

/* display:flex above would otherwise beat the UA's [hidden] rule */
.navpanel[hidden] {
  display: none;
}

.navpanel a {
  padding: 14px 0;
  font-size: 17px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

/* ------------------------------------------------------------------- HERO */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero__inner {
  position: relative;
  padding-block: 120px 128px;
}

.hero__col {
  max-width: 880px;
}

.hero__sub {
  margin: 30px 0 0;
  max-width: 50ch;
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink-72);
}

/* --------------------------------------------------------------- PROBLEMS */

.pgrid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.pcard {
  display: flex;
  flex-direction: column;
  padding: 28px 26px 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--sh-card);
  transition: box-shadow 0.22s ease;
}

@media (hover: hover) {
  .pcard:hover {
    box-shadow: var(--sh-card-hover);
  }
}

.pcard__n {
  font-size: 12px;
  color: var(--ink-30);
}

.pcard__t {
  margin: 18px 0 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.022em;
}

.pcard__b {
  margin: 10px 0 24px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-62);
}

/* the consequence sits on the baseline of every card so the row lines up */
.pcard__c {
  margin: auto 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ------------------------------------------------------- BLUEPRINT DIAGRAM */

.dark {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}

.dark .wrap {
  position: relative;
}

/* 7 columns: card, wire, card, wire, cards, wire, card */
.dia {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) 52px minmax(0, 1.26fr) 64px minmax(0, 1.04fr)
    64px minmax(0, 0.96fr);
  align-items: stretch;
}

.dia__col {
  margin: 0 0 16px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--w-44);
}

.dia__coln {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--w-80);
}

.dia__col--1 { grid-column: 1; }
.dia__col--2 { grid-column: 2; }
.dia__col--3 { grid-column: 3; }
.dia__col--4 { grid-column: 4; }
.dia__col--5 { grid-column: 5; }
.dia__col--6 { grid-column: 6; }
.dia__col--7 { grid-column: 7; }

.node {
  border: 1px solid var(--w-14);
  border-radius: 14px;
  background: var(--w-055);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 var(--w-14);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.node--edge {
  grid-row: 2;
  align-self: center;
  padding: 18px 20px;
}

.node--trigger {
  grid-column: 1;
}

.node--human {
  grid-column: 7;
  border-left: 3px solid #fff;
}

.node--logic {
  grid-column: 3;
  grid-row: 2;
  padding: 24px;
  border-color: rgba(232, 112, 63, 0.42);
  background: rgba(232, 112, 63, 0.1);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 22px 50px rgba(0, 0, 0, 0.3);
}

.node--act {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
}

@media (hover: hover) {
  .node--trigger:hover,
  .node--act:hover {
    border-color: rgba(232, 112, 63, 0.55);
    background: var(--w-09);
  }
}

.node__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--accent);
}

.node__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.node__k {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--w-46);
}

.node__k--accent {
  color: var(--accent-dark);
}

.node__t {
  margin: 9px 0 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.016em;
  color: #fff;
}

.node__t--lg {
  font-size: 20px;
  letter-spacing: -0.018em;
}

.node__t--sm {
  margin-top: 8px;
  font-size: 16px;
}

.node__b {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--w-55);
}

.node__b--lg {
  color: var(--w-62);
}

.node__b--sm {
  margin-top: 4px;
  font-size: 12.5px;
}

.node__list {
  list-style: none;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--w-14);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.node__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--w-80);
}

.node__list .sq {
  background: var(--accent-dark);
}

.acts {
  grid-column: 5;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

/* connector columns — each span is positioned inline in the markup */
.wire {
  grid-row: 2;
  position: relative;
}

.wire--a { grid-column: 2; }
.wire--b { grid-column: 4; }
.wire--c { grid-column: 6; }

.wire .w-h {
  position: absolute;
  height: 1px;
  background: var(--w-24);
}

.wire .w-v {
  position: absolute;
  width: 1px;
  background: var(--w-24);
}

/* --- handwritten annotations, aligned to the diagram columns --- */

.annos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) 52px minmax(0, 1.26fr) 64px minmax(0, 1.04fr)
    64px minmax(0, 0.96fr);
  align-items: start;
}

.anno {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.anno--1 { grid-column: 1; }
.anno--2 { grid-column: 3; }
.anno--3 { grid-column: 5; }
.anno--4 { grid-column: 7; }

.anno__arrow {
  width: 70px;
  height: 52px;
  overflow: visible;
  fill: none;
  stroke: var(--accent-dark);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.anno--1 .anno__arrow {
  width: 78px;
  height: 56px;
}

/* the design set these in a handwriting face at a slight rotation; in one
   family that reads as a mistake, so they are plain callouts — the arrow
   above each one still does the pointing */
.anno__t {
  margin-top: 2px;
  max-width: 15ch;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--anno);
}

.dia__foot {
  margin: 52px 0 0;
  padding-top: 24px;
  max-width: 60ch;
  border-top: 1px solid var(--w-14);
  font-size: 14px;
  line-height: 1.55;
  color: var(--w-50);
}

/* ---------------------------------------------------------------- FOUNDER */

.founder {
  padding-block: 76px;
}

.quote {
  margin: 0;
  max-width: 760px;
  display: flex;
  gap: 26px;
  align-items: flex-start;
}

.quote__img {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  filter: saturate(0.92);
}

.quote__b {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.quote__c {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--ink-62);
}

.quote__c strong {
  font-weight: 700;
  color: var(--ink);
}

/* ------------------------------------------------------------ METHODOLOGY */

.method {
  border-bottom: 1px solid var(--border);
}

.axis {
  display: grid;
  grid-template-columns: minmax(0, 0.46fr) minmax(0, 0.54fr);
  gap: 48px;
  margin-bottom: 10px;
}

.axis__scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.46fr) minmax(0, 0.54fr);
  gap: 48px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}

.step--last {
  border-bottom: 0;
}

.step__body {
  display: flex;
  gap: 20px;
  align-items: baseline;
}

.step__n {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--accent);
}

.step__t {
  margin: 0 0 8px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.024em;
}

.step__b {
  margin: 0;
  max-width: 44ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-62);
}

/* bar geometry is per-row: --start, --w and --o come off the <li> */
.track {
  position: relative;
  align-self: stretch;
  min-height: 46px;
}

.track__rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}

.track__bar {
  position: absolute;
  left: var(--start);
  width: var(--w);
  top: 50%;
  height: 14px;
  margin-top: -7px;
  border-radius: 999px;
  background: var(--accent);
  opacity: var(--o);
}

/* stubs bleed 26px past the row padding so the line reads as continuous
   from one bar's right edge into the next bar's left edge */
.stub {
  position: absolute;
  width: 1px;
  background: var(--rule);
}

.stub--out {
  left: calc(var(--start) + var(--w));
  top: 50%;
  bottom: -26px;
}

.stub--in {
  left: var(--start);
  top: -26px;
  bottom: 50%;
}

.method__note {
  margin: 26px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-50);
}

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

.bp__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 80px;
  align-items: center;
}

.bp__h {
  max-width: 16ch;
}

.bp__lede {
  margin: 26px 0 0;
  max-width: 50ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-62);
}

.bp__fine {
  margin: 28px 0 0;
  max-width: 48ch;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-45);
}

.sample {
  margin: 0 0 0 auto;
  max-width: 460px;
}

.sample__card {
  padding: 30px 32px 26px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 30px 60px var(--ink-08);
}

.sample__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-50);
}

.sample__count {
  color: var(--ink-35);
}

.sample__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sample__list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--hairline);
}

.sample__list li:last-child {
  border-bottom: 0;
}

.sample__step {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.verdict {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-62);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.verdict--auto {
  border-color: transparent;
  background: rgba(186, 54, 1, 0.1);
  color: var(--accent);
}

.sample__figs {
  display: flex;
  gap: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.sample__fig {
  display: block;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.sample__fig--accent {
  color: var(--accent);
}

.sample__figc {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-55);
}

.sample__cap {
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-50);
}

/* ---------------------------------------------------------------- PRICING */

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px 30px 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--sh-card);
}

.plan--featured {
  position: relative;
  border-color: rgba(186, 54, 1, 0.4);
  box-shadow: var(--sh-featured);
}

.plan__kicker {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.plan__t {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.plan__price {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.plan__from {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-55);
}

.plan__amt {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.038em;
}

.plan__b {
  margin: 0;
  min-height: 3.2em;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-62);
}

.plan__list {
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 18px 0 4px;
  border-top: 1px solid var(--hairline);
}

.plan__list li {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-72);
}

.plan__list .sq {
  margin-top: 0.55em;
}

.plan--featured .plan__list .sq {
  background: var(--accent);
}

/* -------------------------------------------------------------------- WHY */

.why {
  border-top: 1px solid var(--border);
  padding-block: 112px 120px;
}

.why .shead__lede {
  max-width: 46ch;
}

.pillars {
  display: flex;
  flex-direction: column;
}

.pillar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 34px 0;
  border-top: 1px solid var(--rule);
}

.pillar--last {
  border-bottom: 1px solid var(--rule);
}

.pillar__t {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.028em;
  text-wrap: pretty;
}

.pillar__b {
  margin: 0;
  padding-top: 6px;
  max-width: 52ch;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-62);
}

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

.finalcta {
  border-top: 1px solid var(--border);
  padding-block: 96px;
}

.cta {
  position: relative;
  overflow: hidden;
  padding: 80px;
  border-radius: 28px;
  background: var(--accent);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: center;
  box-shadow: 0 30px 70px rgba(186, 54, 1, 0.22);
}

.cta__col {
  position: relative;
}

.cta__col--end {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.cta__h {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(32px, 3.2vw, 48px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.cta__b {
  margin: 26px 0 0;
  max-width: 48ch;
  font-size: 18px;
  line-height: 1.6;
  color: var(--w-80);
}

/* ----------------------------------------------------------------- FOOTER */

.footer {
  background: var(--ink);
  color: #fff;
  padding-block: 80px 32px;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  gap: 56px;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--w-16);
}

.footer__desc {
  margin: 16px 0 0;
  max-width: 32ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--w-60);
}

.fnav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.fnav > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fnav__h {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--w-50);
}

.fnav a {
  font-size: 14.5px;
  color: var(--w-72);
  transition: color 0.18s ease;
}

@media (hover: hover) {
  .fnav a:hover {
    color: #fff;
  }
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 26px;
  font-size: 12px;
  color: var(--w-46);
}

/* ================================================================ <=1080px */

@media (max-width: 1080px) {
  :root {
    --sec: 96px;
    --gutter: 24px;
  }

  .nav {
    display: none;
  }

  .navtoggle {
    display: flex;
  }

  .shead,
  .bp__inner,
  .footer__top {
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
  }

  .shead {
    margin-bottom: 48px;
  }

  .problems .shead__lede,
  .shead--end .shead__lede {
    align-self: start;
  }

  .hero__inner {
    padding-block: 88px 96px;
  }

  .pgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* the diagram unrolls into a single column: label, card, connector, ... */
  .dia {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .dia > article,
  .dia > .acts {
    align-self: stretch;
  }

  .dia__col--2,
  .dia__col--4,
  .dia__col--6 {
    display: none;
  }

  .dia__col--1 { order: 1; margin-bottom: 2px; }
  .node--trigger { order: 2; }
  .wire--a { order: 3; }
  .dia__col--3 { order: 4; margin: 14px 0 2px; }
  .node--logic { order: 5; }
  .wire--b { order: 6; }
  .dia__col--5 { order: 7; margin: 14px 0 2px; }
  .acts { order: 8; }
  .wire--c { order: 9; }
  .dia__col--7 { order: 10; margin: 14px 0 2px; }
  .node--human { order: 11; }

  /* one vertical connector replaces the branching wires */
  .wire {
    height: 26px;
  }

  .wire > span {
    display: none;
  }

  .wire::after {
    content: "";
    position: absolute;
    left: 28px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--w-24);
  }

  .annos {
    grid-template-columns: 1fr 1fr;
    gap: 8px 28px;
    margin-top: 36px;
  }

  .anno {
    grid-column: auto;
  }

  .anno__arrow {
    display: none;
  }

  .anno__t {
    max-width: none;
  }

  .step,
  .axis {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .axis {
    gap: 0;
  }

  .axis > span:first-child {
    display: none;
  }

  .stub {
    display: none;
  }

  .sample {
    margin-inline: 0;
  }

  .plans {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .pillar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .cta {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px var(--gutter);
    border-radius: 22px;
  }

  .fnav {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

/* ================================================================= <=720px */

@media (max-width: 720px) {
  .pgrid,
  .annos,
  .fnav {
    grid-template-columns: 1fr;
  }

  .cta {
    padding: 40px 24px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   SUBPAGES — header CTA, page heroes, stages, forms, booking, confirmations.
   Everything below reuses the tokens and components defined above.
   ========================================================================== */

/* the header CTA is outlined so it does not compete with the accent pill
   in the hero directly beneath it */
.pill--nav {
  padding: 10px 19px;
  gap: 10px;
  border: 1px solid var(--ink-24);
  color: var(--ink);
  font-size: 14px;
}

@media (hover: hover) {
  .pill--nav:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
  }
}

.nav a[aria-current="page"] {
  color: var(--ink);
}

.navpanel a[aria-current="page"] {
  color: var(--accent);
}

/* ------------------------------------------------------------- PAGE HERO */

.phero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.phero__inner {
  position: relative;
  padding-block: 96px 88px;
}

.phero .h1 {
  max-width: 18ch;
  font-size: clamp(36px, 3.9vw, 58px);
}

.phero__lede {
  margin: 26px 0 0;
  max-width: 56ch;
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink-72);
}

/* ---------------------------------------------------------------- STAGES */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 0.46fr) minmax(0, 0.54fr);
  gap: 56px;
  align-items: start;
  padding: 44px 0;
  border-top: 1px solid var(--rule);
}

.stage--last {
  border-bottom: 1px solid var(--rule);
}

.stage__n {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--accent);
}

.stage__t {
  margin: 0 0 12px;
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.028em;
}

.stage__b {
  margin: 0;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-62);
}

.stage__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stage__list li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-72);
}

.stage__list li:last-child {
  border-bottom: 0;
}

.stage__list .sq {
  margin-top: 0.5em;
}

/* ------------------------------------------------------------ TICK LISTS */

.ticks {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.ticks li {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-72);
}

.ticks--lg li {
  font-size: 16.5px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.ticks--lg li:last-child {
  border-bottom: 0;
}

.ticks .sq {
  margin-top: 0.55em;
}

.ticks a {
  color: var(--accent);
  border-bottom: 1px solid rgba(186, 54, 1, 0.3);
}

/* ------------------------------------------------- NUMBERED NEXT-STEPS */

.next {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.next li {
  padding: 26px 26px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--sh-card);
}

.next__n {
  display: block;
  font-size: 12px;
  color: var(--ink-30);
}

.next__t {
  margin: 16px 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.next__b {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-62);
}

.steplist {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.steplist li {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-72);
}

.steplist li:last-child {
  border-bottom: 0;
}

.steplist__n {
  flex: 0 0 auto;
  padding-top: 0.2em;
  font-size: 12px;
  color: var(--accent);
}

/* ------------------------------------------------------------ QUESTIONS */

.qa {
  margin: 56px 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.qa__item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.qa__q {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.016em;
}

.qa__a {
  margin: 0;
  max-width: 62ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-62);
}

.plans__note {
  margin: 28px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-50);
}

/* -------------------------------------------------------- FOUNDER (long) */

.founder-lg {
  margin: 0;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  max-width: 940px;
}

.founder-lg__img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  filter: saturate(0.92);
}

.founder-lg__body p {
  margin: 0 0 20px;
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--ink-72);
}

.founder-lg__sig {
  margin: 26px 0 0;
  font-size: 14.5px;
  color: var(--ink-62);
}

.founder-lg__body .founder-lg__sig {
  margin: 26px 0 0;
  font-size: 14.5px;
}

.founder-lg__sig strong {
  font-weight: 700;
  color: var(--ink);
}

.bigquote {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.028em;
  text-wrap: pretty;
}

/* ----------------------------------------------------------------- PROSE */

.prose {
  max-width: 68ch;
}

.prose h2 {
  margin: 46px 0 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.prose h2:first-of-type {
  margin-top: 8px;
}

.prose p,
.prose li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-72);
}

.prose p {
  margin: 0 0 14px;
}

.prose ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.prose li {
  margin: 8px 0;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose .prose__meta {
  font-size: 13.5px;
  color: var(--ink-50);
}

/* ----------------------------------------------------------------- FORMS */

.bp2 {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 72px;
  align-items: start;
}

.bp2__h {
  max-width: 12ch;
}

.bp2__fine {
  margin: 22px 0 0;
  max-width: 44ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-50);
}

.bp2__fine a {
  color: var(--accent);
  border-bottom: 1px solid rgba(186, 54, 1, 0.3);
}

.formcard {
  padding: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--sh-card);
}

.formcard__h {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.formcard__b {
  margin: 10px 0 28px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-62);
}

.form {
  display: grid;
  gap: 22px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field__l {
  font-size: 14.5px;
  font-weight: 600;
}

.field__opt {
  font-weight: 500;
  color: var(--ink-45);
}

.field__hint {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-50);
}

.req {
  color: var(--accent);
}

.input,
.textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--page);
  color: var(--ink);
  font-family: inherit;
  font-size: 15.5px;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea {
  min-height: 118px;
  resize: vertical;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(186, 54, 1, 0.12);
}

.input--err {
  border-color: var(--accent);
}

.form__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.form__note {
  margin: 0;
  max-width: 48ch;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-50);
}

.form__note a,
.form__status a {
  color: var(--accent);
  border-bottom: 1px solid rgba(186, 54, 1, 0.3);
}

.form__status {
  margin: 0;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.55;
}

.form__status--err {
  background: rgba(186, 54, 1, 0.08);
  color: var(--accent);
}

.form__status--ok {
  background: rgba(11, 19, 43, 0.05);
  color: var(--ink-72);
}

.form__status[hidden] {
  display: none;
}

/* --------------------------------------------------------------- BOOKING */

/* the calendar takes the full content width — Cal.com's month view needs
   roughly 900px before it starts truncating the time-slot column, so the
   supporting copy sits underneath it rather than beside it */
.booking {
  display: block;
}

.booking__aside {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}

.booking__aside .ticks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 56px;
  max-width: 940px;
}

.booking__notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 56px;
  max-width: 940px;
}

.calwrap {
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--sh-card);
}

#cal-embed {
  width: 100%;
  min-height: 560px;
  overflow: auto;
}

.cal-fallback {
  margin: 18px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-62);
}

.cal-fallback a,
.booking__meta a,
.contact__aside a,
.details__v a {
  color: var(--accent);
  border-bottom: 1px solid rgba(186, 54, 1, 0.3);
  word-break: break-word;
}

.booking__h {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.018em;
}

.booking__meta {
  margin: 22px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-62);
}

/* --------------------------------------------------------- CONFIRMATIONS */

.confirmpage {
  padding-block: 88px 120px;
}

.confirm {
  max-width: 740px;
  padding: 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--sh-card);
}

.confirm__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 26px;
  border-radius: 12px;
  background: rgba(186, 54, 1, 0.1);
}

.confirm__mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.confirm__h {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.confirm__b {
  margin: 20px 0 0;
  max-width: 52ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-72);
}

.confirm__sub {
  margin: 38px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.016em;
}

.confirm__note {
  margin: 30px 0 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-50);
}

.confirm__note a {
  color: var(--accent);
  border-bottom: 1px solid rgba(186, 54, 1, 0.3);
}

/* --------------------------------------------------------------- CONTACT */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 72px;
  align-items: start;
}

.details {
  list-style: none;
  margin: 0;
  padding: 0;
}

.details li {
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}

.details li:first-child {
  padding-top: 0;
}

.details li:last-child {
  border-bottom: 0;
}

.details__k {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-50);
}

.details__v {
  margin: 10px 0 0;
  font-size: 17px;
  line-height: 1.65;
  font-style: normal;
  color: var(--ink-72);
}

.contact__aside {
  padding: 32px;
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: 16px;
}

/* ---------------------------------------------------------- CLOSING BAND */

.band {
  border-top: 1px solid var(--border);
  background: var(--tint);
}

.band__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
  padding-block: 76px;
}

.band__h {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.028em;
}

.band__b {
  margin: 16px 0 0;
  max-width: 48ch;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-62);
}

.band__cta {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

/* ---------------------------------------------------------------- FOOTER */

.footer__addr {
  margin: 18px 0 0;
  font-style: normal;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--w-60);
}

.footer__addr a {
  display: inline-block;
  margin-top: 10px;
  color: var(--w-72);
  border-bottom: 1px solid var(--w-24);
}

@media (hover: hover) {
  .footer__addr a:hover {
    color: #fff;
    border-bottom-color: #fff;
  }
}

/* ================================================================ <=1080px */

@media (max-width: 1080px) {
  .phero__inner {
    padding-block: 64px 60px;
  }

  .stage,
  .bp2,
  .contact,
  .band__inner,
  .founder-lg {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .founder-lg__img {
    width: 148px;
    height: 148px;
  }

  .next,
  .booking__aside .ticks,
  .booking__notes {
    grid-template-columns: 1fr;
  }

  .band__inner {
    padding-block: 56px;
  }

  .confirmpage {
    padding-block: 56px 88px;
  }
}

/* ================================================================= <=720px */

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

  .formcard,
  .confirm,
  .contact__aside {
    padding: 26px 22px;
  }

  .form__actions .pill {
    width: 100%;
  }

  #cal-embed {
    min-height: 560px;
  }
}

/* ==========================================================================
   THE AUTOMATION BLUEPRINT — animation
   Restored from the pre-redesign build and adapted to the navy section: the
   accent is #e8703f rather than brick, because brick does not carry on ink.

   CSS owns the timeline. Every animated element carries its own --t delay
   and abp.js only adds .is-building once, so nothing can drift.
   Start-states are scoped under .js — without scripting the diagram renders
   finished rather than invisible.
   ========================================================================== */

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* eased at both ends — used for anything that fades rather than travels,
     so glows rise and fall instead of switching */
  --ease-soft: cubic-bezier(0.33, 0, 0.2, 1);
}

/* ---- start states ------------------------------------------------------ */

.js .dia__col,
.js .node,
.js .node__list li,
.js .anno,
.js .dia__foot {
  opacity: 0;
  transform: translateY(8px);
}

.js .wire .w-h {
  transform: scaleX(0);
  transform-origin: left;
}

.js .wire .w-v {
  transform: scaleY(0);
  transform-origin: center;
}

/* ---- the build --------------------------------------------------------- */

.is-building .dia__col,
.is-building .node,
.is-building .node__list li,
.is-building .anno,
.is-building .dia__foot {
  opacity: 1;
  transform: none;
  transition: opacity 640ms var(--ease-soft) var(--t, 0s),
    transform 640ms var(--ease-out) var(--t, 0s);
}

.is-building .wire .w-h,
.is-building .wire .w-v {
  transform: none;
  transition: transform 580ms var(--ease-soft) var(--t, 0s);
}

/* ---- node states -------------------------------------------------------
   The glow is a pseudo-element rather than a box-shadow on the node itself,
   so it composes with the card's own inset highlight instead of fighting it.
   --abp-glow sets the hierarchy: logic reads strongest, then the actions,
   then the trigger, then human oversight. */

.workflow-node {
  position: relative;
  cursor: pointer;
  --abp-glow: 0.7;
  transition: border-color 520ms var(--ease-soft),
    background-color 520ms var(--ease-soft),
    transform 420ms var(--ease-soft);
}

.node--logic { --abp-glow: 1; }
.node--act { --abp-glow: 0.78; }
.node--trigger { --abp-glow: 0.6; }
.node--human { --abp-glow: 0.5; }

.workflow-node::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 0 0 1px rgba(232, 112, 63, calc(0.6 * var(--abp-glow))),
    0 12px 34px rgba(232, 112, 63, calc(0.22 * var(--abp-glow)));
  /* slow to fade out; the rule below makes it quick to arrive */
  transition: opacity 900ms var(--ease-soft);
}

.workflow-node.active::after,
.workflow-node.is-live::after,
.workflow-node:hover::after,
.workflow-node:focus-visible::after {
  transition-duration: 420ms;
}

@media (hover: hover) {
  .workflow-node:hover::after {
    opacity: 0.5;
  }
}

.workflow-node:focus-visible::after {
  opacity: 0.5;
}

.workflow-node.active::after,
.workflow-node.is-live::after {
  opacity: 1;
}

.workflow-node.active,
.workflow-node.is-live {
  border-color: rgba(232, 112, 63, 0.55);
  background: var(--w-09);
}

/* the lift waits for the build to settle so it cannot fight the entry
   transform */
.is-settled .workflow-node:hover,
.is-settled .workflow-node.active {
  transform: translateY(-2px);
}

/* ---- active indicator -------------------------------------------------- */

.node__pip {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-dark);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 760ms var(--ease-soft),
    transform 760ms var(--ease-soft);
}

.workflow-node.active .node__pip,
.workflow-node.is-live .node__pip {
  transition-duration: 380ms;
  transition-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
}

.workflow-node.active .node__pip,
.workflow-node.is-live .node__pip {
  opacity: 1;
  transform: none;
}

/* ---- connected wires brighten with the node ----------------------------
   data-focus is set by the controller, so the scripted play-through is
   guaranteed. :has() adds the same treatment on hover where supported, and
   simply does nothing where it is not. */

.wire .w-h,
.wire .w-v {
  transition: background-color 620ms var(--ease-soft), transform 580ms var(--ease-soft);
}

.dia[data-focus="trigger"] .wire--a span,
.dia[data-focus="logic"] .wire--a span,
.dia[data-focus="logic"] .wire--b span,
.dia[data-focus="act"] .wire--b span,
.dia[data-focus="act"] .wire--c span,
.dia[data-focus="human"] .wire--c span {
  background: rgba(232, 112, 63, 0.65);
}

@media (hover: hover) {
  .dia:has(.node--trigger:hover) .wire--a span,
  .dia:has(.node--logic:hover) .wire--a span,
  .dia:has(.node--logic:hover) .wire--b span,
  .dia:has(.node--act:hover) .wire--b span,
  .dia:has(.node--act:hover) .wire--c span,
  .dia:has(.node--human:hover) .wire--c span {
    background: rgba(232, 112, 63, 0.45);
  }
}

/* ---- one travelling dot per wire, only once the build has settled ------ */

.w-dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 4px;
  height: 4px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--accent-dark);
  opacity: 0;
  pointer-events: none;
}

.is-settled .w-dot {
  animation: abp-run 4.4s var(--ease-soft) infinite var(--t, 0s);
}

@keyframes abp-run {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  24%,
  76% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateX(var(--abp-travel, 52px));
  }
}

.wire--a .w-dot { --abp-travel: 52px; }
.wire--b .w-dot { --abp-travel: 64px; }
.wire--c .w-dot { --abp-travel: 64px; }

/* ---- reduced motion: show the finished diagram, move nothing ----------- */

@media (prefers-reduced-motion: reduce) {
  .js .dia__col,
  .js .node,
  .js .node__list li,
  .js .anno,
  .js .dia__foot {
    opacity: 1;
    transform: none;
  }

  .js .wire .w-h,
  .js .wire .w-v {
    transform: none;
  }

  .is-settled .w-dot,
  .w-dot {
    animation: none;
    opacity: 0;
  }

  .is-settled .workflow-node:hover,
  .is-settled .workflow-node.active {
    transform: none;
  }
}

/* on the stacked layout the wires are short vertical stubs, so the dots
   would travel sideways off them */
@media (max-width: 1080px) {
  .w-dot {
    display: none;
  }
}
