/* CampaignOS — living landing.
   Layered on site.css tokens. Motion language: candlelight + threads of fate.
   Everything glows like embers; pulses travel along threads. */

:root {
  --c-item: #c9926a;
}

body {
  font-size: 14px;
  line-height: 1.7;
}

/* ── type scale ─────────────────────────────────────────── */
.h-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-size: clamp(44px, 7vw, 94px);
  margin: 0;
}
.h-display em,
.h-display em .w {
  font-style: normal;
  background: linear-gradient(115deg, var(--gold-bright) 10%, var(--c-loc) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.l-h2 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.12;
  margin: 0;
}
.l-h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.016em;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.18;
  margin: 0;
}
.l-body {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-2);
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow.muted {
  color: var(--text-3);
}
.eyebrow .tick {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}

.section {
  padding: 110px 0;
  position: relative;
}
.section-tight {
  padding: 70px 0;
  position: relative;
}

/* word-by-word headline reveal */
.h-display .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  filter: blur(14px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.7, 0.3, 1),
    filter 0.8s ease;
}
.h-display.go .w {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ── nav: transparent until scrolled ───────────────────── */
.nav.l-nav {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
  transition:
    background 0.25s,
    border-color 0.25s;
}
.nav.l-nav.scrolled {
  background: color-mix(in srgb, var(--bg-deep) 74%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--hairline);
}
/* .brand .mark.sig — переехал в общий site.css */

/* ── cursor glow ───────────────────────────────────────── */
#cursorGlow {
  position: fixed;
  left: 0;
  top: 0;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 90;
  mix-blend-mode: screen;
  will-change: transform;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.075), transparent 62%);
}

/* ── HERO ──────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 158px 0 110px;
}
#weave {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(58% 46% at 50% 30%, rgba(14, 13, 20, 0.55), transparent 70%);
}
.hero-candle {
  position: absolute;
  left: 50%;
  top: -14%;
  width: min(900px, 96vw);
  height: 700px;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    50% 50% at 50% 40%,
    rgba(var(--accent-rgb), 0.15),
    rgba(var(--accent-rgb), 0.04) 56%,
    transparent 72%
  );
  animation: candleFlicker 7s ease-in-out infinite;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 1060px;
}
.hero-inner .l-body {
  font-size: clamp(15.5px, 1.5vw, 18px);
  max-width: 56ch;
  margin: 26px auto 0;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 38px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

/* CTA sheen sweep */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 50%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-22deg);
  transition: left 0.55s ease;
  pointer-events: none;
}
.btn-primary:hover::after {
  left: 130%;
}

/* ── live app mock (the hero demo) ─────────────────────── */
.mock-stage {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 64px auto 0;
  padding: 0 28px;
}
.app-mock {
  text-align: left;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 70px 160px -42px rgba(0, 0, 0, 0.95),
    0 0 140px -30px rgba(var(--accent-rgb), 0.45);
}

.am-bar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--hairline);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}
.am-bar .tl {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  opacity: 0.9;
  flex: none;
}
.am-bar .tl.r {
  background: #e1685f;
}
.am-bar .tl.y {
  background: #e0b14e;
}
.am-bar .tl.g {
  background: #5fbe7e;
}
.am-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 13px;
  margin-left: 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-3);
  border: 1px solid transparent;
}
.am-tab.on {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-cool);
}
.am-addr {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-4);
  background: var(--surface-inset);
  border: 1px solid var(--hairline);
  padding: 4px 12px;
  border-radius: 999px;
}

.am-body {
  position: relative;
  display: grid;
  grid-template-columns: 212px 1fr 256px;
  min-height: 430px;
}

.am-tree {
  border-right: 1px solid var(--hairline);
  padding: 16px 10px;
  background: linear-gradient(180deg, var(--surface-1), transparent);
}
.am-tree-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-4);
  padding: 0 10px 10px;
}
.ti {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
}
.ti.group {
  color: var(--text-3);
  font-weight: 700;
  font-size: 11.5px;
  margin-top: 8px;
}
.ti.on {
  background: var(--surface-2);
  color: var(--text);
}
.ti .d {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cat, var(--accent));
  box-shadow: 0 0 7px -1px var(--cat, var(--accent));
  flex: none;
  margin-left: 12px;
}
.ti.flash {
  animation: tiFlash 1.4s ease-out both;
}
@keyframes tiFlash {
  0% {
    background: color-mix(in srgb, var(--c-lore) 26%, transparent);
    color: var(--text);
  }
  100% {
    background: transparent;
  }
}

