/* Company Brain product page. Scoped to body.cb-page so the rest of the site is untouched.
   Ink and paper with one amber light: the glow of the box. */
@font-face {
  font-family: 'Instrument Serif';
  src: url('/fonts/instrument-serif-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.cb-page {
  --ink: #0D1524;
  --ink-2: #131E33;
  --paper: #EFE9DE;
  --paper-soft: rgba(239, 233, 222, 0.82);
  --mist: #A6AEBD;
  --amber: #F4B860;
  --rule: rgba(239, 233, 222, 0.13);
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  background: var(--ink);
  color: var(--paper);
}
.cb-page ::selection { background: var(--amber); color: var(--ink); }
.cb-page :focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.cb-page .nav { background: var(--ink); }
.cb-page .pill { background: var(--amber); color: var(--ink); }
.cb-page .footer { border-top: 1px solid var(--rule); padding-top: 48px; }

/* the constellation: fixed behind content, painted by js/company-brain.js */
#cb-net {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.cb-wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--pad); }
.cb-sec { padding-top: clamp(88px, 11vw, 150px); }
.cb-narrow { max-width: 720px; }

/* ---------- type ---------- */
.cb-h1, .cb-h2, .cb-h3, .cb-amount, .cb-step-n, .cb-hub-name, .cb-spoke-name {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--paper);
}
.cb-h1 {
  font-size: clamp(50px, 7.4vw, 100px);
  line-height: 0.98;
  letter-spacing: -0.012em;
  max-width: 11ch;
  text-wrap: balance;
}
.cb-h2 {
  font-size: clamp(38px, 4.8vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.008em;
  text-wrap: balance;
}
.cb-h3 { font-size: clamp(25px, 2.3vw, 30px); line-height: 1.12; }
.cb-page main p, .cb-page main dd, .cb-page main li {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 350;
  color: var(--paper-soft);
}
.cb-lede { max-width: 34em; margin-top: 28px; font-size: clamp(18px, 1.6vw, 21px) !important; color: var(--paper) !important; }
.cb-intro { margin-top: 22px; max-width: 38em; }
.cb-small { font-size: 15px !important; color: var(--mist) !important; max-width: 36em; }

.cb-crumb { font-size: 15px !important; color: var(--mist) !important; margin-bottom: 28px; }
.cb-crumb a { color: var(--mist); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.cb-crumb a:hover { color: var(--paper); }

/* ---------- actions ---------- */
.cb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin: 40px 0 18px; }
.cb-btn {
  display: inline-block;
  background: var(--amber);
  color: var(--ink);
  font: 600 16px/1 var(--font);
  padding: 18px 26px;
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(244, 184, 96, 0);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.cb-btn:hover { box-shadow: 0 0 36px 2px rgba(244, 184, 96, 0.35); transform: translateY(-1px); }
.cb-btn:active { transform: none; }
.cb-link {
  color: var(--paper);
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(244, 184, 96, 0.6);
  text-underline-offset: 6px;
}
.cb-link:hover { text-decoration-color: var(--amber); }

/* ---------- hero ---------- */
.cb-hero {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 24px;
  padding-top: clamp(40px, 7vw, 96px);
  min-height: min(82vh, 820px);
}
.cb-device { margin: 0; }
.cb-device svg { width: 100%; height: auto; overflow: visible; display: block; }
.cb-wires path { stroke: var(--amber); stroke-opacity: 0.55; stroke-width: 1.2; stroke-dasharray: 2 7; }
.cb-end-ring { fill: var(--ink-2); stroke: rgba(239, 233, 222, 0.22); }
.cb-end-fill { fill: var(--paper); fill-opacity: 0.8; }
.cb-end-stroke { fill: none; stroke: var(--paper); stroke-opacity: 0.8; stroke-width: 1.5; }

@media (prefers-reduced-motion: no-preference) {
  .cb-wires path { animation: cb-flow 2.4s linear infinite; }
  .cb-wires path:nth-child(2) { animation-duration: 3.1s; }
  .cb-wires path:nth-child(3) { animation-duration: 2.8s; }
  .cb-wires path:nth-child(4) { animation-duration: 3.4s; }
  .cb-glow, .cb-led-blur { animation: cb-breathe 5s ease-in-out infinite; transform-origin: 290px 290px; }
}
@keyframes cb-flow { to { stroke-dashoffset: -36; } }
@keyframes cb-breathe { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }

/* ---------- problem ---------- */
.cb-split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.cb-split > .cb-h2 { position: sticky; top: 110px; }
.cb-rows { border-top: 1px solid var(--rule); }
.cb-row { padding: 30px 0 34px; border-bottom: 1px solid var(--rule); }
.cb-row p { margin-top: 12px; max-width: 36em; }

/* ---------- steps (a real sequence) ---------- */
.cb-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
  margin-top: 56px;
  position: relative;
}
.cb-steps::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 33px;
  border-top: 1px solid rgba(244, 184, 96, 0.35);
}
.cb-steps li { position: relative; }
.cb-step-n {
  display: grid;
  place-items: center;
  width: 66px; height: 66px;
  border-radius: 50%;
  background: var(--ink);
  border: 1px solid rgba(244, 184, 96, 0.55);
  color: var(--amber);
  font-size: 34px;
  line-height: 1;
  margin-bottom: 28px;
  position: relative;
}
.cb-steps p { margin-top: 12px; }

