/* === TOKENS ============================================================ */
:root {
  --bg:           #F4F6FB;
  --bg-elev:      #FFFFFF;
  --bg-elev-2:    #FAFBFE;
  --fg:           #0F1A2E;
  --fg-soft:      #5C6470;
  --muted:        #94A3B8;
  --accent:       #4593F8;
  --accent-deep:  #1E5BC6;
  --accent-soft:  rgba(69, 147, 248, 0.10);
  --success:      #10B981;
  --friction:     #F59E0B;
  --rule:         rgba(15, 26, 46, 0.08);
  --rule-strong:  rgba(15, 26, 46, 0.16);

  --ease-out-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-power3: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-back:       cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out:     cubic-bezier(0.65, 0, 0.35, 1);

  --max:    1200px;
  --pad:    clamp(1.25rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-lg: 22px;

  --type-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --type-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

/* === RESET ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--type-display);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-weight: 300;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: transparent; color: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-deep);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 200;
  border-radius: 0 0 8px 0;
  font-size: 0.9rem;
}
.skip-link:focus { top: 0; }
.anchor { display: block; height: 0; visibility: hidden; }

/* === TYPE ============================================================== */
h1, h2, h3, h4 {
  font-family: var(--type-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--fg);
  line-height: 1.04;
}
h2 { letter-spacing: -0.03em; }
h3 { letter-spacing: -0.02em; line-height: 1.15; }
p {
  margin: 0;
  color: var(--fg-soft);
  font-weight: 300;
}

.eyebrow {
  display: inline-block;
  font-family: var(--type-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.period { color: var(--accent-deep); display: inline-block; }
.nowrap { white-space: nowrap; }

.container {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
  width: 100%;
}

.section { position: relative; }
.section--anim { /* hooked by JS */ }

/* === BUTTONS =========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-family: var(--type-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-out-power3),
              background-color 0.18s ease,
              color 0.18s ease,
              border-color 0.18s ease,
              box-shadow 0.18s ease;
}
.btn--lg { padding: 0.95rem 1.5rem; font-size: 1rem; }
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 28px -12px rgba(69, 147, 248, 0.6);
}
.btn--primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 14px 36px -14px rgba(30, 91, 198, 0.6);
}
.btn--outline {
  background: var(--bg-elev);
  color: var(--fg);
  border-color: var(--rule-strong);
}
.btn--outline:hover {
  border-color: var(--accent-deep);
  color: var(--accent-deep);
}
.btn--ghost {
  background: transparent;
  color: var(--fg-soft);
  padding: 0.6rem 0.9rem;
}
.btn--ghost:hover { color: var(--fg); }

/* === NAV =============================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 246, 251, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav__inner {
  max-width: var(--max);
  margin-inline: auto;
  padding: 0.85rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--type-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.1rem;
  color: var(--fg);
}
.nav__brand img { width: 26px; height: 26px; }
.nav__links {
  display: flex;
  gap: 1.6rem;
  font-size: 0.95rem;
  color: var(--fg-soft);
  font-weight: 400;
}
.nav__links a { transition: color 0.15s ease; position: relative; }
.nav__links a:hover { color: var(--fg); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--accent-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-out-power3);
}
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cta { display: flex; gap: 0.5rem; align-items: center; }
@media (max-width: 880px) {
  .nav__links { display: none; }
}
@media (max-width: 560px) {
  .nav__cta .btn--ghost { display: none; }
}

/* === HERO ============================================================== */
.hero {
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 7vw, 5rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
}
.hero__content { max-width: 620px; }
.hero__content .eyebrow { margin-bottom: 1.2rem; }
.hero__title {
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  margin: 0 0 1.4rem;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.hero__sub {
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  color: var(--fg-soft);
  max-width: 560px;
  margin-bottom: 2rem;
  line-height: 1.55;
}
.hero__actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.4rem;
  font-family: var(--type-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--fg-soft);
}
.hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.hero__trust .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}
.hero__visual {
  min-height: 460px;
  position: relative;
}
@media (max-width: 960px) {
  .hero__visual { min-height: 380px; }
}

/* === SECTION HEAD ====================================================== */
.section__head {
  max-width: 740px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
.section__head .eyebrow { margin-bottom: 0.85rem; }
.section__head h2 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  margin-bottom: 0.85rem;
}
.section__sub {
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  color: var(--fg-soft);
  max-width: 620px;
  margin-inline: auto;
}

/* === PROBLEM =========================================================== */
.problem { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.problem .section__head { max-width: 820px; }
.problem__source {
  margin-top: 3.5rem;
  text-align: center;
  font-family: var(--type-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* === SOLUTION ========================================================== */
.solution { padding: clamp(3.5rem, 7vw, 6rem) 0; }

/* === JOBS ============================================================== */
.jobs { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.jobs__strip {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.jobs__strip:last-child { margin-bottom: 0; }
.jobs__strip--reverse .jobs__copy { order: 2; }
.jobs__strip--reverse .jobs__visual { order: 1; }
@media (max-width: 880px) {
  .jobs__strip,
  .jobs__strip--reverse {
    grid-template-columns: 1fr;
  }
  .jobs__strip--reverse .jobs__copy { order: 1; }
  .jobs__strip--reverse .jobs__visual { order: 2; }
}
.jobs__copy { max-width: 480px; }
.jobs__copy .eyebrow { margin-bottom: 0.75rem; }
.jobs__copy h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  margin-bottom: 0.85rem;
  font-weight: 800;
}
.jobs__copy p {
  font-size: 1.02rem;
  color: var(--fg-soft);
  line-height: 1.55;
}
.jobs__visual {
  position: relative;
  min-height: 360px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  box-shadow: 0 30px 70px -30px rgba(15, 26, 46, 0.16);
  overflow: hidden;
}

/* === INTEGRATION ======================================================= */
.integration {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--rule);
}
.integration__steps {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  position: relative;
}
@media (max-width: 880px) { .integration__steps { grid-template-columns: 1fr; } }
.integration-step {
  position: relative;
  padding: 1.75rem 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease-out-power3), border-color 0.2s ease, box-shadow 0.2s ease;
}
.integration-step:hover {
  transform: translateY(-2px);
  border-color: var(--rule-strong);
  box-shadow: 0 18px 40px -22px rgba(15, 26, 46, 0.16);
}
@media (min-width: 881px) {
  .integration-step:not(:last-child)::after {
    content: '→';
    position: absolute;
    top: 50%;
    right: -1rem;
    transform: translate(50%, -50%);
    color: var(--accent-deep);
    font-family: var(--type-display);
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1;
    pointer-events: none;
  }
}
.integration-step__num {
  display: inline-block;
  font-family: var(--type-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 1rem;
}
.integration-step__title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0 0 0.5rem;
}
.integration-step__desc {
  font-size: 0.92rem;
  color: var(--fg-soft);
  line-height: 1.5;
  margin: 0;
}
.integration-step__platforms {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.95rem;
  flex-wrap: wrap;
}
.integration-step__platform {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem 0.35rem 0.55rem;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--type-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.integration-step__platform svg { flex-shrink: 0; }
.integration-step__platform[data-platform="github"] svg { color: #181717; }
.integration-step__platform[data-platform="gitlab"] svg { color: #FC6D26; }
.integration-step__platform[data-platform="bitbucket"] svg { color: #2684FF; }
.integration-step__platform:hover {
  border-color: var(--rule-strong);
  background: var(--bg-elev-2);
}

.integration__time {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  padding: 0.4rem 0.85rem;
  background: var(--accent-soft);
  border-radius: 999px;
  font-family: var(--type-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
}
.integration__time svg { flex-shrink: 0; }

/* === FEATURES / CAPABILITIES =========================================== */
.features {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--rule);
}
.capabilities {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.45fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 880px) {
  .capabilities { grid-template-columns: 1fr; }
}
.capabilities__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.capability-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: background 0.22s ease, border-color 0.22s ease, padding 0.22s var(--ease-out-power3), box-shadow 0.22s ease;
  font: inherit;
  color: inherit;
}
.capability-item:hover,
.capability-item:focus-visible {
  background: var(--bg-elev);
  border-color: var(--rule);
  outline: none;
  padding: 0.7rem 0.95rem;
}
.capability-item.is-active {
  background: var(--bg-elev);
  border-color: var(--accent-deep);
  box-shadow: 0 10px 22px -18px rgba(30, 91, 198, 0.5);
  padding: 0.75rem 0.95rem;
}
.capability-item__title {
  font-family: var(--type-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
  color: var(--fg);
  transition: font-size 0.22s var(--ease-out-power3);
}
.capability-item:hover .capability-item__title,
.capability-item.is-active .capability-item__title {
  font-size: 0.95rem;
}
.capability-item__desc {
  font-size: 0.76rem;
  color: var(--fg-soft);
  line-height: 1.4;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.28s var(--ease-out-power3), opacity 0.22s ease, margin-top 0.28s var(--ease-out-power3);
}
.capability-item:hover .capability-item__desc,
.capability-item.is-active .capability-item__desc {
  max-height: 60px;
  opacity: 1;
  margin-top: 0.2rem;
}
.capabilities__stage {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.1rem;
  min-height: 360px;
  height: 100%;
  overflow: hidden;
}
.capability-preview {
  position: absolute;
  inset: 0;
  padding: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s var(--ease-out-power3), transform 0.28s var(--ease-out-power3);
  pointer-events: none;
}
.capability-preview.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.capability-preview[hidden] { display: flex; }

/* === Capability mockups ================================================= */
.cap-mock {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
}

/* Chat-style mock */
.cap-mock--chat {
  background: #F7F7F7;
  border-radius: 12px;
  box-shadow: 0 14px 32px -24px rgba(15, 26, 46, 0.32);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.cap-mock__header {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.cap-mock__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.cap-mock__avatar img {
  width: 13px;
  height: 13px;
}
.cap-mock__title {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.cap-mock__title strong {
  font-size: 0.82rem;
  font-weight: 700;
}
.cap-mock__title span {
  font-size: 0.66rem;
  opacity: 0.78;
}
.cap-mock__body {
  padding: 0.7rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: #F7F7F7;
}

.cap-msg {
  max-width: 86%;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--fg);
}
.cap-msg p { margin: 0; }
.cap-msg--in {
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}
.cap-msg--out {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}
.cap-msg--human {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.18);
}
.cap-handoff {
  align-self: center;
  font-size: 0.7rem;
  color: var(--fg-soft);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.cap-handoff strong { color: var(--fg); font-weight: 700; }
.cap-handoff__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

/* Pre-chat form fields */
.cap-field {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  font-size: 0.66rem;
  color: var(--fg-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.cap-field input,
.cap-field select {
  font: inherit;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: var(--fg);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 7px;
  padding: 0.4rem 0.55rem;
  width: 100%;
  pointer-events: none;
}
.cap-btn {
  margin-top: 0.15rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 0.5rem 0.8rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: default;
  pointer-events: none;
}

/* Interactive options + stars */
.cap-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  align-self: flex-start;
}
.cap-option {
  font: inherit;
  font-size: 0.74rem;
  background: #fff;
  border: 1px solid var(--accent);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  cursor: default;
  pointer-events: none;
}
.cap-stars {
  display: flex;
  gap: 0.2rem;
  align-self: flex-start;
  color: var(--rule-strong);
}
.cap-stars svg { width: 18px; height: 18px; }
.cap-stars .is-on { color: #F5B400; }

/* Markdown content */
.cap-msg--md {
  max-width: 92%;
}
.cap-msg--md p { margin: 0 0 0.32rem; }
.cap-msg--md p:last-child { margin-bottom: 0; }
.cap-msg--md ol {
  margin: 0.28rem 0 0.4rem 1rem;
  padding: 0;
  font-size: 0.76rem;
  line-height: 1.5;
}
.cap-msg--md li { margin-bottom: 0.1rem; }
.cap-msg--md code {
  font-family: var(--type-mono);
  font-size: 0.72rem;
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}
.cap-msg--md a {
  color: var(--accent-deep);
  text-decoration: underline;
}

/* File attachment */
.cap-msg--with-file {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.4rem;
}
.cap-file {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  color: #fff;
}
.cap-file__icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  flex-shrink: 0;
}
.cap-file__meta {
  display: flex;
  flex-direction: column;
  font-size: 0.72rem;
  line-height: 1.2;
}
.cap-file__meta strong { font-weight: 700; }
.cap-file__meta span { opacity: 0.82; font-size: 0.66rem; }
.cap-msg--with-file p { padding: 0 0.1rem; font-size: 0.78rem; }

/* Code mock */
.cap-mock--code {
  width: 100%;
  max-width: 420px;
  background: #0F1A2E;
  color: #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 40px -24px rgba(15, 26, 46, 0.55);
  position: relative;
}
.cap-mock__codebar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cap-mock__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #475569;
}
.cap-mock__dot[data-c="r"] { background: #FF5F56; }
.cap-mock__dot[data-c="y"] { background: #FFBD2E; }
.cap-mock__dot[data-c="g"] { background: #27C93F; }
.cap-mock__codepath {
  margin-left: 0.4rem;
  font-family: var(--type-mono);
  font-size: 0.66rem;
  color: #94A3B8;
}
.cap-code {
  margin: 0;
  padding: 0.75rem 0.95rem;
  font-family: var(--type-mono);
  font-size: 0.72rem;
  line-height: 1.55;
  white-space: pre;
  overflow-x: auto;
}
.cap-code__c { color: #64748B; font-style: italic; }
.cap-code__k { color: #C084FC; }
.cap-code__f { color: #60A5FA; }
.cap-code__s { color: #34D399; }
.cap-arrow {
  display: grid;
  place-items: center;
  color: var(--accent);
  padding: 0.3rem 0;
  background: rgba(255, 255, 255, 0.04);
}
.cap-arrow svg { width: 14px; height: 14px; }
.cap-mock__caption {
  padding: 0.6rem 0.95rem;
  background: #fff;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.78rem;
}
.cap-mock__caption strong { font-weight: 800; }
.cap-mock__caption span { color: var(--fg-soft); font-size: 0.72rem; }

/* Identity */
.cap-mock--identity { width: 100%; max-width: 460px; }
.cap-id {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.6rem;
}
.cap-id__card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.cap-id__card strong {
  font-family: var(--type-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.cap-id__card--anon {
  background: #FAFBFE;
  border-style: dashed;
}
.cap-id__card--user {
  border-color: var(--accent-deep);
  box-shadow: 0 10px 22px -18px rgba(30, 91, 198, 0.45);
}
.cap-id__pill {
  align-self: flex-start;
  font-family: var(--type-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-soft);
  background: var(--rule);
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
}
.cap-id__pill--verified {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}
.cap-id__meta {
  font-size: 0.66rem;
  color: var(--fg-soft);
}
.cap-id__events {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  font-size: 0.7rem;
  color: var(--fg-soft);
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
}
.cap-id__arrow {
  display: grid;
  place-items: center;
  color: var(--accent);
}
.cap-id__arrow svg { width: 18px; height: 18px; }

/* Brand control, live chat-widget mock that re-themes on swatch click */
.cap-mock--brand { width: 100%; max-width: 320px; text-align: center; }
.cap-brand {
  --brand-color: #4593F8;
  --brand-shadow: rgba(69, 147, 248, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  transition: --brand-color 0.3s ease;
}
.cap-brand[data-brand-theme="blue"]    { --brand-color: #4593F8; --brand-shadow: rgba(69, 147, 248, 0.28); }
.cap-brand[data-brand-theme="violet"]  { --brand-color: #7C3AED; --brand-shadow: rgba(124, 58, 237, 0.28); }
.cap-brand[data-brand-theme="emerald"] { --brand-color: #10B981; --brand-shadow: rgba(16, 185, 129, 0.28); }
.cap-brand[data-brand-theme="ink"]     { --brand-color: #0F1A2E; --brand-shadow: rgba(15, 26, 46, 0.32); }

.cap-brand__themes {
  display: flex;
  gap: 0.45rem;
}
.cap-brand__swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cap-brand__swatch[data-theme="blue"]    { background: #4593F8; }
.cap-brand__swatch[data-theme="violet"]  { background: #7C3AED; }
.cap-brand__swatch[data-theme="emerald"] { background: #10B981; }
.cap-brand__swatch[data-theme="ink"]     { background: #0F1A2E; }
.cap-brand__swatch:hover { transform: scale(1.1); }
.cap-brand__swatch.is-active {
  border-color: var(--fg);
  transform: scale(1.12);
}

/* Widget mock, header + body + input, all driven by --brand-color */
.cap-brand__chat {
  width: 100%;
  background: #F7F7F7;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: 0 14px 32px -22px var(--brand-shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}
.cap-brand__header {
  background: var(--brand-color);
  color: #fff;
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  transition: background 0.3s ease;
}
.cap-brand__avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-family: var(--type-display);
  font-weight: 800;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  letter-spacing: 0;
}
.cap-brand__title {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}
.cap-brand__title strong {
  font-size: 0.78rem;
  font-weight: 700;
}
.cap-brand__title span {
  font-size: 0.62rem;
  opacity: 0.78;
}
.cap-brand__body {
  padding: 0.65rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: #F7F7F7;
}
.cap-brand__msg {
  max-width: 85%;
  padding: 0.38rem 0.55rem;
  border-radius: 9px;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: left;
}
.cap-brand__msg p { margin: 0; }
.cap-brand__msg--in {
  background: #fff;
  border: 1px solid var(--rule);
  border-bottom-left-radius: 3px;
  align-self: flex-start;
  color: var(--fg);
}
.cap-brand__msg--out {
  background: var(--brand-color);
  color: #fff;
  border-bottom-right-radius: 3px;
  align-self: flex-end;
  transition: background 0.3s ease;
}
.cap-brand__input {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  background: #F7F7F7;
  border-top: 1px solid #E5E7EB;
}
.cap-brand__input-field {
  flex: 1;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.7rem;
  color: #9ca3af;
  text-align: left;
}
.cap-brand__send {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-color);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.3s ease;
}
.cap-brand__caption {
  font-size: 0.7rem;
  color: var(--fg-soft);
  line-height: 1.4;
  max-width: 260px;
}

@media (max-width: 880px) {
  .capabilities__stage { min-height: 380px; }
  .cap-id { grid-template-columns: 1fr; }
  .cap-id__arrow { transform: rotate(90deg); }
}

/* === STACK ============================================================= */
.stack {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  border-top: 1px solid var(--rule);
}
.stack-block { margin-top: 2.5rem; }
.stack-block + .stack-block { margin-top: 3.5rem; }
.stack-block__head { margin-bottom: 1.4rem; }
.stack-block__label {
  display: inline-block;
  font-family: var(--type-mono);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--accent-deep);
  text-transform: uppercase;
}
.stack-block__sub {
  margin-top: 0.45rem;
  color: var(--fg-soft);
  font-size: 0.95rem;
  max-width: 60ch;
}

.stack-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 720px) { .stack-channels { grid-template-columns: 1fr; } }

.channel-tile,
.integration-tile {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.5rem 1.3rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out-power3);
}
.channel-tile:hover,
.integration-tile:hover {
  border-color: var(--accent-deep);
  transform: translateY(-2px);
}
.channel-tile__logo,
.integration-tile__logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 32px;
  height: 32px;
  color: var(--fg);
}
.channel-tile__logo--img,
.integration-tile__logo {
  object-fit: contain;
}
.channel-tile__name,
.integration-tile__name {
  font-family: var(--type-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.channel-tile__role,
.integration-tile__role {
  font-size: 0.88rem;
  color: var(--fg-soft);
  line-height: 1.45;
}

.stack-marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.stack-marquee__track {
  display: flex;
  gap: 0.85rem;
  width: max-content;
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  animation: stack-marquee 32s linear infinite;
}
.stack-marquee:hover .stack-marquee__track,
.stack-marquee:focus-within .stack-marquee__track {
  animation-play-state: paused;
}
.stack-marquee .integration-tile {
  flex: 0 0 280px;
}
@keyframes stack-marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .stack-marquee__track { animation: none; }
}

/* === CTA =============================================================== */
.cta {
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(4rem, 9vw, 7rem);
}
.cta__card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(900px 500px at 50% -30%, rgba(69, 147, 248, 0.18), transparent 60%),
    var(--bg-elev);
  border: 1px solid var(--rule);
  box-shadow: 0 30px 70px -30px rgba(15, 26, 46, 0.18);
}
.cta__card .eyebrow { margin-bottom: 1rem; }
.cta__card h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  margin-bottom: 1rem;
  letter-spacing: -0.045em;
}
.cta__card p {
  font-size: 1.05rem;
  color: var(--fg-soft);
  max-width: 540px;
  margin: 0 auto 2rem;
}
.cta__now { color: var(--fg); }
.cta__actions {
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* === VIDEO MODAL ======================================================= */
.video-modal {
  border: 0;
  padding: 0;
  margin: auto;
  background: transparent;
  width: min(960px, calc(100vw - 2rem));
  max-width: 100%;
  color: #fff;
  overflow: visible;
}
.video-modal::backdrop {
  background: rgba(15, 26, 46, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.video-modal[open] { animation: video-modal-in 0.28s var(--ease-out-power3); }
.video-modal[open]::backdrop { animation: video-modal-fade 0.22s var(--ease-out-power3); }
@keyframes video-modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes video-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.video-modal__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55);
}
.video-modal__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-modal__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s var(--ease-out-power3);
}
.video-modal__close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.06);
}
@media (max-width: 700px) {
  .video-modal__close { top: -40px; }
}

/* === FOOTER ============================================================ */
.footer {
  border-top: 1px solid var(--rule);
  padding: 3rem 0 1.5rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 880px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
}
.footer__brand { display: flex; flex-direction: column; gap: 0.75rem; max-width: 320px; }
.footer__tag {
  font-size: 0.9rem;
  color: var(--fg-soft);
  line-height: 1.5;
}
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.92rem;
}
.footer__col h4 {
  font-family: var(--type-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 0.55rem;
}
.footer__col a {
  color: var(--fg-soft);
  transition: color 0.15s ease;
}
.footer__col a:hover { color: var(--fg); }
.footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--type-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

/* === MOTION (CSS-only) ================================================= */
@keyframes period-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.4); }
}
.hero__title .period {
  display: inline-block;
  transform-origin: center;
  animation: period-pulse 1.4s var(--ease-back) 0.35s 1 both;
  will-change: transform;
}

/* === LEGAL ============================================================= */
.legal {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5.5rem);
}
.legal__shell { width: 100%; }

.legal__head {
  max-width: 760px;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.legal__title {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.legal__updated {
  font-family: var(--type-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-soft);
  margin-top: 0.25rem;
}

.legal__layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 960px) {
  .legal__layout { grid-template-columns: 1fr; }
}

.legal__toc {
  position: sticky;
  top: 88px;
  border-left: 1px solid var(--rule);
  padding-left: 1.25rem;
  font-size: 0.88rem;
}
@media (max-width: 960px) {
  .legal__toc {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 1.25rem 0;
  }
}
.legal__toc-title {
  font-family: var(--type-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 0.85rem;
}
.legal__toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  counter-reset: none;
}
.legal__toc-list a {
  color: var(--fg-soft);
  transition: color 0.15s ease;
  line-height: 1.4;
}
.legal__toc-list a:hover { color: var(--accent-deep); }

.legal__content {
  max-width: 720px;
  font-size: 1rem;
  line-height: 1.7;
}
.legal__content p {
  margin: 0 0 1.1rem;
  color: var(--fg-soft);
}
.legal__content strong { color: var(--fg); font-weight: 800; }
.legal__content a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-color: rgba(30, 91, 198, 0.25);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}
.legal__content a:hover { text-decoration-color: var(--accent-deep); }

.legal__intro {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.25rem;
}

.legal__section {
  padding-top: 2.25rem;
  margin-bottom: 0.5rem;
}
.legal__section + .legal__section {
  border-top: 1px solid var(--rule);
}
.legal__section h2 {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 0 0 1rem;
  scroll-margin-top: 100px;
}
.legal__section h3 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 1.75rem 0 0.65rem;
}
.legal__section[id] { scroll-margin-top: 90px; }

.legal__lede {
  font-size: 1.05rem;
  color: var(--fg) !important;
  font-weight: 300;
  margin-bottom: 1.5rem !important;
}

.legal__short {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.85rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
  color: var(--fg) !important;
  margin: 0 0 1.4rem !important;
}
.legal__short strong {
  font-family: var(--type-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-right: 0.4rem;
}

.legal__list {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  list-style: disc;
  color: var(--fg-soft);
}
.legal__list li {
  margin-bottom: 0.55rem;
  padding-left: 0.25rem;
}
.legal__list li::marker { color: var(--accent); }

.legal__keys {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
}
.legal__keys dt {
  font-weight: 800;
  color: var(--fg);
  margin-top: 1rem;
  font-size: 0.98rem;
}
.legal__keys dd {
  margin: 0.3rem 0 0;
  color: var(--fg-soft);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
}
.legal__keys dd:last-child { border-bottom: 0; }

.legal__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 12px;
  margin: 1.25rem 0 1.75rem;
  background: var(--bg-elev);
}
.legal__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 560px;
}
.legal__table thead th {
  background: var(--bg-elev-2);
  color: var(--accent-deep);
  font-family: var(--type-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--rule);
}
.legal__table tbody th {
  text-align: left;
  vertical-align: top;
  font-weight: 800;
  color: var(--fg);
  padding: 0.85rem 1rem;
  width: 28%;
  font-size: 0.9rem;
}
.legal__table tbody td {
  vertical-align: top;
  padding: 0.85rem 1rem;
  color: var(--fg-soft);
}
.legal__table tbody tr + tr th,
.legal__table tbody tr + tr td {
  border-top: 1px solid var(--rule);
}
.legal__table tbody td:last-child {
  width: 90px;
  text-align: center;
}
.legal__badge {
  display: inline-block;
  font-family: var(--type-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 26, 46, 0.06);
  color: var(--fg-soft);
}
.legal__badge--yes {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.legal__address {
  font-style: normal;
  font-size: 0.95rem;
  color: var(--fg);
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  padding: 1rem 1.15rem;
  border-radius: 12px;
  line-height: 1.7;
  margin: 0.5rem 0 0.5rem;
  display: inline-block;
}

/* === REDUCED MOTION ==================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero__title .period { animation: none; transform: none; }
}