.am-editor {
  padding: 24px 28px;
  font-size: 13px;
  line-height: 2;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.am-editor .mdm {
  color: var(--text-4);
}
.am-editor .mdh {
  color: var(--gold-bright);
  font-weight: 700;
}
.am-editor .lk {
  padding: 0 4px;
  border-radius: 5px;
}
.am-editor .lk-f {
  color: var(--c-faction);
  background: color-mix(in srgb, var(--c-faction) 12%, transparent);
}
.am-editor .lk-l {
  color: var(--c-loc);
  background: color-mix(in srgb, var(--c-loc) 12%, transparent);
}
.am-editor .lk-s {
  color: var(--c-scene);
  background: color-mix(in srgb, var(--c-scene) 12%, transparent);
}
.am-editor .lk-o {
  color: var(--c-lore);
  background: color-mix(in srgb, var(--c-lore) 12%, transparent);
}
.am-editor .caret {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: caretBlink 1.05s steps(1) infinite;
  border-radius: 1px;
}
.am-editor .ed-add {
  display: block;
  color: var(--emerald);
  background: rgba(95, 190, 140, 0.07);
  border-left: 2px solid rgba(95, 190, 140, 0.55);
  padding: 0 8px;
  margin: 3px 0;
  border-radius: 0 7px 7px 0;
  animation: edIn 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}
@keyframes edIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.am-copilot {
  border-left: 1px solid var(--hairline);
  padding: 16px 14px;
  background: linear-gradient(180deg, var(--surface-1), transparent);
}
.am-cop-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-bright);
  padding: 2px 4px 12px;
}
.am-cop-card {
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 14px 15px;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.45s,
    transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.am-cop-card.show {
  opacity: 1;
  transform: none;
}
.am-cop-card p {
  margin: 0 0 11px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text);
}
.am-cop-card p b {
  color: var(--c-lore);
  font-weight: 600;
}
.am-diff {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
}
.am-diff .add {
  color: var(--emerald);
  background: rgba(95, 190, 140, 0.08);
  border-radius: 5px;
  padding: 3px 7px;
}
.am-actions {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}
.am-actions button {
  appearance: none;
  border: 1px solid var(--border-cool);
  background: var(--surface-2);
  color: var(--text-2);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
}
.am-actions button.ok {
  background: linear-gradient(165deg, var(--accent-bright), var(--accent));
  color: #211603;
  border-color: transparent;
  font-weight: 700;
}
.am-accepted {
  display: none;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--emerald);
}
.am-cop-card.ok .am-actions {
  display: none;
}
.am-cop-card.ok .am-accepted {
  display: flex;
}

.am-status {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 34px;
  padding: 0 16px;
  border-top: 1px solid var(--hairline);
  font-size: 10.5px;
  color: var(--text-4);
}
.am-status .sp {
  flex: 1;
}
.am-status .lit {
  color: var(--accent-bright);
  transition: color 0.3s;
}

/* ── marquee ───────────────────────────────────────────── */
.mq-wrap {
  padding: 34px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.mq {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.mq-inner {
  display: flex;
  width: max-content;
  animation: mqSlide 42s linear infinite;
}
.mq:hover .mq-inner {
  animation-play-state: paused;
}
.mq-set {
  display: flex;
  align-items: center;
  flex: none;
}
.mq-item {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
  white-space: nowrap;
  padding: 0 18px;
}
.mq-d {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.8);
  flex: none;
}
@keyframes mqSlide {
  to {
    transform: translateX(-50%);
  }
}

/* ── STORY (sticky scrollytelling) ─────────────────────── */
.story-head {
  margin-bottom: 24px;
}
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 72px;
  align-items: start;
}