/* ---------- features ---------- */
.cb-features { margin-top: 48px; border-top: 1px solid var(--rule); }
.cb-feature {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 20px clamp(32px, 6vw, 96px);
  padding: 30px 0 32px;
  border-bottom: 1px solid var(--rule);
}
.cb-feature dd { max-width: 38em; }

/* ---------- hub and spokes ---------- */
.cb-hub {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    ".    n    ."
    "w    core e"
    ".    s    .";
  gap: 40px 28px;
  align-items: center;
  margin-top: 64px;
}
.cb-hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cb-hub-lines line { stroke: var(--amber); stroke-opacity: 0.4; stroke-width: 1; stroke-dasharray: 3 6; }
@media (prefers-reduced-motion: no-preference) {
  .cb-hub-lines line { animation: cb-flow 3s linear infinite reverse; }
}
.cb-hub-core {
  grid-area: core;
  position: relative;
  text-align: center;
  padding: 46px 34px;
  border-radius: 28px;
  background: radial-gradient(120% 100% at 50% 0%, rgba(244, 184, 96, 0.16), rgba(244, 184, 96, 0) 70%), var(--ink-2);
  border: 1px solid rgba(244, 184, 96, 0.5);
  box-shadow: 0 0 80px rgba(244, 184, 96, 0.12);
}
.cb-hub-name { font-size: clamp(32px, 3.2vw, 44px) !important; line-height: 1.05 !important; color: var(--paper) !important; margin-bottom: 10px; }
.cb-hub-core p:not(.cb-hub-name) { font-size: 16px; color: var(--paper-soft); }
.cb-spoke {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 22px 24px;
  border-radius: 14px;
  background: var(--ink);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--paper-soft);
  font-size: 16px;
  line-height: 1.5;
  transition: border-color 0.2s ease;
}
.cb-spoke:hover { border-color: rgba(244, 184, 96, 0.6); }
.cb-spoke-name { font-size: 26px; line-height: 1.1; color: var(--paper); }
.cb-spoke-n { grid-area: n; }
.cb-spoke-e { grid-area: e; }
.cb-spoke-s { grid-area: s; }
.cb-spoke-w { grid-area: w; }

/* ---------- privacy panel ---------- */
.cb-panel {
  background: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: clamp(32px, 6vw, 72px);
}
.cb-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px clamp(32px, 5vw, 72px);
  margin-top: 48px;
}
.cb-facts dt { margin-bottom: 10px; }

/* ---------- a day with ---------- */
.cb-days {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 48px);
  margin-top: 56px;
}
.cb-day { border-top: 1px solid rgba(244, 184, 96, 0.45); padding-top: 26px; }
.cb-day-meta { font-size: 15px !important; color: var(--mist) !important; margin-top: 6px; }
.cb-times { list-style: none; margin-top: 26px; display: grid; gap: 20px; }
.cb-times li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; font-size: 16px !important; }
.cb-times time { color: var(--amber); font-variant-numeric: tabular-nums; font-weight: 500; padding-top: 1px; }

/* ---------- price tiers ---------- */
.cb-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
  align-items: stretch;
}
.cb-tier {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 40px);
  border-radius: 22px;
  background: var(--ink-2);
  border: 1px solid var(--rule);
}
.cb-tier-mid {
  border-color: rgba(244, 184, 96, 0.5);
  background: radial-gradient(100% 60% at 50% 0%, rgba(244, 184, 96, 0.13), rgba(244, 184, 96, 0) 70%), var(--ink-2);
}
.cb-tier-who { font-size: 15px !important; color: var(--mist) !important; margin-top: 4px; }
.cb-tier-spec { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 32px) !important; line-height: 1.1 !important; color: var(--amber) !important; margin: 26px 0 22px; }
.cb-scope { list-style: none; counter-reset: s; display: grid; gap: 12px; margin: 4px 0 8px; }
.cb-scope li { counter-increment: s; position: relative; padding-left: 34px; }
.cb-scope li::before { content: counter(s); position: absolute; left: 0; top: 1px; font-family: var(--serif); font-size: 22px; line-height: 1.2; color: var(--amber); }
.cb-tier p:last-child { font-size: 16px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--rule); }
.cb-tier-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  margin-top: 56px;
}
.cb-included { list-style: none; display: grid; gap: 12px; margin-top: 22px; }
.cb-included li { position: relative; padding-left: 32px; }
.cb-included li::before {
  content: "";
  position: absolute;
  left: 2px; top: 9px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: rotate(-45deg);
}
.cb-tier-notes { display: grid; gap: 16px; align-content: start; }
.cb-tier-notes .cb-btn { justify-self: start; margin-top: 10px; }

