/* Mid-page CTA: the Clarabit dot grid as a live record, four tools feeding it. */
.cta { padding-top: clamp(96px, 12vw, 160px); }

.cta-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 13fr);
  /* Featured panel: gradient hairline (lit from above) + 1px top sheen. */
  border: 1px solid transparent;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(to bottom, rgb(255 255 255 / 0.018), rgb(255 255 255 / 0) 34%) padding-box,
    linear-gradient(var(--sidebar), var(--sidebar)) padding-box,
    linear-gradient(to bottom, rgb(255 255 255 / 0.12), rgb(255 255 255 / 0.03) 40%, var(--line)) border-box;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.045), var(--shadow-card);
  overflow: hidden;
  isolation: isolate;
}

.cta-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(40px, 5vw, 72px);
  padding-right: 0;
}
.cta-title { font-size: clamp(40px, 4.2vw, 56px); letter-spacing: -0.04em; line-height: 1; }
.cta-sub { margin-top: 14px; font-size: clamp(18px, 1.5vw, 21px); color: var(--body); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Buttons: the shared primary/ghost recipe lives in 01-hero.css (scoped to #top, #hero, #cta, #final). */

/* Stage: canvas (dots, connectors, packets) with crisp DOM logos and a popup chip on top. */
.cta-stage { position: relative; min-height: 440px; }
.cta-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.cta-tiles { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.cta-tile {
  position: absolute;
  left: clamp(20px, 3.2vw, 44px);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(-50%);
}
.cta-tile:nth-child(1) { top: 20%; }
.cta-tile:nth-child(2) { top: 40%; }
.cta-tile:nth-child(3) { top: 60%; }
.cta-tile:nth-child(4) { top: 80%; }

.cta-tile-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(to bottom, var(--raised), var(--card) 70%);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 1px 2px rgb(0 0 0 / 0.35);
  color: var(--ink);
}
/* "Sending" ring: opacity only, so the pulse stays on the compositor. */
.cta-tile-icon::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid var(--lime-line);
  box-shadow: 0 0 0 4px var(--lime-soft);
  opacity: 0;
  transition: opacity 520ms var(--ease);
}
.cta-tile.is-sending .cta-tile-icon::after { opacity: 1; transition-duration: 140ms; }

.cta-tile-name {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--sidebar);
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  white-space: nowrap;
}

/* Logos are the real SVGs used as masks, so they take the text colour on a dark ground. */
.cta-logo {
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.cta-logo-claude { -webkit-mask-image: url("../assets/ai/claude.svg"); mask-image: url("../assets/ai/claude.svg"); }
.cta-logo-openai { -webkit-mask-image: url("../assets/ai/openai.svg"); mask-image: url("../assets/ai/openai.svg"); }
.cta-logo-codex { -webkit-mask-image: url("../assets/ai/codex.svg"); mask-image: url("../assets/ai/codex.svg"); }
.cta-logo-claudecode { -webkit-mask-image: url("../assets/ai/claudecode.svg"); mask-image: url("../assets/ai/claudecode.svg"); }

/* Popup chip that reports what just landed in the record. Positioned by JS via transform. */
.cta-chip-anchor { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
.cta-chip {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: 10px;
  background: linear-gradient(to bottom, #20252c, var(--raised) 60%);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06), var(--shadow-overlay);
  font-size: 13px;
  line-height: 1.3;
  color: var(--body);
  white-space: nowrap;
  opacity: 0;
}
.cta-chip.is-on { opacity: 1; }
.cta-chip-av {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background-color: var(--id-indigo);
  color: var(--title);
}
.cta-chip-av .cta-logo { width: 14px; height: 14px; }
.cta-chip-av[data-logo="claude"] { background-color: var(--id-orange); }
.cta-chip-av[data-logo="openai"] { background-color: var(--id-green); }
.cta-chip-av[data-logo="codex"] { background-color: var(--id-indigo); }
.cta-chip-av[data-logo="claudecode"] { background-color: var(--id-amber); }
.cta-chip-who { color: var(--title); font-weight: 600; }
.cta-chip .cta-chip-ref { margin-left: 3px; font-size: 12px; }

@media (max-width: 880px) {
  .cta-panel { grid-template-columns: minmax(0, 1fr); }
  .cta-stage { order: -1; min-height: 260px; border-bottom: 1px solid var(--line); }
  .cta-copy { padding: 32px 24px 28px; }
  .cta-actions { margin-top: 28px; }
}
@media (max-width: 560px) {
  .cta-stage { min-height: 240px; }
  .cta-tile { left: 16px; }
  .cta-tile-name { display: none; }
  .cta-tile-icon { width: 36px; height: 36px; border-radius: 9px; }
  .cta-tile-icon .cta-logo { width: 18px; height: 18px; }
  .cta-chip-who { display: none; }
  .cta-actions .btn { flex: 1 1 auto; }
}