.story-steps {
  position: relative;
  padding: 4vh 0;
}
.spine {
  position: absolute;
  left: 21px;
  top: 5vh;
  bottom: 5vh;
  width: 2px;
  background: var(--hairline);
  border-radius: 2px;
}
.spine i {
  position: absolute;
  inset: 0;
  transform-origin: top;
  transform: scaleY(0);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.9), rgba(var(--accent-rgb), 0.25));
  border-radius: 2px;
}
.spine b {
  position: absolute;
  left: 50%;
  top: 0;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 14px 2px rgba(var(--accent-rgb), 0.8);
}

.step {
  position: relative;
  min-height: 76vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 76px;
}
.step .num {
  position: absolute;
  left: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-1);
  border: 1px solid var(--border-cool);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
  transition:
    color 0.4s,
    border-color 0.4s,
    box-shadow 0.4s,
    background 0.4s;
}
.step.on .num {
  color: var(--accent-bright);
  border-color: var(--border-strong);
  background: var(--surface-2);
  box-shadow: 0 0 22px -6px rgba(var(--accent-rgb), 0.7);
}
.step-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cat, var(--accent));
}
.step h3 {
  margin-bottom: 14px;
}
.step .l-body {
  max-width: 46ch;
}
.step-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.step-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}
.step-list .ic {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--cat, var(--accent));
  background: color-mix(in srgb, var(--cat, var(--accent)) 14%, var(--surface-inset));
  border: 1px solid color-mix(in srgb, var(--cat, var(--accent)) 28%, transparent);
}
.step-list b {
  color: var(--text);
  font-weight: 600;
}

.story-stick {
  position: sticky;
  top: calc(var(--nav-h) + 30px);
  height: calc(100vh - var(--nav-h) - 60px);
  min-height: 480px;
}
.panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(30px) scale(0.965);
  filter: blur(10px);
  transition:
    opacity 0.55s ease,
    transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1),
    filter 0.55s ease;
}
.story-grid[data-active="0"] .p0,
.story-grid[data-active="1"] .p1,
.story-grid[data-active="2"] .p2 {
  opacity: 1;
  transform: none;
  filter: none;
  pointer-events: auto;
}

/* panel windows */
.pwin {
  width: 100%;
  max-width: 560px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 50px 120px -36px rgba(0, 0, 0, 0.92),
    0 0 110px -28px rgba(var(--accent-rgb), 0.35);
}
.pwin-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 15px;
  border-bottom: 1px solid var(--hairline);
  font-size: 11px;
  color: var(--text-3);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}
.pwin-bar .rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--garnet);
  box-shadow: 0 0 10px var(--garnet);
  animation: pulse 1.8s ease-in-out infinite;
}
.pwin-body {
  padding: 20px;
}