/* ---------- faq ---------- */
.cb-page .faq-list { margin-top: 44px; }
.cb-page .faq-list > li { border-color: var(--rule); }
.cb-page .faq-item > summary { font-family: var(--serif); font-size: clamp(24px, 2.4vw, 30px); color: var(--paper); }
.cb-page .faq-item > summary::after { color: var(--amber); }
.cb-page .faq-item > summary:hover { color: var(--amber); }
.cb-page .faq-a p { max-width: 40em; }

/* ---------- final cta + form ---------- */
.cb-final { padding-bottom: clamp(88px, 11vw, 150px); }
.cb-final > div { position: sticky; top: 110px; }
.cb-form {
  display: grid;
  gap: 6px;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: clamp(26px, 4vw, 44px);
}
.cb-form > label, .cb-choice legend { font-size: 15px; font-weight: 500; color: var(--paper); margin-top: 14px; }
.cb-form > label:first-child { margin-top: 0; }
.cb-form input[type=text], .cb-form input[type=email], .cb-form select {
  font: 350 17px/1.3 var(--font);
  color: var(--paper);
  background: var(--ink);
  border: 1px solid rgba(239, 233, 222, 0.2);
  border-radius: 10px;
  padding: 14px;
  width: 100%;
  transition: border-color 0.2s ease;
}
.cb-form select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--mist) 50%), linear-gradient(135deg, var(--mist) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.cb-form input:focus, .cb-form select:focus { outline: none; border-color: var(--amber); }
.cb-choice { border: 0; margin-top: 8px; display: grid; gap: 10px; }
.cb-choice legend { margin-bottom: 10px; padding: 0; }
.cb-choice label { display: flex; align-items: center; gap: 12px; font-size: 17px; color: var(--paper-soft); cursor: pointer; }
.cb-choice input { accent-color: var(--amber); width: 18px; height: 18px; }
.cb-form .cb-btn { margin-top: 24px; justify-self: start; }
.cb-page .form-note { font-size: 14px !important; color: var(--mist) !important; margin-top: 12px; }
.cb-page .form-note.err { color: var(--amber) !important; }
.cb-page .form-note.ok { color: var(--paper) !important; }
.cb-form.sent { opacity: 0.55; pointer-events: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .cb-hero { grid-template-columns: 1fr; min-height: 0; }
  .cb-device { max-width: 460px; margin: 8px auto 0; }
  .cb-split { grid-template-columns: 1fr; }
  .cb-split > .cb-h2, .cb-final > div { position: static; }
  .cb-steps { grid-template-columns: 1fr; gap: 36px; }
  .cb-steps::before { left: 33px; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1px solid rgba(244, 184, 96, 0.35); }
  .cb-steps li { padding-left: 92px; }
  .cb-step-n { position: absolute; left: 0; top: -6px; margin: 0; }
  .cb-feature { grid-template-columns: 1fr; }
  .cb-facts { grid-template-columns: 1fr; }
  .cb-days { grid-template-columns: 1fr; gap: 48px; }
  .cb-tiers, .cb-tier-foot { grid-template-columns: 1fr; }
  .cb-hub {
    grid-template-columns: 1fr;
    grid-template-areas: "core" "n" "e" "s" "w";
    gap: 16px;
    padding-left: 22px;
  }
  .cb-hub-lines { display: none; }
  .cb-hub::before {
    content: "";
    position: absolute;
    left: 0; top: 40px; bottom: 40px;
    border-left: 1px solid rgba(244, 184, 96, 0.4);
  }
  .cb-hub-core { text-align: left; padding: 30px 26px; }
}
@media (max-width: 520px) {
  .cb-page main p, .cb-page main dd, .cb-page main li { font-size: 17px; }
  .cb-actions { gap: 18px; }
  .cb-btn { width: 100%; text-align: center; }
  .cb-form .cb-btn { width: 100%; }
}