/* p0 — creator chat */
.bub {
  border-radius: 12px;
  padding: 12px 15px;
  font-size: 13px;
  line-height: 1.6;
}
.bub.me {
  background: var(--surface-2);
  border: 1px solid var(--border-cool);
  color: var(--text);
  max-width: 86%;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.bub.ai {
  background: var(--surface-1);
  border: 1px solid var(--border-cool);
  margin-top: 12px;
  border-bottom-left-radius: 4px;
  color: var(--text-2);
}
.bub .diff {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.bub .diff span {
  color: var(--emerald);
  background: rgba(95, 190, 140, 0.08);
  border-radius: 6px;
  padding: 4px 9px;
}
.bub .acts {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}
.bub .a {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid var(--border-cool);
  color: var(--text-2);
}
.bub .a.ok {
  background: linear-gradient(165deg, var(--accent-bright), var(--accent));
  color: #211603;
  border-color: transparent;
  font-weight: 700;
}
.p0 .anim {
  opacity: 0;
  transform: translateY(14px);
}
.story-grid[data-active="0"] .p0 .anim {
  animation: stepUp 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.story-grid[data-active="0"] .p0 .anim:nth-child(2) {
  animation-delay: 0.35s;
}
@keyframes stepUp {
  to {
    opacity: 1;
    transform: none;
  }
}

/* p1 — graph */
.pg-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.pg-svg line {
  stroke: rgba(var(--accent-rgb), 0.25);
  stroke-width: 1.4;
  stroke-linecap: round;
}
.pg-svg .live {
  stroke: var(--c-lore);
  stroke-width: 2;
  stroke-dasharray: 6 9;
  animation: threadFlow2 1.5s linear infinite;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--c-lore) 70%, transparent));
}
.pg-node {
  animation: floaty 6.4s ease-in-out infinite;
}
.pg-node:nth-of-type(odd) {
  animation-duration: 7.4s;
  animation-delay: -2.2s;
}
.pg-node .halo {
  fill: var(--cat);
  opacity: 0.14;
}
.pg-node .core {
  fill: var(--cat);
  stroke: rgba(255, 255, 255, 0.2);
}
.pg-node .lbl {
  fill: var(--text-2);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  text-anchor: middle;
}
.pg-node.hub .ring {
  fill: none;
  stroke: var(--cat);
  stroke-width: 1.5;
  opacity: 0.4;
  transform-origin: 270px 160px;
  animation: hubPulse2 3.2s ease-out infinite;
}
.pg-node.hub .lbl {
  fill: var(--text);
  font-size: 14px;
  font-weight: 800;
}
@keyframes threadFlow2 {
  to {
    stroke-dashoffset: -30;
  }
}
@keyframes hubPulse2 {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  70%,
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* p2 — live session */
.feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
  line-height: 1.6;
}
.feed .fl {
  color: var(--text-2);
  opacity: 0;
  transform: translateY(12px);
}
.feed .fl b {
  font-weight: 600;
}
.feed .fl.roll {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-session);
  font-weight: 500;
}
.story-grid[data-active="2"] .feed .fl {
  animation: stepUp 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.story-grid[data-active="2"] .feed .fl:nth-child(2) {
  animation-delay: 0.3s;
}
.story-grid[data-active="2"] .feed .fl:nth-child(3) {
  animation-delay: 0.6s;
}
.sug {
  margin-top: 16px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  animation: none;
}
.story-grid[data-active="2"] .sug {
  animation:
    stepUp 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) 1s forwards,
    sugGlow2 3.4s ease-in-out 1.6s infinite;
}
.sug .h {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 8px;
}
.sug p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text);
}
.sug .chips {
  display: inline-block;
  margin-top: 10px;
  font-size: 10.5px;
  color: var(--text-3);
  background: var(--surface-inset);
  border: 1px solid var(--hairline);
  padding: 4px 9px;
  border-radius: 6px;
}
@keyframes sugGlow2 {
  0%,
  100% {
    box-shadow: var(--shadow-pop);
  }
  50% {
    box-shadow:
      var(--shadow-pop),
      0 0 30px -6px rgba(var(--accent-rgb), 0.55);
  }
}

/* ── feature grid w/ spotlight ─────────────────────────── */
.qa-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.qa-tile {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border-radius: 15px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  transition:
    transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1),
    border-color 0.25s;
}
.qa-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  background: radial-gradient(
    220px circle at var(--mx, 50%) var(--my, 0%),
    color-mix(in srgb, var(--cat) 17%, transparent),
    transparent 72%
  );
}
.qa-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--cat) 42%, var(--hairline));
}
.qa-tile:hover::before {
  opacity: 1;
}
.qa-tile .ic {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  color: var(--cat);
  background: color-mix(in srgb, var(--cat) 13%, var(--surface-inset));
  border: 1px solid color-mix(in srgb, var(--cat) 26%, transparent);
}
.qa-tile h3 {
  position: relative;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 7px;
}
.qa-tile p {
  position: relative;
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-3);
}

/* ── read-aloud scrub quote ────────────────────────────── */
.read-aloud {
  position: relative;
  border-left: 3px solid var(--c-scene);
  border-radius: 4px 16px 16px 4px;
  background: color-mix(in srgb, var(--c-scene) 7%, var(--surface-1));
  padding: 40px 46px;
}
.read-aloud .ra-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-scene);
}
.read-aloud .quote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: var(--text);
  margin: 0;
  text-wrap: pretty;
}
.quote .qw {
  color: var(--text-4);
  transition: color 0.3s ease;
}
.quote .qw.lit {
  color: var(--text);
}
.quote em {
  font-style: italic;
}
.quote em .qw.lit {
  color: var(--c-scene);
}
.read-aloud .ra-foot {
  margin-top: 22px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.dc-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-inset);
  border: 1px solid var(--hairline);
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.dc-chip b {
  color: var(--accent-bright);
  font-weight: 500;
}

/* ── final CTA ─────────────────────────────────────────── */
.final-cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 130px 28px 120px;
}
.final-cta .hero-candle {
  top: -22%;
  height: 600px;
}
.final-cta .sig {
  color: var(--accent);
  margin-bottom: 24px;
  display: inline-block;
  animation: floaty 5s ease-in-out infinite;
}
.final-cta .sig svg {
  width: 58px;
  height: 58px;
}
.final-cta .h-display {
  font-size: clamp(36px, 5vw, 64px);
}

/* ── lightbox ──────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  place-items: center;
  padding: 5vw;
  background: rgba(8, 7, 12, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.lightbox.open {
  display: grid;
  animation: fadeUp 0.25s ease both;
}
.lightbox .frame {
  width: min(1100px, 100%);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border-strong);
}
.lightbox .frame-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-inset);
}
.lightbox .frame-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lightbox .ph-note {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-4);
  background: rgba(14, 13, 20, 0.66);
  padding: 4px 9px;
  border-radius: 6px;
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* ── motion + reveal ───────────────────────────────────── */
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.reveal {
  opacity: 0;
}
.reveal.in {
  animation: fadeUp 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.pop {
  opacity: 0;
}
.pop.in {
  animation: popIn 0.42s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .hero-candle,
  .mq-inner,
  .final-cta .sig,
  .pg-node,
  .pg-svg .live,
  .pwin-bar .rec-dot,
  .am-editor .caret,
  .hg-node {
    animation: none !important;
  }
  .ambient-cv {
    display: none;
  }
  .reveal,
  .pop,
  .h-display .w,
  .feed .fl,
  .sug,
  .p0 .anim {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
  }
  .mock-stage {
    transform: none !important;
  }
  .quote .qw {
    color: var(--text);
  }
  .quote em .qw {
    color: var(--c-scene);
  }
}

/* ── responsive ────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero {
    padding: 124px 0 80px;
  }
  .story-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .story-stick {
    position: sticky;
    top: var(--nav-h);
    height: 46vh;
    min-height: 340px;
    order: -1;
    z-index: 5;
    background: linear-gradient(180deg, var(--bg-deep) 78%, transparent);
  }
  .pwin {
    max-width: 480px;
  }
  .step {
    min-height: 0;
    padding: 56px 0 56px 64px;
  }
  .spine {
    top: 0;
    bottom: 0;
    left: 17px;
  }
  .step .num {
    width: 36px;
    height: 36px;
  }
  .am-body {
    grid-template-columns: 1fr;
  }
  .am-tree {
    display: none;
  }
  .am-copilot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: min(270px, 84%);
    border: none;
    background: transparent;
    padding: 0;
  }
  .am-cop-head {
    display: none;
  }
  .qa-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .ambient-cv {
    display: none;
  }
  .section {
    padding: 72px 0;
  }
  .hero {
    padding: 110px 0 64px;
  }
  .hero-cta .btn-lg {
    height: 50px;
    padding: 0 20px;
    font-size: 15px;
  }
  .mock-stage {
    margin-top: 52px;
    padding: 0 16px;
  }
  .am-editor {
    padding: 18px;
    font-size: 12px;
  }
  .qa-grid {
    grid-template-columns: 1fr;
  }
  .read-aloud {
    padding: 28px 24px;
  }
  .wrap {
    padding: 0 18px;
  }
}

/* ═══ дополнения поверх макета (apps/site) ════════════════
   Полноценные окна: activity rail в hero, статус «Связано»,
   зацикленные демо-сцены story-панелей, тарифы и FAQ. */

/* activity rail в hero-окне */
.am-body {
  grid-template-columns: 52px 200px 1fr 256px;
}
.am-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 0;
  border-right: 1px solid var(--hairline);
  background: linear-gradient(180deg, var(--surface-1), var(--bg-deep));
}
.am-rail-sig {
  color: var(--gold-bright);
  margin-bottom: 10px;
}
.am-rail-sig svg {
  width: 22px !important;
  height: 22px !important;
}
.am-rail .ri {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--text-4);
}
.am-rail .ri.on {
  color: var(--accent-bright);
  background: rgba(var(--accent-rgb), 0.09);
}
.am-rail .ri.on::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.am-rail .ri.bottom {
  margin-top: auto;
}

/* статус-бар: связь и кредиты */
.am-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-3);
}
.am-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(95, 190, 140, 0.8);
}
.am-credits {
  color: var(--text-4);
}

/* вход элементов, добавляемых JS-циклами демо */
.jin {
  animation: stepUp 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.bub .acc {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--emerald);
}
#storyFeed .fl.jin {
  animation: stepUp 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
#storyFeed .fl.still {
  opacity: 1;
  transform: none;
  animation: none;
}
#storySug .sug.jin-sug {
  opacity: 0;
  animation:
    stepUp 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) forwards,
    sugGlow2 3.4s ease-in-out 0.8s infinite;
}
#storySug .sug.still {
  opacity: 1;
  transform: none;
  animation: none;
}
.p2 .pwin-body {
  display: flex;
  flex-direction: column;
  min-height: 260px;
}
.p2 .feed {
  flex: 1;
  justify-content: flex-end;
}

/* тарифы */
.plan .h3 {
  font-size: 18px;
}
.price-note {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  max-width: 60ch;
  margin: 34px auto 0;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 10px;
}
.faq-list details {
  border: 1px solid var(--border-cool);
  border-radius: var(--radius);
  background: var(--surface-1);
  padding: 0 20px;
  transition: border-color 0.2s;
}
.faq-list details[open] {
  border-color: var(--border-strong);
}
.faq-list summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary [data-ico] {
  margin-left: auto;
  color: var(--text-3);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-list details[open] summary [data-ico] {
  transform: rotate(180deg);
}
.faq-list details p {
  color: var(--text-2);
  font-size: 14px;
  margin: 0;
  padding-bottom: 18px;
  line-height: 1.7;
}

@media (max-width: 960px) {
  .am-rail {
    display: none;
  }
  .am-body {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .am-addr {
    display: none;
  }
  .am-credits {
    display: none;
  }
  .am-status {
    gap: 10px;
  }
  .am-status span {
    white-space: nowrap;
  }
  .am-status #amS2 {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ════ Живое демо в hero (demo-embed.js) ════════════════════════ */

.demo-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.55),
    0 70px 160px -42px rgba(0, 0, 0, 0.95),
    0 0 140px -30px rgba(var(--accent-rgb), 0.45);
}

/* fallback-мок заполняет окно, пока грузится iframe */
.demo-stage .app-mock {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}
.demo-stage .app-mock .am-body {
  flex: 1;
  min-height: 0;
}

.demo-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  z-index: 2;
}

.demo-stage.demo-on .demo-frame {
  opacity: 1;
  pointer-events: auto;
}

.demo-stage.demo-on .app-mock {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.demo-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition:
    color 0.18s ease,
    background 0.18s ease;
}
.demo-close:hover {
  color: var(--text);
  background: var(--surface-3);
}

/* развёрнутое состояние (FLIP: координаты ставит JS инлайном) */
.demo-stage.demo-expanded {
  z-index: 1200;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-pop);
  transition:
    top 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.demo-stage.demo-expanded .demo-close {
  display: inline-flex;
}
.demo-stage.demo-expanded .app-mock {
  visibility: hidden;
}
.demo-stage.demo-no-anim {
  transition: none;
}

.demo-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(10, 8, 14, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  /* без pointer-events: none невидимая подложка перехватывает клики всей страницы */
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.demo-backdrop.on {
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .demo-frame,
  .demo-stage.demo-on .app-mock,
  .demo-stage.demo-expanded,
  .demo-backdrop {
    transition: none;
  }
}

/* ── частицы-пылинки (атмосфера, landing-only, позади контента) ─ */
.ambient-cv {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: screen;
}
