@import url("assets/figma/v5/tokens.css");

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

:root {
  /* Linear Look: monochrome + 1 accent */
  --bg:           #08090a;
  --bg2:          #0f1012;
  --bg3:          #161719;
  --surface:      rgba(255, 255, 255, 0.03);
  --glass:        rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.06);
  --text:         rgba(255, 255, 255, 0.87);
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-dim:     rgba(255, 255, 255, 0.35);
  --accent:       #7c6aef;
  --accent-dim:   rgba(124, 106, 239, 0.15);
  --accent-glow:  rgba(124, 106, 239, 0.25);
  --cyan:         #14DEB8;
  --radius:       12px;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;   /* no horizontal page scroll (full-bleed visuals are clipped) */
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Critical first-screen guard.
 * Keep the hero usable even while the lower Figma-specific stylesheet is still
 * being parsed or if a browser falls back on form/link defaults. The detailed
 * v2 rules below intentionally override these baseline values. */
.navv2-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 15px 30px;
  pointer-events: none;
}

.navv2 {
  width: 100%;
  max-width: 1440px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  pointer-events: auto;
}

.navv2-left,
.navv2-right,
.navv2-center {
  min-width: 0;
  display: flex;
  align-items: center;
}

.navv2-link,
.navv2-brand-link,
.navv2-cta,
.btn {
  color: #fff;
  text-decoration: none;
}

.navv2-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.navv2-lang {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: transparent;
}

.herov2 {
  position: relative;
  isolation: isolate;
  padding: 191px 30px 0;
  background: #080807;
  overflow-x: clip;
}

.herov2-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 92px;
  width: min(100%, 1440px);
  min-width: 0;
  margin: 0 auto;
}

.herov2-text {
  min-width: 0;
  max-width: 755px;
}

.herov2-title {
  max-width: 100%;
  margin: 0;
  color: #fff;
  font: var(--title-medium, 400 80px/80px "Golos Text", "Manrope", sans-serif);
}

.herov2-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 1080px) {
  .herov2 { padding: 100px 20px 0; }
  .herov2-main {
    flex-direction: column;
    gap: 40px;
    width: 100%;
  }
  .herov2-text { max-width: 100%; }
}

@media (max-width: 600px) {
  .herov2 { padding: 80px 0 0; }
  .herov2-main { padding: 20px 30px 0; }
  .herov2-title {
    font-size: 30px;
    line-height: 1.22;
  }
}

/* scroll-snap removed — caused issues with free scrolling on mobile */

/* ═══════════════ GRAIN OVERLAY ═══════════════ */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px;
}

/* ═══════════════ DOT GRID ═══════════════ */

.dot-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

/* ═══════════════ AMBIENT GLOW ═══════════════ */

/* ═══════════════ UTILITY ═══════════════ */

.gradient-text {
  background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.4) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.accent-gradient-text {
  background: linear-gradient(135deg, #a78bfa 0%, var(--accent) 50%, #14DEB8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.section-sub {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ═══════════════ NAVBAR (Raycast-style floating pill) ═══════════════ */

.navbar-wrap {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 100%;
  max-width: 1100px;
  padding: 16px 0 0;
  display: flex;
  justify-content: center;
}

.navbar {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: linear-gradient(137deg, rgba(17, 18, 20, 0.75) 5%, rgba(12, 13, 15, 0.9) 76%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-logo { width: 22px; height: 22px; }

.navbar-brand {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.2px;
}
.navbar-brand-link {
  color: inherit;
  text-decoration: none;
}
.navbar-brand-link:hover {
  text-decoration: underline;
}

.navbar-center {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar-link {
  color: #9c9c9d;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding: 8px 8px;
  border-radius: 6px;
  transition: color 0.2s ease-in-out;
  white-space: nowrap;
}
.navbar-link:hover { color: #fff; }

.lang-switcher {
  display: flex;
  gap: 2px;
  padding: 2px;
}

.lang-link {
  color: #9c9c9d;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
  letter-spacing: 0.2px;
}
.lang-link:hover { color: #fff; }
.lang-link.active { color: #fff; background: rgba(255, 255, 255, 0.08); }

.navbar-cta {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.9);
  color: #0d0d0d;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: background-color 0.2s;
  white-space: nowrap;
}
.navbar-cta:hover {
  background: rgba(255, 255, 255, 1);
}

/* ═══════════════ HERO ═══════════════ */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 7rem;
}

/* ═══════════════ APP MOCKUP BACKGROUND ═══════════════ */

.hero-app-bg {
  position: absolute;
  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);
  width: 1400px;
  height: 860px;
  border-radius: 16px;
  overflow: hidden;
  opacity: 0.2;
  filter: blur(0.7px);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 50%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 50%, transparent 80%);
}

.app-mock {
  display: flex;
  width: 100%;
  height: 100%;
  background: #202226;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.app-mock-workspaces {
  width: 72px;
  background: #1a1b1e;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.app-mock-ws-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}

.app-mock-ws-divider {
  width: 24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

.app-mock-ws-add {
  background: rgba(255, 255, 255, 0.06) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 18px;
  font-weight: 300;
}

.app-mock-sidebar {
  width: 300px;
  background: #202226;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 8px;
  flex-shrink: 0;
  overflow: hidden;
}

.app-mock-search {
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 16px;
}

.app-mock-section-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  margin-bottom: 4px;
}

.app-mock-channel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  white-space: nowrap;
}

.app-mock-channel.active {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.app-mock-hash {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 500;
}

.app-mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.app-mock-call-icon {
  font-size: 11px;
  opacity: 0.5;
}

.app-mock-badge {
  margin-left: auto;
  background: #e04060;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.app-mock-bot-tag {
  font-size: 9px;
  font-weight: 700;
  background: rgba(124, 106, 239, 0.2);
  color: #a78bfa;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 2px;
}

/* ── Threads panel ── */

.app-mock-threads {
  flex: 1;
  background: #1a1b1e;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  min-width: 0;
  overflow: hidden;
}

.app-mock-tcard {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.app-mock-tcard-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: default;
}

.app-mock-tcard-header .app-mock-hash {
  font-size: 13px;
}

.app-mock-tcard-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  flex: 1;
}

.app-mock-tcard-dots {
  color: rgba(255, 255, 255, 0.2);
  font-size: 16px;
}

.app-mock-tcard-msgs {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-mock-tcard-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.app-mock-tcard-replies {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  white-space: nowrap;
}

.app-mock-tcard-input {
  flex: 1;
  height: 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.app-mock-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #202226;
  min-width: 0;
}

.app-mock-header {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  gap: 6px;
  flex-shrink: 0;
}

.app-mock-header-hash {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 400;
}

.app-mock-messages {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.app-mock-msg {
  display: flex;
  gap: 10px;
}

.app-mock-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.app-mock-msg-avatar-img {
  overflow: hidden;
  padding: 0;
}
.app-mock-msg-avatar-img img { width: 100%; height: 100%; object-fit: cover; }

.app-mock-msg-avatar-bot {
  background: rgba(124, 106, 239, 0.15);
  border: 1px solid rgba(124, 106, 239, 0.2);
  overflow: hidden;
  padding: 0;
}
.app-mock-msg-avatar-bot img { width: 100%; height: 100%; object-fit: cover; }

.app-mock-msg-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2px;
}

.app-mock-msg-time {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.25);
  margin-left: 6px;
}

.app-mock-msg-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
}

.app-mock-input {
  height: 52px;
  margin: 0 16px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  flex-shrink: 0;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: -0.01em;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 1100px;
  width: 100%;
}

.hero-text {
  flex: 1;
  text-align: left;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(124, 106, 239, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #a78bfa;
  margin-bottom: 2rem;
  letter-spacing: 0.01em;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-headline {
  font-size: 3.8rem;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  white-space: nowrap;
  margin-bottom: 1.5rem;
  position: relative;
  color: var(--text);
}

.text-bright {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #fff;
  background-clip: unset;
}


.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--text-dim);
  max-width: 460px;
  margin-bottom: 2.5rem;
  font-weight: 400;
  line-height: 1.5;
}

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

.hero-chat {
  flex-shrink: 0;
  width: 540px;
  position: relative;
}

/* Glow behind chat for glass effect visibility */
.hero-chat::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 90%;
  background: radial-gradient(ellipse, rgba(10, 10, 14, 0.7) 0%, rgba(10, 10, 14, 0.5) 30%, rgba(124, 106, 239, 0.12) 50%, transparent 70%);
  filter: blur(50px);
  z-index: 0;
  pointer-events: none;
}

.hero-chat > .chat-window {
  position: relative;
  z-index: 1;
}

/* ═══════════════ APP-STYLE CHAT WINDOW ═══════════════ */

.chat-window--app {
  display: flex;
  flex-direction: column;
  min-height: 400px;
  height: 560px;
  background: linear-gradient(137deg, rgba(17, 18, 20, 0.75) 5%, rgba(12, 13, 15, 0.9) 76%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
}

.chat-header--thread {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-header-thread-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
}

.chat-header-channel {
  color: var(--accent);
  font-weight: 600;
}

.chat-header-dots {
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: default;
  line-height: 1;
}

.chat-messages--app {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}
.chat-messages--app::-webkit-scrollbar { display: none; }

/* Hero messages animate in */
.hero-msg {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-msg.msg-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Bot message subtle highlight */
.msg-bot .msg-body {
  position: relative;
}

/* Send flash animation */
@keyframes send-flash {
  0% { transform: scale(1); }
  50% { transform: scale(0.85); }
  100% { transform: scale(1); }
}
.chat-send-btn.sending {
  animation: send-flash 0.25s ease;
}

/* Input field active state */
.chat-input-field.typing {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

/* ═══════════════ CHAT INPUT BAR ═══════════════ */

.chat-input-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
}

.chat-input-field {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 10px 14px;
  height: 38px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-family: inherit;
  line-height: 1.5;
  position: relative;
  white-space: nowrap;
  overflow-x: scroll;
  overflow-y: hidden;
  scrollbar-width: none;
}

.chat-input-placeholder {
  color: var(--text-dim);
  pointer-events: none;
}

.chat-input-field::-webkit-scrollbar { display: none; }

.chat-input-field .mention {
  color: var(--accent);
  font-weight: 600;
}

.chat-input-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.chat-input-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-tool-icon {
  color: var(--text-dim);
  font-size: 0.78rem;
  cursor: default;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 600;
  opacity: 0.5;
}

.chat-tool-divider {
  width: 1px;
  height: 14px;
  background: var(--glass-border);
  margin: 0 2px;
}

.chat-send-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--text-dim);
  cursor: default;
  transition: all 0.2s;
}

.chat-send-btn.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* ═══════════════ TYPING INDICATOR ═══════════════ */

.typing-indicator {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}
.typing-indicator span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: typing-dot 1.2s ease-in-out infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

.msg-text .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--text-dim);
  margin-left: 1px;
  animation: blink-cursor 0.6s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink-cursor {
  50% { opacity: 0; }
}

/* ═══════════════ BUTTONS ═══════════════ */

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  transition: all 0.2s ease;
  box-shadow: 0 0 20px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.1);
  border: none;
  cursor: pointer;
}
.cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px var(--accent-glow), 0 4px 20px rgba(124, 106, 239, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.cta-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  transition: all 0.2s ease;
  border: 1px solid var(--glass-border);
  cursor: pointer;
}
.cta-btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
}

/* ═══════════════ PAIN ═══════════════ */

.pain {
  position: relative;
  z-index: 1;
  padding: 8rem 2rem 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 3rem;
}

.pain-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.pain-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.pain-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  margin-bottom: 1.2rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

.pain-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.pain-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ═══════════════ PIVOT ═══════════════ */

.pivot {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
  text-align: center;
}

.pivot-line {
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin-bottom: 4rem;
}

/* ═══════════════ FLOW SHOWCASE ═══════════════ */

.flow-showcase {
  max-width: 1100px;
  margin: 0 auto;
}

.flow-app-window {
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(137deg, rgba(17, 18, 20, 0.75) 5%, rgba(12, 13, 15, 0.9) 76%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
}

/* macOS title bar */
.flow-titlebar {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 10px;
}

.flow-titlebar-dots {
  display: flex;
  gap: 7px;
}

.flow-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.flow-dot-red { background: #ff5f57; }
.flow-dot-yellow { background: #febc2e; }
.flow-dot-green { background: #28c840; }

.flow-titlebar-title {
  font-size: 0.6875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  flex: 1;
  text-align: center;
  margin-right: 50px;
}

.flow-app {
  display: flex;
  height: 580px;
}

/* Workspaces bar — 80px in real app */
.flow-ws {
  width: 64px;
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  flex-shrink: 0;
}

.flow-ws-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

/* Sidebar — ControlBackground */
.flow-sidebar {
  width: 190px;
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
}

.flow-sidebar-search {
  height: 3rem;
  display: flex;
  align-items: center;
  padding: 0.375rem 1rem 0.375rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.flow-sidebar-search::after {
  content: '';
  display: block;
  width: 100%;
  height: 1.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.flow-sidebar-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  line-height: 123%;
  letter-spacing: -0.006em;
  padding: 0.5rem 0.75rem 0.25rem;
}

.flow-sidebar-ch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  min-height: 2rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 140%;
  letter-spacing: -0.006em;
  white-space: nowrap;
  margin: 0 4px;
}
.flow-sidebar-ch.active {
  background: rgba(255, 255, 255, 0.05);
}

.flow-ch-hash {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
  font-size: 0.875rem;
}
.flow-ch-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.flow-sidebar-ai {
  font-size: 0.6875rem;
  font-weight: 500;
  background: rgba(124, 106, 239, 0.15);
  color: #a78bfa;
  padding: 0 0.375rem;
  border-radius: 25px;
  line-height: 1rem;
}

/* Thread side — PrimaryBackground */
.flow-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.flow-thread-header {
  height: 3rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: -0.006em;
  line-height: 123%;
}

.flow-thread-hash { color: rgba(255, 255, 255, 0.25); font-weight: 400; }

.flow-thread-badge {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0 0.375rem;
  border-radius: 25px;
  background: rgba(13, 148, 231, 0.12);
  color: #0D94E7;
  line-height: 1rem;
  margin-left: auto;
}

.flow-app-window {
  text-align: left;
}

.flow-thread-messages {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  scrollbar-width: none;
}
.flow-thread-messages::-webkit-scrollbar { display: none; }

/* Flow panel — ControlBackground */
.flow-panel {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
}

.flow-panel-header {
  height: 3rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.flow-panel-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  line-height: 123%;
  letter-spacing: -0.006em;
}

.flow-panel-badge {
  font-size: 0.6875rem;
  font-weight: 500;
  min-width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  background: rgba(153, 153, 153, 0.2);
  color: #999;
  padding: 0 0.375rem;
}

.flow-panel-feed {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.flow-panel-feed::-webkit-scrollbar { display: none; }

.flow-empty {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.875rem;
  text-align: center;
  padding-top: 3rem;
}

/* Flow card — matches FlowCard.tsx exactly */
.flow-card {
  padding: 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.4s ease, background 0.05s;
  max-height: 400px;
  opacity: 1;
  transform: translateX(0);
}
.flow-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

.flow-card.entering {
  opacity: 0;
  max-height: 0;
  transform: translateX(20px);
}

.flow-card.exiting {
  opacity: 0;
  max-height: 0;
  transform: translateX(-200px);
}

.flow-card-inner {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border-left: 0.25rem solid #F9951E;
  box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.flow-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1rem;
  min-height: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  justify-content: space-between;
}

.flow-card-top-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.flow-card-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 0.5px solid rgba(255, 255, 255, 0.06);
}
.flow-card-avatar img { width: 100%; height: 100%; object-fit: cover; }

.flow-card-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  line-height: 123%;
  letter-spacing: -0.006em;
  word-break: break-word;
}

.flow-card-dismiss {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.875rem;
  cursor: pointer;
  width: 2rem;
  height: 1.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
  margin: -0.25rem -0.25rem 0 0;
  transition: background 0.05s;
}
.flow-card-dismiss:hover { background: rgba(255, 255, 255, 0.05); }

.flow-card-body {
  padding: 0.5rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flow-card-summary {
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  line-height: 140%;
  letter-spacing: -0.006em;
}

.flow-card-meta {
  font-size: 0.6875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  line-height: 130%;
  letter-spacing: 0.005em;
}

.flow-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.flow-action-btn {
  height: 1.875rem;
  padding: 0 0.75rem;
  border-radius: 6px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.05s;
  line-height: 1.875rem;
  letter-spacing: -0.006em;
}
.flow-action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.flow-action-btn.selected {
  background: rgba(13, 148, 231, 0.15);
  color: #0D94E7;
}

@media (max-width: 800px) {
  .flow-ws, .flow-sidebar { display: none; }
  .flow-app { height: auto; flex-direction: column; }
  .flow-app-window { border-radius: 10px; }
  .flow-thread { min-height: 300px; }
  .flow-panel { width: 100%; border-left: none; border-top: 1px solid rgba(255,255,255,0.06); min-height: 200px; }
}

/* ═══════════════ USE CASES ═══════════════ */

.use-cases {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
  max-width: 1100px;
  margin: 0 auto;
}

.case-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 2.5rem;
  padding: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.case-tab {
  padding: 9px 20px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: -0.01em;
}
.case-tab:hover {
  color: var(--text-secondary);
}
.case-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 600;
}

.case-panel {
  display: none;
}
.case-panel.active {
  display: flex;
  align-items: center;
  gap: 3rem;
  animation: caseIn 0.35s ease;
}

@keyframes caseIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.case-headline {
  flex: 1;
  text-align: left;
  margin-bottom: 0;
  order: 2;
}

.case-panel .chat-window {
  flex: 1.2;
  min-width: 0;
  order: 1;
}

.case-headline h3 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.case-headline p {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1.4;
}

/* ═══════════════ CHAT WINDOW ═══════════════ */

.chat-window {
  background: var(--bg2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 20px 60px rgba(0,0,0,0.4);
}

/* App-style overrides base chat-window */
.chat-window.chat-window--app {
  background: linear-gradient(137deg, rgba(17, 18, 20, 0.75) 5%, rgba(12, 13, 15, 0.9) 76%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.15);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
}

.chat-header:not(.chat-header--thread) {
  background: var(--bg3);
  border-bottom: 1px solid var(--glass-border);
}

.chat-header-logo { width: 20px; height: 20px; opacity: 0.7; }

.chat-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex: 1;
  letter-spacing: -0.01em;
}

.chat-thread-badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-dim);
  color: #a78bfa;
  font-weight: 500;
}

.chat-messages {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-msg {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.chat-msg.msg-visible {
  opacity: 1;
  transform: translateY(0);
}

.msg {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.msg-body {
  min-width: 0;
  overflow: hidden;
}

.msg-avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-user {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

.avatar-user-img {
  overflow: hidden;
  padding: 0;
}
.avatar-user-img img { width: 100%; height: 100%; object-fit: cover; }

.avatar-bot {
  background: var(--accent-dim);
  border: 1px solid rgba(124, 106, 239, 0.2);
  overflow: hidden;
  padding: 0;
}
.avatar-bot img { width: 100%; height: 100%; object-fit: cover; }

.msg-meta { font-size: 0.8rem; margin-bottom: 3px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.msg-meta strong { color: var(--text); font-weight: 600; }
.msg-time { color: var(--text-dim); font-weight: 400; font-size: 0.68rem; }
.msg-ai-tag {
  font-size: 0.6rem;
  font-weight: 700;
  background: rgba(124, 106, 239, 0.15);
  color: #a78bfa;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.msg-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.mention { color: var(--accent); font-weight: 600; }

code {
  background: rgba(124, 106, 239, 0.08);
  color: #a78bfa;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: var(--font-code);
}

.msg-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.msg-image {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.msg-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.msg-link {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(20, 222, 184, 0.1);
  color: var(--accent);
  border: 1px solid rgba(20, 222, 184, 0.2);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
}
.msg-link:hover {
  background: rgba(20, 222, 184, 0.18);
  border-color: rgba(20, 222, 184, 0.35);
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 600;
}
.tag-jira { background: rgba(124, 106, 239, 0.1); color: #a78bfa; }
.tag-pr { background: rgba(20, 222, 184, 0.08); color: var(--cyan); }
.tag-deploy { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); }
.tag-review { background: rgba(124, 106, 239, 0.1); color: #a78bfa; }

/* ═══════════════ FEATURES (BENTO) ═══════════════ */

.features {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
  margin-top: 3rem;
}

.feature-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2.2rem;
  transition: border-color 0.3s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

/* Bento: first card spans full width */
.feature-card:first-child {
  grid-column: 1 / -1;
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 400px;
}

/* ═══════════════ METRICS ═══════════════ */

.metrics {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 1px;
  padding: 5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.metric {
  text-align: center;
  flex: 1;
  padding: 2rem 1.5rem;
  position: relative;
}

.metric + .metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--glass-border);
}

.metric-value {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  display: inline;
}

.metric-unit {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.metric-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ═══════════════ PROOF SECTION ═══════════════ */

.proof {
  position: relative;
  z-index: 1;
  padding: 8rem 0 12rem;
  max-width: 1100px;
  margin: 0 auto;
}

.proof-layout {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 100%;
}

.proof-text {
  flex: 1;
  text-align: left;
}

.proof-text .section-title {
  text-align: left;
}

.proof-subtitle {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-top: 1rem;
}

.proof-chat {
  flex: 1.2;
  min-width: 0;
}

.proof-chat .chat-window {
  text-align: left;
}

/* ═══════════════ CTA SECTION ═══════════════ */

.cta-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 8rem 2rem 6rem;
}

.cta-quote {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 2.5rem;
  letter-spacing: -0.03em;
}

/* ═══════════════ FOOTER ═══════════════ */

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.78rem;
  border-top: 1px solid var(--glass-border);
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.footer-logo-icon { width: 20px; height: 20px; opacity: 0.7; }

/* ═══════════════ SCROLLBAR ═══════════════ */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }

/* ═══════════════ RESPONSIVE ═══════════════ */

@media (max-width: 800px) {
  .hero-app-bg { display: none; }
  .navbar-wrap { padding: 8px 8px 0; }
  .navbar { height: 48px; padding: 0 12px; border-radius: 12px; }
  .navbar-brand { font-size: 12px; }
  .navbar-center { gap: 4px; }
  .navbar-link { font-size: 12px; padding: 6px 4px; }
  .navbar-cta { display: none; }
  .lang-link { font-size: 11px; padding: 3px 6px; }

  .hero { padding: 5rem 1rem 2rem; }
  .hero-headline { font-size: 2.8rem; white-space: normal; }
  .hero-content {
    flex-direction: column;
    gap: 1.5rem;
  }
  .hero-text { text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; font-size: 0.9rem; }
  .hero-scroll-hint { font-size: 1rem; position: static; margin-top: 1.5rem; }
  .hero-chat { width: 100%; max-width: 100%; }
  .hero-chat::before { display: none; }

  /* Force left-align inside all chat windows on mobile */
  .chat-window, .chat-window * { text-align: left; }
  .chat-input-bar, .chat-input-bar * { text-align: left; }
  .chat-messages--app { text-align: left; }

  /* Prevent chat windows from growing beyond container */
  .chat-window--app { width: 100%; max-width: 100%; overflow: hidden; }
  .case-panel .chat-window { max-width: 100%; }
  .proof-chat .chat-window { max-width: 100%; }
  .msg-text { word-break: break-word; overflow-wrap: break-word; }

  /* Hide flow showcase on mobile */
  .flow-showcase { display: none; }

  .pain-grid { grid-template-columns: 1fr; }

  .use-cases { padding: 6rem 1.5rem; }
  .proof { padding: 6rem 1.5rem; }

  .case-panel.active {
    flex-direction: column;
    gap: 1.5rem;
  }
  .case-headline {
    text-align: center;
    order: 1;
  }
  .case-headline h3 { font-size: 1.4rem; }
  .case-headline p { font-size: 0.85rem; }
  .case-panel .chat-window {
    order: 2;
  }
  .case-tabs { flex-direction: column; gap: 4px; padding: 4px; width: auto; margin: 0 0 2.5rem 0; }
  .case-tab { width: 100%; text-align: center; }

  .proof-layout {
    flex-direction: column;
    gap: 1.5rem;
  }
  .proof-text { text-align: center; }
  .proof-text .section-title { text-align: center; }
  .proof-chat { width: 100%; max-width: 100%; overflow: hidden; }

  .chat-window--app { height: 420px; min-height: 420px; }

  .features-grid { grid-template-columns: 1fr; }
  .feature-card:first-child { grid-column: 1; }

  .metrics {
    flex-direction: column;
    gap: 0;
    padding: 3rem 2rem;
  }
  .metric + .metric::before {
    top: 0;
    left: 20%;
    width: 60%;
    height: 1px;
  }
}

@media (max-width: 480px) {
  .hero { padding: 4.5rem 0.75rem 2rem; }
  .hero-headline { font-size: 2.2rem; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .cta-btn, .cta-btn-ghost { width: 100%; justify-content: center; }
  .metric-value, .metric-unit { font-size: 2rem; }

  .pivot { padding: 4rem 1rem; }
  .pivot-line { font-size: 1.4rem; }
  .flow-showcase { padding: 0 0.5rem; }

  .section-title { font-size: 1.5rem; }
  .cta-quote { font-size: 1.6rem; }
}

/* ═══════════════ REDUCED MOTION ═══════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════════════════════════ */
/* ═══════════════ FIGMA REDESIGN — v2 styles ═══════════════════ */
/* ═══════════════════════════════════════════════════════════════ */

:root {
  --fg-blue:        #3886ed;
  --fg-bg:          #080807;
  --fg-bg-card:    #0f0f0f;
  --fg-border:     #232323;
  --fg-grad-pink:  #ff7ed0;
  --fg-grad-cyan:  #86daff;
  --fg-purple:     rgba(54, 29, 61, 0.44);
}

/* ─── Navbar v2 ─── */

.navv2-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 15px 30px;
  pointer-events: none;
}

.navv2 {
  width: 100%;
  max-width: 1440px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  pointer-events: auto;
}

.navv2-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 285px;       /* Figma 1:475 — fixed width 285px */
  width: 285px;
  min-width: 0;
  transition: opacity .35s ease, visibility .35s;
}

/* Brand block hides once the page scrolls away from the top (class set in
   main.js). The box keeps its width so the centered links and the right
   CTA don't shift. */
.navv2-wrap--scrolled .navv2-left {
  opacity: 0;
  visibility: hidden;
}

/* Figma 3539:4070 — Y-mark, 14×26 container with intrinsic 14×17.33 SVG */
.navv2-logo { width: 14px; height: 26px; object-fit: contain; }

.navv2-brand {
  font: var(--body-medium);  /* Figma body/medium = Inter Regular 16/24 */
  color: #fff;
}

.navv2-brand-link {
  color: inherit;
  text-decoration: none;
}

.navv2-center {
  position: relative;
  display: flex;
  gap: 35px;
  align-items: center;
  /* Figma 3539:4083 OverlayBlur — exactly 599×40 incl. border */
  box-sizing: border-box;
  width: 599px;
  height: 40px;
  padding: 10px 20px;
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  background: transparent;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  isolation: isolate;
}
.navv2-center::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("assets/figma/v5/noise.png");
  background-size: 128px 128px;
  background-position: top left;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

.navv2-link {
  font: var(--body-base);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.navv2-link:hover { opacity: 0.7; }

.navv2-link--ext {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.navv2-arrow {
  display: inline-block;
  width: 17px;
  height: 17px;
  color: currentColor;
  flex-shrink: 0;
}

.navv2-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 285px;       /* Figma 1:519 — fixed width 285px */
  width: 285px;
  min-width: 0;
  justify-content: flex-end;
}

.navv2-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 175px;
  height: 40px;
  padding: 12px 20px;
  border-radius: 10px;
  background: #232323;
  color: #fff;
  font: var(--body-base);
  text-decoration: none;
  white-space: nowrap;
  isolation: isolate;
  transition: filter 0.2s;
}
/* Figma layer stack, bottom → top: Glow (blurred, bleeds out) → Stroke (sharp rim)
   → Fill (dark face) → label. Three paint slots above the shell need a real child. */
.navv2-cta-glow {
  /* Figma "Glow" (3539:4116) — blurred radial bleeding outside the left edge */
  position: absolute;
  inset: 0 1px 0 -1px;
  border-radius: inherit;
  background: radial-gradient(44.74px 15.67px at 18.64px 22.22px, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
  filter: blur(6px);
  z-index: -3;
}
.navv2-cta::before {
  /* Figma "Stroke" (3539:4117) — sharp radial, visible only on the rim around the Fill */
  content: "";
  position: absolute;
  inset: 0 1px 0 -1px;
  border-radius: inherit;
  background: radial-gradient(85.52px 16.12px at 18.64px 22.22px, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
  z-index: -2;
}
.navv2-cta::after {
  /* Figma "Fill" (3539:4118) — dark face inset 1/2/1/0 over Glow+Stroke */
  content: "";
  position: absolute;
  inset: 1px 2px 1px 0;
  border-radius: inherit;
  background: #0f0f0f;
  z-index: -1;
}
.navv2-cta:hover { filter: brightness(1.15); }
.navv2-cta > span,
.navv2-cta { z-index: 0; }

.navv2-lang {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;  /* Figma 3539:4122 — justify-center */
  gap: 5px;
  box-sizing: border-box;
  width: 75px;
  height: 40px;
  padding: 9px 9px 9px 13px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid #232323;
  color: #fff;
  font: var(--body-small);
  cursor: pointer;
  transition: background 0.2s;
}
.navv2-lang:hover { background: rgba(255,255,255,0.04); }

.navv2-chevron {
  display: inline-block;
  width: 17px;
  height: 17px;
  color: currentColor;
  flex-shrink: 0;
}

/* ─── Mobile hamburger + menu overlay (Figma mobile 3598:1292) ─── */
/* Hidden on desktop; the ≤640 block below reveals the burger + RU pill and
   hides the inline CTA. */
.navv2-burger {
  display: none;
  position: relative;
  width: 26px;
  height: 25px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.navv2-burger span {
  position: absolute;
  left: 3px;
  width: 20px;                       /* Figma Menu vectors = 20px */
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.navv2-burger span:nth-child(1) { top: 6px; }
.navv2-burger span:nth-child(2) { top: 12px; }
.navv2-burger span:nth-child(3) { top: 18px; }
/* burger → X when the menu is open */
.navv2-wrap--menu-open .navv2-burger span:nth-child(1) { top: 12px; transform: rotate(45deg); }
.navv2-wrap--menu-open .navv2-burger span:nth-child(2) { opacity: 0; }
.navv2-wrap--menu-open .navv2-burger span:nth-child(3) { top: 12px; transform: rotate(-45deg); }

.navv2-menu {
  display: none;                     /* desktop: never shown */
}

/* ─── Hero v2 ─── */

.herov2 {
  position: relative;
  isolation: isolate;
  /* Figma Container: Navbar 0..70, Hero 191..650.
   * Nav is position:fixed, so it doesn't push hero. Hero needs top padding
   * 191 = 70 (nav height) + 121 (Figma gap from nav-bottom to Hero-top). */
  padding: 191px 30px 0;
  background: #080807;
  font-family: var(--font-body);
  /* clip horizontal full-bleed overflow but let the bottom gradient bleed down
   * into .rolesv2 so it fades to dark instead of hard-cutting at the boundary. */
  overflow-x: clip;
  overflow-y: visible;
}

.herov2-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.herov2-stars {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1.2px 1.2px at 6% 8%,   rgba(255,255,255,0.85) 50%, transparent 100%),
    radial-gradient(1px 1px   at 12% 18%,  rgba(255,255,255,0.7)  50%, transparent 100%),
    radial-gradient(1px 1px   at 22% 4%,   rgba(255,255,255,0.55) 50%, transparent 100%),
    radial-gradient(1.4px 1.4px at 28% 32%, rgba(255,255,255,0.75) 50%, transparent 100%),
    radial-gradient(1px 1px   at 38% 12%,  rgba(255,255,255,0.6)  50%, transparent 100%),
    radial-gradient(1px 1px   at 44% 28%,  rgba(255,255,255,0.5)  50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 50% 6%,  rgba(255,255,255,0.7)  50%, transparent 100%),
    radial-gradient(1px 1px   at 56% 20%,  rgba(255,255,255,0.55) 50%, transparent 100%),
    radial-gradient(1.4px 1.4px at 64% 38%, rgba(255,255,255,0.8)  50%, transparent 100%),
    radial-gradient(1px 1px   at 70% 14%,  rgba(255,255,255,0.6)  50%, transparent 100%),
    radial-gradient(1.6px 1.6px at 78% 6%, rgba(255,255,255,0.9)  50%, transparent 100%),
    radial-gradient(1px 1px   at 86% 22%,  rgba(255,255,255,0.55) 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 94% 32%, rgba(255,255,255,0.7)  50%, transparent 100%),
    radial-gradient(1px 1px   at 8% 44%,   rgba(255,255,255,0.5)  50%, transparent 100%),
    radial-gradient(1px 1px   at 18% 52%,  rgba(255,255,255,0.55) 50%, transparent 100%),
    radial-gradient(1.4px 1.4px at 32% 60%, rgba(255,255,255,0.7)  50%, transparent 100%),
    radial-gradient(1px 1px   at 48% 56%,  rgba(255,255,255,0.5)  50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 60% 68%, rgba(255,255,255,0.65) 50%, transparent 100%),
    radial-gradient(1px 1px   at 72% 50%,  rgba(255,255,255,0.55) 50%, transparent 100%),
    radial-gradient(1.6px 1.6px at 88% 72%, rgba(255,255,255,0.85) 50%, transparent 100%),
    radial-gradient(1px 1px   at 4% 76%,   rgba(255,255,255,0.5)  50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 14% 88%, rgba(255,255,255,0.7)  50%, transparent 100%),
    radial-gradient(1px 1px   at 26% 80%,  rgba(255,255,255,0.55) 50%, transparent 100%),
    radial-gradient(1px 1px   at 40% 92%,  rgba(255,255,255,0.55) 50%, transparent 100%),
    radial-gradient(1.4px 1.4px at 54% 86%, rgba(255,255,255,0.75) 50%, transparent 100%),
    radial-gradient(1px 1px   at 68% 94%,  rgba(255,255,255,0.6)  50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 82% 86%, rgba(255,255,255,0.7)  50%, transparent 100%),
    radial-gradient(1px 1px   at 96% 96%,  rgba(255,255,255,0.55) 50%, transparent 100%);
  background-size: 100% 100%;
  opacity: 0.95;
}

.herov2-grad-purple {
  position: absolute;
  top: -200px;
  left: -200px;
  width: 1400px;
  height: 1400px;
  background: radial-gradient(circle, rgba(59, 36, 74, 0.85) 0%, rgba(33, 22, 40, 0.6) 35%, rgba(21, 15, 24, 0.3) 60%, transparent 80%);
  filter: blur(60px);
}

/* Figma 3539:4166 "Gradient Bottom-down" + 3539:4167 "Gradient Bottom-right".
 * Both span the full 1920×1600 Main frame and render ON TOP of the mockup with
 * NORMAL alpha blend (matching Figma sibling stacking — later siblings paint on
 * top). px offsets are measured from the section top, which equals Figma Main
 * y=0: the navbar is position:fixed so .herov2 starts at the page top. */
.herov2-glow-blue {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  top: 0;
  bottom: 0;
  z-index: 1;
  /* Cool blue radial glow biased to the LEFT (the "blue → magenta" diagonal).
   * Macket peak ≈rgb(30,90,154) at left, falling to ~113 toward the right; the
   * glow is alpha ~0.6 (not solid #2080ff). Pixel radii: wide horizontally so it
   * spans the width with a gentle left→right falloff, narrow vertically (band). */
  background: radial-gradient(1850px 210px at 230px 1410px,
    rgba(32, 128, 255, 0.62) 0%,
    rgba(32, 128, 255, 0.40) 46%,
    rgba(32, 128, 255, 0.14) 78%,
    rgba(32, 128, 255, 0) 100%);
  pointer-events: none;
}

.herov2-glow-magenta {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  top: 0;
  bottom: 0;
  z-index: 2;
  /* Warm magenta-purple radial in the bottom-right (the warm end of the
   * diagonal). Macket peak ≈rgb(76,60,130) at y≈1330 on the right edge — so the
   * glow centers higher than the very corner. Colour pulled slightly off pure
   * magenta toward Figma's measured pink-purple (less red, a touch more green). */
  background: radial-gradient(1080px 400px at 100% 1380px,
    rgba(150, 44, 196, 0.38) 0%,
    rgba(100, 30, 132, 0.17) 52%,
    rgba(54, 29, 61, 0) 100%);
  pointer-events: none;
}

/* Figma 3539:4172 "Gradient Bottom-down" — the DARK CAP painted ON TOP of the
 * blue+magenta: transparent at 1324px → solid page-dark #080807 at 1588px. This
 * mutes the bright blue to the muted band seen in the macket and returns the
 * section to dark by ~1588px, giving a seamless handoff to the dark Roles
 * section at 1600 (no abrupt cut). */
.herov2-glow-cap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  top: 0;
  bottom: 0;
  z-index: 3;
  /* The glows now carry their own falloff (radial alpha), so the cap only needs
   * to guarantee a clean dark return below the band → seamless handoff to the
   * dark Roles section at 1600. Starts below the blue peak so it doesn't mute it. */
  background: linear-gradient(to bottom,
    rgba(8, 8, 7, 0) 1470px,
    #080807 1588px);
  pointer-events: none;
}

.herov2-main {
  /* Figma 3539:4127 Hero — 1440×459, two top-aligned children, gap 92 */
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 92px;
  width: min(100%, 1440px);
  min-width: 0;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
}

/* Figma 3539:4128 — 755×405 at full width; fluid (shrinks) below so the orb
 * never gets clipped, then the whole hero stacks on narrow screens. */
.herov2-text {
  flex: 1 1 auto;
  width: auto;
  max-width: 755px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding-top: 27px;
}

.herov2-title {
  max-width: 100%;
  font: var(--title-medium);
  letter-spacing: -0.5px;
  color: #fff;
  margin: 0;
}

.herov2-sub {
  font: var(--body-large);
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
 * Button — single source for Figma component Button (3657:1165)
 *
 * One CSS class shared by every instance of Figma's Button. Variants are
 * modifiers (`.btn--primary`, `.btn--ghost`, …).  Used by both Hero and
 * CTA sections — replace the class on the <a> to change behaviour, not
 * duplicate the recipe.
 * ═══════════════════════════════════════════════════════════════════════ */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 162px;
  height: 34px;
  padding: 0 10px;
  color: #fff;
  font: var(--body-base);
  white-space: nowrap;
  border: 2px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  isolation: isolate;
  transition: background-color 0.15s;
}

/* Primary variant — blue neon outline + halo + 2-stop drop shadow.
 * Maps to Figma Button component (3657:1164) with 3 variants:
 *   Property=Default  3657:1165  bg #1b1718   (--button/default)
 *   Property=Hover    3727:279   bg #212257   (--button/hover)
 *   Property=Active   3727:293   bg #7d66ff   (--button/active)
 * Border + shadow stay identical across variants; only fill changes. */
.btn--primary {
  /* Fill (padding-box) under Figma's "gradient/stroke/button" — a 3-paint
     stack measured off the pure stroke render (glow-free): dark #141415 base,
     a blue gradient dying out of the top-left corner, a violet one out of the
     bottom-right. Most of the rim is the dark base — not a continuous sweep. */
  background:
    linear-gradient(#1b1718, #1b1718) padding-box,
    linear-gradient(330deg, #ab3eff, transparent 30%) border-box,
    linear-gradient(150deg, #4166d9, transparent 28%) border-box,
    #141415 border-box;
  /* shadow/button — 2-stop purple/blue drop (Figma "Shadow light" 3657:1166) */
  box-shadow:
    0 13.647px 62.775px -2.708px rgba(84, 54, 255, 0.51),
    0 30px 138px -3.25px rgba(0, 110, 255, 0.35);
}
.btn--primary::before {
  /* Figma "Glow light" 3657:1187 — real blurred border-ring (159×40, border 15
   * #3886ed, blur 39.05px), bottom-aligned so it peeks 6px above the top edge.
   * A box-shadow approximation reads flatter than the ring — keep the ring. */
  content: "";
  position: absolute;
  /* outside stroke: the 15px luminous band sits OUTSIDE the 159×40 rect
     (CSS borders paint inside, Figma strokes outside — hence the offsets) */
  left: -17px;
  bottom: -17px;
  width: 189px;
  height: 70px;
  border: 15px solid;
  /* per-axis energy: Figma's halo is stronger at the sides than above/below */
  border-color: rgba(56, 134, 237, 0.45) rgba(56, 134, 237, 1) rgba(56, 134, 237, 0.55);
  border-radius: 25px;
  filter: blur(39.05px);
  opacity: 0.6;
  z-index: -1;
  pointer-events: none;
}
.btn--primary:hover {
  background:
    linear-gradient(#212257, #212257) padding-box,
    linear-gradient(330deg, #ab3eff, transparent 30%) border-box,
    linear-gradient(150deg, #4166d9, transparent 28%) border-box,
    #141415 border-box;
}
.btn--primary:active {
  background:
    linear-gradient(#7d66ff, #7d66ff) padding-box,
    linear-gradient(330deg, #ab3eff, transparent 30%) border-box,
    linear-gradient(150deg, #4166d9, transparent 28%) border-box,
    #141415 border-box;
}

/* Orb */
.herov2-orb-wrap {
  position: relative;
  width: 594px;
  height: 460px;
  flex: 0 0 594px;
}

.herov2-orb,
.herov2-orb-canvas {
  position: absolute;
  width: 620px;
  height: 620px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.herov2-orb {
  object-fit: contain;
  filter: drop-shadow(0 0 50px rgba(120, 180, 255, 0.6));
  animation: orb-float 8s ease-in-out infinite;
}
.herov2-orb-canvas {
  display: block;
}

@keyframes orb-float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-10px); }
}

/* Glass labels */
.herov2-label {
  /* Figma 1:560 — backdrop-blur 15, bg rgba(255,255,255,0.1), rounded-10,
   * 1px border rgba(255,255,255,0.05), noise overlay 5%.
   * Figma stacks outer py-5 + inner py-5 = 10px total vertical padding,
   * so label is 37px tall = 5+5+17(text)+5+5. */
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 30px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  font: var(--body-base);
  text-align: center;
  color: #fff;
  white-space: nowrap;
  isolation: isolate;
}
.herov2-label::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("assets/figma/v5/noise.png");
  background-size: 128px 128px;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

.herov2-label--1 { top: 30px; left: 30px; }
.herov2-label--2 { top: 100px; right: -30px; }
.herov2-label--3 { bottom: 130px; left: -10px; }
.herov2-label--4 { bottom: 30px; right: 0; }

/* ─── UI Yuchat block — Figma 3756:1365 component, 1440×775 ─── */

/* fluid wrapper: the 1440px mockup is scaled (by JS) to fit narrower viewports,
 * staying fully visible — the wrapper reserves the scaled height. */
.ui-yuchat-scroll {
  position: relative;
  width: min(1440px, calc(100vw - 48px));
  margin: 121px auto 0;
  margin-left: 50%;
  transform: translateX(-50%);
}
.ui-yuchat {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 775px;
  transform-origin: top left;
  background: rgba(26, 27, 30, 0.9);
  border-radius: 10px;
  font: var(--body-base);          /* Manrope Medium 14/16.8 baseline */
  color: #fff;
  /* F3: the bottom edge cut off hard. Figma (3539:4166/4171 "Gradient
     Bottom-down") dissolves the lower part of the mockup into the dark site
     fog — reproduce with a bottom fade mask instead of duplicating overlays. */
  -webkit-mask-image: linear-gradient(to bottom, #000 56%, transparent 93%);
          mask-image: linear-gradient(to bottom, #000 56%, transparent 93%);
}

/* Top bar — "Yuchat" centered */
.ui-yc-header {
  position: absolute;
  left: 8px;
  top: 8px;
  right: 9px;                       /* Figma w=1423 (from 1440 - 8 - 9) */
  height: 37px;
  background: rgba(34, 36, 40, 0.7);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Left sidebar — workspace icons */
.ui-yc-channels {
  position: absolute;
  left: 9px;
  top: 54px;
  width: 72px;                      /* 14 px + 44 + 14 = 72 (px-14 + content) */
  height: 701px;
  background: rgba(34, 36, 40, 0.7);
  border-radius: 10px;
  padding: 15px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
}

.ui-yc-channel,
.ui-yc-channel--active {
  width: 44px;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(at 100% 100%, rgba(54, 29, 61, 0.44), rgba(54, 29, 61, 0) 50%);
  border: 2px solid var(--stroke-inside-light, #323131);
  border-radius: 10px;
  color: #fff;
  font: 400 10px/16.8px var(--font-body);
  cursor: pointer;
  padding: 0;
}
/* F2: active channel ring — Figma uses a gradient stroke, cyan (top-right) →
 * magenta (bottom-left), not the old flat #fc51ff. Masked ::before paints the
 * ring in the existing 2px border footprint so layout/size is unchanged. */
.ui-yc-channel--active {
  border-color: transparent;
  position: relative;
}
.ui-yc-channel--active::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  padding: 2px;
  background: linear-gradient(45deg, #fc51ff, #4aecff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.ui-yc-channel-add {
  width: 44px;
  height: 14px;
  background: #2a2a30;
  border: none;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 13px;
  cursor: pointer;
}
.ui-yc-channel-add img { display: block; width: 14px; height: 14px; }

/* Main chat area */
.ui-yc-messages {
  position: absolute;
  left: 122px;
  top: 57px;
  width: 1195px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 14px 0;
  box-sizing: border-box;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Call header row */
.ui-yc-call-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 17px;
}
.ui-yc-call-head img { display: block; width: 22px; height: 22px; object-fit: contain; }

/* Summary section — outer wrapper (h=267) with card + "3 ответа" button */
.ui-yc-summary-wrap {
  /* Figma 3756:1365;3730:1780 — h=267, pl=45, flex justify-between */
  height: 267px;
  padding-left: 45px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

/* Card frame with border */
.ui-yc-summary-card {
  /* Figma 3756:1365;3730:1782 — border-2 #323131, rounded-10, pb-8 pt-15 px-20, gap-6, h=221 */
  height: 221px;
  border: 2px solid var(--stroke-inside-light, #323131);
  border-radius: 10px;
  padding: 15px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
}

.ui-yc-summary-row,
.ui-yc-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.ui-yc-summary-title,
.ui-yc-summary-date { font: var(--body-base); color: #fff; }

.ui-yc-player-left {
  display: flex;
  align-items: center;
  gap: 1px;
}

.ui-yc-play-btn {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(230, 197, 197, 0.25);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
}
.ui-yc-play-btn img { display: block; width: 16px; height: 19px; }

.ui-yc-time {
  font: 400 12px/16.8px var(--font-body);
  color: #fff;
  padding: 10px;
  white-space: nowrap;
}

.ui-yc-ai-btn {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(230, 197, 197, 0.25);
  border-radius: 5px;
  font: var(--body-medium);        /* Inter 400 16/24 per Figma */
  white-space: nowrap;
  cursor: pointer;
}
.ui-yc-ai-btn img { width: 13px; height: 14px; }

/* Speakers list */
.ui-yc-speakers { display: flex; flex-direction: column; gap: 0; }

.ui-yc-speaker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 37px;
}
.ui-yc-speaker > .ui-yc-spk-av { flex: 0 0 28px; }
.ui-yc-spk-av {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.ui-yc-spk-name {
  width: 119px;
  margin-left: 15px;
  font: var(--body-base);
  color: var(--text-tertiary, #d0d0d0);
}
.ui-yc-wave {
  /* fill the row's free space, never the SVG's intrinsic width. The waveform
     SVG is width=100% + viewBox 0 0 948 37; Safari took 948 as the basis and,
     with the old flex:1 0 auto (no shrink), rendered it ~916px → overflowed the
     card. flex-basis 0 + min-width 0 makes both engines size it from the row. */
  flex: 1 1 0;
  min-width: 0;
  height: 37px;
  width: auto;
}

/* 3 ответа button */
.ui-yc-replies-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 15px;
  background: var(--uiyuchat-button-default, #4aecff);
  color: var(--neira-button-default, #1b1718);
  border: none;
  border-radius: 10px;
  font: var(--body-base);
  cursor: default;                 /* display-only label, not an interactive button */
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.25);
  isolation: isolate;
  align-self: flex-start;          /* hugs the left edge of pl-45 wrapper */
  transition: transform 0.3s ease; /* smooth settle when the pulse stops */
}

/* Near-center pulse: gentle breathing while the glow is at its peak.
   is-pulse is set in main.js with hysteresis (on ≥0.8, off <0.65 of
   --yc-glow); the ::before halo scales along with the button. */
.ui-yc-replies-btn.is-pulse {
  animation: yc-replies-pulse 1.8s ease-in-out infinite;
}
@keyframes yc-replies-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.035); }
}
.ui-yc-replies-btn::before {
  /* Glow — strength follows --yc-glow (0..1), set per scroll frame in
     main.js by proximity to the viewport center. The 0.45 default makes
     the no-JS / reduced-motion state match the original static 0.6. */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--uiyuchat-button-default, #4aecff);
  filter: blur(23.45px);
  z-index: -1;
  opacity: calc(0.25 + 0.75 * var(--yc-glow, 0.45));
  /* halo grows toward the center: 0.92 far → 1.0 default → 1.10 centered */
  transform: scale(calc(0.92 + 0.18 * var(--yc-glow, 0.45)));
}

/* Chat messages */
.ui-yc-chat {
  padding: 10px 0 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 31px;
}

.ui-yc-msg {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.ui-yc-msg-av {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.ui-yc-msg-body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 50px;
}
.ui-yc-msg-name { font: var(--body-base); color: #fff; font-weight: 500; }
.ui-yc-msg-text { font: var(--body-base); color: #fff; margin: 0; }
.ui-yc-mention { color: #4a98ff; }
.ui-yc-msg-time { font: 400 12px/16.8px var(--font-body); color: #fff; flex-shrink: 0; }

/* ─── Thread panel (Figma 3756:4084 "Threads") — opened by "3 ответа" ─── */
.ui-yc-thread {
  position: absolute;
  top: 54px;
  right: 50px;
  bottom: 20px;
  width: 466px;
  background: rgb(41, 43, 46);          /* Figma panel card — measured */
  border-radius: 10px;
  padding: 18px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 13px;
  color: #fff;
  overflow: hidden;
  /* hidden by default — slides/fades in on .is-threads */
  opacity: 0;
  transform: translateX(28px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.ui-yuchat.is-threads .ui-yc-thread {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.ui-yc-thread-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.ui-yc-thread-titles { display: flex; flex-direction: column; gap: 3px; }
.ui-yc-thread-title { font: var(--body-base); font-weight: 500; color: #fff; }
.ui-yc-thread-sep { color: #555; margin: 0 4px; }
.ui-yc-thread-sub { font: 400 12px/16.8px var(--font-body); color: rgba(255, 255, 255, 0.45); }
.ui-yc-thread-close {
  flex: 0 0 auto;
  display: flex;
  padding: 4px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}
.ui-yc-thread-close:hover { color: #fff; }

.ui-yc-thread-quote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.035);
  border-radius: 10px;
}
.ui-yc-thread-quote-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ui-yc-thread-quote-title { font: var(--body-base); color: #fff; }
.ui-yc-thread-quote-date { font: 400 12px/16.8px var(--font-body); color: rgba(255, 255, 255, 0.45); }
.ui-yc-thread-quote-arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #3886ed;
  color: #fff;
}

.ui-yc-thread-msgs {
  display: flex;
  flex-direction: column;
  gap: 19px;
  overflow-y: auto;
  flex: 1 1 auto;
}
/* Нейра avatar — brand gradient orb placeholder */
.ui-yc-thread-list {
  margin: 3px 0 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ui-yc-thread-list li { font: 400 13px/17px var(--font-body); color: rgba(255, 255, 255, 0.8); }

/* PR reference as a chip-link — Нейра's "уже открыла PR #18" kicker. Matches the
   chat-demo .tag-pr language (cyan), but it's a real <a> with a git-PR icon. */
.ui-yc-pr-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(20, 222, 184, 0.1);
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: baseline;
  transition: background 0.18s ease;
}
.ui-yc-pr-link:hover { background: rgba(20, 222, 184, 0.2); text-decoration: underline; }
.ui-yc-pr-link svg { width: 0.85em; height: 0.85em; flex: 0 0 auto; }

/* Active state: "3 ответа" becomes an outlined toggle; content narrows */
.ui-yuchat.is-threads .ui-yc-messages { width: 686px; }
.ui-yuchat.is-threads .ui-yc-replies-btn {
  background: transparent;
  color: var(--uiyuchat-button-default, #4aecff);
  box-shadow: inset 0 0 0 1px var(--uiyuchat-button-default, #4aecff);
  animation: none;                 /* no pulse while the thread panel is open */
}
.ui-yuchat.is-threads .ui-yc-replies-btn::before { opacity: 0; }

/* Pivot */
/* Figma 1:590 Text frame — 1440×270 wrapping inner Frame 121 (1420×180) */
.herov2-pivot {
  position: relative;
  z-index: 5;
  width: 1440px;
  max-width: 100%;
  /* Figma node 3539:4173: slogan text sits at y≈1365–1495, overlapping the
   * mockup's lower edge on the blue band. Mockup bottom ≈1547, so pull up ~182. */
  margin: -182px auto 0;
  padding: 0 0 105px;
  text-align: center;
}

.herov2-pivot-text {
  font: var(--title-base);
  color: #fff;
  margin: 0;
}

.herov2-pivot-grad {
  /* measured off the canonical frame at the text bounds (audit 6.1):
     B stays saturated; R falls, G rises — pink-violet → periwinkle */
  background: linear-gradient(90deg, #e877ff 0%, #7fa6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ─── Responsive ─── */

@media (max-width: 1280px) {
  .herov2-main {
    gap: 40px;
  }
  .herov2-title { font-size: 64px; }
  .herov2-orb-wrap { width: 460px; height: 380px; flex-basis: 460px; }
  .herov2-orb,
  .herov2-orb-canvas { width: 500px; height: 500px; }
  /* drop the fixed 285px side columns so the centre nav pill keeps room */
  .navv2-left, .navv2-right { flex: 0 1 auto; width: auto; min-width: 0; }
}

@media (max-width: 1160px) {
  .navv2-center { display: none; }
  .navv2-left, .navv2-right { min-width: 0; }
}

/* mobile navbar (Figma 3598:1270) — logo + brand left, RU pill + hamburger
   right. The inline "Попробовать Нейру" CTA moves into the hamburger menu. */
@media (max-width: 640px) {
  .navv2-wrap { padding: 12px 14px; }
  /* position+z-index keeps the bar (logo + burger) above the overlay it sits inside */
  .navv2 { padding: 0; gap: 10px; position: relative; z-index: 2; }
  .navv2-left { flex: 0 1 auto; width: auto; min-width: 0; }
  .navv2-right { flex: 0 0 auto; width: auto; gap: 8px; }
  .navv2-cta { display: none; }            /* lives in the menu now */
  .navv2-brand { font-size: 14px; }

  /* compact RU pill + reveal burger */
  .navv2-lang {
    display: inline-flex;
    width: auto;
    height: 36px;
    padding: 8px 8px 8px 12px;
    border-radius: 9px;
  }
  .navv2-burger { display: block; }

  /* full-screen menu overlay below the bar */
  .navv2-menu {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 1;                            /* behind .navv2 (the bar) */
    flex-direction: column;
    gap: 8px;
    padding: 96px 24px 40px;               /* clear the fixed bar */
    background: rgba(8, 8, 7, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .28s ease, transform .28s ease, visibility .28s;
    pointer-events: none;
  }
  .navv2-wrap--menu-open .navv2-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }
  /* keep the brand visible while the menu is open even if the page is scrolled
     (overrides the scroll-away hide) */
  .navv2-wrap--menu-open .navv2-left { opacity: 1; visibility: visible; }
  .navv2-menu-links { display: flex; flex-direction: column; }
  .navv2-menu-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font: var(--body-large);
    text-decoration: none;
  }
  .navv2-menu-link svg { width: 18px; height: 18px; opacity: 0.6; }
  .navv2-menu-link:active { opacity: 0.6; }
  .navv2-menu-cta {
    margin-top: 24px;
    width: 100%;
    justify-content: center;
  }
}

/* lock background scroll while the mobile menu is open */
body.nav-menu-open { overflow: hidden; }

@media (max-width: 1080px) {

  .herov2 { padding: 100px 20px 0; }
  .herov2-main {
    flex-direction: column;
    gap: 40px;
    padding: 30px 0 60px;
  }
  .herov2-text { max-width: 100%; }
  .herov2-title { font-size: 44px; }
  .herov2-sub { font-size: 16px; }
  .herov2-sub br { display: none; }

  .herov2-orb-wrap {
    width: 100%;
    max-width: 380px;
    height: 320px;
    flex-basis: auto;
  }
  .herov2-orb,
  .herov2-orb-canvas { width: 380px; height: 380px; }
  .herov2-label { font-size: 12px; padding: 8px 18px; }
  .herov2-label--1 { top: 0; left: 0; }
  .herov2-label--2 { top: 30px; right: 0; }
  .herov2-label--3 { bottom: 60px; left: 0; }
  .herov2-label--4 { bottom: 10px; right: 0; }

  .herov2-pivot { padding: 50px 20px; }
  /* --title-base carries a fixed 65px line-height; without resetting it the
     shrunk font keeps 65px leading and the block balloons vertically. */
  .herov2-pivot-text { font-size: 32px; line-height: 1.2; }
}

/* ─── Phone hero (≤600) — Figma mobile 3598:1152 ─── */
@media (max-width: 600px) {
  .herov2 { padding: 80px 0 0; }
  .herov2-main {
    flex-direction: column;
    gap: 0;
    padding: 20px 30px 0;            /* 30px side gutter = 315px content */
  }
  .herov2-text { max-width: 100%; }
  .herov2-title { font-size: 30px; line-height: 1.22; }
  .herov2-sub { font-size: 14px; line-height: 1.45; }
  .herov2-sub br { display: none; }
  /* Figma drops the WebGL orb (and its floating labels) on mobile — the hero
     goes straight from the CTA button to the YuChat mockup peek. */
  .herov2-orb-wrap { display: none; }
  /* ── Mobile YuChat mock — Figma 3598:1243 ──
     The desktop 1440 mock reflows to a single mobile-width card: workspace rail
     dropped, the complete summary card (date + AI-саммари button + full
     waveforms) and chat shown — nothing cropped. Replaces the old JS scale-0.46
     + left-crop "peek". The inner rows are already flex (justify-between, wave
     flex:1 1 0), so they re-fit once the top-level pieces stop being absolute. */
  .ui-yuchat-scroll {
    width: auto;
    margin: 20px 16px 0;
    transform: none;
    overflow: visible;
  }
  .ui-yuchat {
    position: static;
    width: 100%;
    height: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    box-sizing: border-box;
    -webkit-mask-image: none;
            mask-image: none;            /* show the whole card + chat, no fade */
  }
  .ui-yc-header { position: static; height: 34px; }
  .ui-yc-channels { display: none; }      /* Figma mobile drops the workspace rail */
  .ui-yc-messages { position: static; width: 100%; padding: 4px 0; gap: 10px; }
  .ui-yc-call-head { padding: 2px 4px; }
  .ui-yc-call-head span { font-size: 11px; }
  .ui-yc-summary-wrap { height: auto; padding-left: 0; gap: 12px; }
  .ui-yc-summary-card { height: auto; padding: 12px 12px 10px; gap: 8px; }
  .ui-yc-summary-title,
  .ui-yc-summary-date { font-size: 11px; line-height: 1.3; }
  .ui-yc-time { font-size: 10px; padding: 6px; }
  .ui-yc-ai-btn { height: 26px; font-size: 11px; gap: 5px; padding: 0 8px; }
  .ui-yc-play-btn { width: 28px; height: 28px; }
  .ui-yc-speaker { height: 32px; }
  .ui-yc-spk-name { width: auto; min-width: 56px; margin-left: 10px; font-size: 11px; }
  .ui-yc-wave { height: 30px; }
  .ui-yc-replies-btn { font-size: 11px; padding: 5px 13px; }
  /* hide the first card's channel reply (@Владимир «забирай фоллоу-ап» / «Ага»)
     — the thread below carries the same beat, so it's redundant on mobile */
  .ui-yc-chat { display: none; }
  .ui-yc-msg-name,
  .ui-yc-msg-text { font-size: 11px; }
  .ui-yc-msg-time { font-size: 10px; }
  .ui-yc-msg-body { padding-right: 8px; }
  /* ── Second UI: the Нейра thread/response (Figma 3756:4084) ──
     On desktop this is a 466px side panel that opens on "3 ответа". On mobile it
     can't sit beside the summary, so it stacks below as its own card and stays
     visible — Нейра's follow-up ("Собрала фоллоу-ап" + action items) is the
     payoff, so it shouldn't depend on a tap/scroll trigger. */
  .ui-yuchat.is-threads .ui-yc-messages { width: 100%; }
  .ui-yc-thread {
    position: static;
    inset: auto;
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    gap: 10px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    overflow: visible;
  }
  .ui-yc-thread-msgs { overflow: visible; gap: 14px; }
  .ui-yc-thread-title { font-size: 12px; }
  .ui-yc-thread-sub,
  .ui-yc-thread-quote-date { font-size: 10px; }
  .ui-yc-thread-quote { padding: 9px 11px; }
  .ui-yc-thread-quote-title { font-size: 11px; }
  .ui-yc-thread-quote-arrow { width: 26px; height: 26px; }
  .ui-yc-thread-list li { font-size: 10.5px; line-height: 1.4; }
  .herov2-pivot { padding: 36px 30px; }
  .herov2-pivot-text { font-size: 24px; line-height: 1.25; }  /* reset 65px token leading */
  .herov2-shot { padding: 0 16px 40px; }
}

/* ─── Roles v2 — Figma 3539:4175 "Нейра может все." ─── */

.rolesv2 {
  position: relative;
  isolation: isolate;
  padding: 60px 0;
  font-family: var(--font-body);
  overflow: hidden;
}

/* Decorative faint blue glyphs (Figma Frame 135 / Icon1–4) behind the content.
 * Layer is a 1920px frame centred on the section to match Figma's layout; each
 * icon keeps its Figma frame box + inner image transform. Source PNGs are vivid
 * blue, so the faint look comes from this layer's low opacity + blur. */
.rolesv2-blobs {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1920px;
  height: 100%;
  margin-left: -960px;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.rolesv2-ic {
  position: absolute;
  overflow: hidden;
  opacity: 0.12; /* matched to Figma render: glyph stroke peakB≈40 (opacity-50 alone read ~3× too bright over the section's gradient overlay) */
}
.rolesv2-ic img {
  position: absolute;
  display: block;
}
/* Icon1 — panelUI, left edge (Figma frame x-20 y307, 411²; img 501² @ -94,-43) */
.rolesv2-ic1 { left: -20px; top: 307px; width: 411px; height: 411px; }
.rolesv2-ic1 img { left: -94px; top: -43px; width: 501px; height: 501px; }
/* Icon2 — windows, bottom-centre (frame x594 y574, 397²; img 451² rotated -7°) */
.rolesv2-ic2 { left: 594px; top: 574px; width: 397px; height: 397px; }
.rolesv2-ic2 img { left: -2.2px; top: -40.4px; width: 451px; height: 451px; transform: rotate(-7deg); }
/* Icon3 — man, top-right of centre (frame x1068 y19, 397²; img 445²) */
.rolesv2-ic3 { left: 1068px; top: 19px; width: 397px; height: 397px; }
.rolesv2-ic3 img { left: calc(50% - 10.45px); top: calc(50% - 33.67px); width: 445px; height: 445px; transform: translate(-50%, -50%); }
/* Icon4 — stick, mid-right off-edge (frame x1500 y394, 477²; img 629² @ -69,-43) */
.rolesv2-ic4 { left: 1500px; top: 394px; width: 477px; height: 477px; }
.rolesv2-ic4 img { left: -69px; top: -43px; width: 629px; height: 629px; }

.rolesv2-inner {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  box-sizing: border-box;
}

.rolesv2-title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 82px;
  line-height: 108px;
  color: #fff;
  margin: 0;
}

.rolesv2-content {
  display: grid;
  grid-template-columns: minmax(0, 620fr) minmax(0, 770fr);
  gap: 50px;
  margin-top: 50px;
}

/* Left zone (Figma 3539:4190) — bordered card hosting the active role's demo */
.rolesv2-video {
  position: relative;
  width: 100%;
  height: 660px;
  border: 1px solid #232323;
  border-radius: 10px;
  background: rgba(34, 36, 40, 0.68);   /* Figma placeholder ≈rgb(24,25,28) */
  overflow: hidden;
  isolation: isolate;
}

/* ── Role demo panels: one per card, cross-fade + stagger on activation ── */
.rolesv2-demo {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.rolesv2-demo.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.45s ease;
}

/* ── Live Нейра chat (v5) — replaces the static result card; driven by createCaseChat() ── */
.rolesv2-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(180deg, rgba(16, 17, 20, 0.35), rgba(10, 11, 13, 0.55));
  font-family: var(--font-body);
}

/* header: YuChat mark + "Тред в #channel" */
.rolesv2-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rolesv2-chat-logo { width: 20px; height: 20px; display: block; opacity: 0.95; }
.rolesv2-chat-channel { font: 500 14px/1 var(--font-body); color: #9aa0a6; }
.rolesv2-chat-channel b { color: #6fb0ff; font-weight: 600; }

/* scrollable message list */
.rolesv2-chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: none;
}
.rolesv2-chat-messages::-webkit-scrollbar { display: none; }

/* input bar */
.rolesv2-chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.rolesv2-chat-ava {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  font: 600 13px/1 var(--font-body);
}
.rolesv2-chat-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rolesv2-chat-field {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #e6e8ea;
  /* block, not flex: a flex field drops the whitespace between the @mention span and the text */
  font: 400 14px/38px var(--font-body);
  white-space: nowrap;
  overflow: hidden;
}
.rolesv2-chat-field.typing { border-color: rgba(56, 134, 237, 0.5); background: rgba(56, 134, 237, 0.06); }
.rolesv2-chat .chat-input-placeholder { color: #6b7075; pointer-events: none; }
.rolesv2-chat-field .mention { color: #6fb0ff; font-weight: 600; }
.rolesv2-chat-send {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #6fb0ff;
  background: rgba(56, 134, 237, 0.14);
}

/* ── message bubbles (engine emits .msg/.msg-bot/.msg-user/.hero-msg) ── */
.rolesv2-chat .msg { display: flex; gap: 11px; align-items: flex-start; }
.rolesv2-chat .hero-msg {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s cubic-bezier(.16, 1, .3, 1), transform 0.35s cubic-bezier(.16, 1, .3, 1);
}
.rolesv2-chat .hero-msg.msg-visible { opacity: 1; transform: none; }

.rolesv2-chat .msg-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 13px/1 var(--font-body);
}
.rolesv2-chat .msg-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rolesv2-chat .avatar-bot { border: 1px solid rgba(56, 134, 237, 0.35); background: rgba(56, 134, 237, 0.12); }
.rolesv2-chat .avatar-user { background: rgba(255, 255, 255, 0.06); color: #c8cbcf; }
.rolesv2-chat .avatar-user-img { background: rgba(255, 255, 255, 0.04); }

.rolesv2-chat .msg-body { flex: 1 1 auto; min-width: 0; }
.rolesv2-chat .msg-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; font-size: 14px; }
.rolesv2-chat .msg-meta strong { color: #fff; font-weight: 600; }
.rolesv2-chat .msg-ai-tag {
  font: 700 10px/1 var(--font-body);
  letter-spacing: 0.04em;
  color: #6fb0ff;
  background: rgba(56, 134, 237, 0.16);
  padding: 2px 5px;
  border-radius: 4px;
}
.rolesv2-chat .msg-time { color: #6b7075; font-size: 12px; }

.rolesv2-chat .msg-text { font: 400 14px/1.55 var(--font-body); color: #c8cbcf; word-wrap: break-word; }
.rolesv2-chat .msg-text .mention { color: #6fb0ff; font-weight: 600; }
.rolesv2-chat .msg-text code {
  font-family: var(--font-code, "SF Mono", ui-monospace, monospace);
  font-size: 12px;
  color: #8fc0ff;
  background: rgba(56, 134, 237, 0.10);
  padding: 1px 6px;
  border-radius: 5px;
}

/* tags */
.rolesv2-chat .msg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.rolesv2-chat .tag { font: 600 12px/1 var(--font-body); padding: 4px 9px; border-radius: 6px; }
.rolesv2-chat .tag-pr     { background: rgba(56, 134, 237, 0.14); color: #6fb0ff; }
.rolesv2-chat .tag-jira   { background: rgba(124, 106, 239, 0.15); color: #b3a7f5; }
.rolesv2-chat .tag-deploy { background: rgba(61, 220, 132, 0.13); color: #5fe0a0; }
.rolesv2-chat .tag-review { background: rgba(255, 255, 255, 0.06); color: #aeb3b8; }

.rolesv2-chat .msg-image { display: block; max-width: 100%; border-radius: 9px; margin-top: 9px; border: 1px solid rgba(255, 255, 255, 0.06); }

/* typing indicator + caret (keyframes typing-dot / blink-cursor are global) */
.rolesv2-chat .typing-indicator { display: inline-flex; gap: 4px; padding: 4px 0; }
.rolesv2-chat .typing-indicator span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6b7075;
  animation: typing-dot 1.2s ease-in-out infinite;
}
.rolesv2-chat .typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.rolesv2-chat .typing-indicator span:nth-child(3) { animation-delay: 0.3s; }
.rolesv2-chat .msg-text .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 1px;
  background: #6fb0ff;
  vertical-align: text-bottom;
  animation: blink-cursor 0.7s step-end infinite;
}

@media (prefers-reduced-motion: reduce) {
  .rolesv2-demo { transition-duration: 0.01ms !important; }
  .rolesv2-chat .hero-msg { opacity: 1; transform: none; transition: none; }
  .rolesv2-chat .typing-indicator span,
  .rolesv2-chat .msg-text .typing-cursor { animation: none; }
}

.rolesv2-right {
  display: flex;
  flex-direction: column;
  gap: 27.5px;
}

.rolesv2-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
}

.rolesv2-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: auto;
  height: 269px;
  padding: 20px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid #232323;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
}
.rolesv2-card:focus-visible {
  outline: 2px solid #4a98ff;
  outline-offset: 2px;
}
.rolesv2-card:not(.is-active):hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
}
.rolesv2-card:not(.is-active):hover .rolesv2-card-icon {
  border-color: #6fb0ff;
  color: #6fb0ff;
}
.rolesv2-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("assets/figma/v5/noise.png");
  background-size: 128px 128px;
  background-position: top left;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

/* Active card (Figma 3662:336 + Glow 3662:420) — pink (top-left) → blue glow
 * (bottom-right) diagonal: pink ~rgb(58,33,61) at TL, blue ~rgb(20,42,84) at BR,
 * plus a soft inner blue stroke-light (Figma: 15px #3886ed border, blur 39px). */
.rolesv2-card.is-active {
  /* F4: Figma highlights the active card with a muted plum glow (sampled peak
     ~rgb(57,31,56), R≈B), not the page's blue accent. Swapped the blue
     radial/border/shadow for that purple; the pink corner gradient already
     hinted it. Same intensity, on-palette colour. */
  border-color: rgba(178, 96, 200, 0.5);
  background:
    radial-gradient(ellipse 96% 86% at 100% 100%, rgba(170, 86, 198, 0.30) 0%, transparent 58%),
    linear-gradient(135.7deg, rgba(217, 98, 205, 0.24) 9%, rgba(40, 21, 99, 0) 78%);
  box-shadow:
    inset 0 0 34px rgba(160, 84, 196, 0.20),
    0 10px 44px -16px rgba(150, 74, 190, 0.42);
}

.rolesv2-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.rolesv2-card-title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 24px;
  line-height: normal;
  color: #fff;
  margin: 0;
  padding: 7px 0;
}

.rolesv2-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 41px;
  height: 41px;
  border-radius: 5px;
  border: 1px solid #4a98ff;
  color: #4a98ff;
  flex-shrink: 0;
}
.rolesv2-card.is-active .rolesv2-card-icon {
  border-color: #fff;
  color: #fff;
}

.rolesv2-card-body {
  font: 400 16px/24px "Inter", var(--font-body);
  /* Figma card body is a soft grey (~#c2c2c2); pure #fff read as bold/heavy */
  color: #c2c2c2;
  flex: 1;
}
.rolesv2-card-body p { margin: 0; }
.rolesv2-card-body p:first-child { margin-bottom: 24px; }
.rolesv2-card.is-active .rolesv2-card-body { color: #d0d0d0; }

/* Carousel pagination — desktop stacks the cards, so no bars there. */
.rolesv2-dots { display: none; }

.rolesv2-more {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 67px;
  padding: 0 20px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid #232323;
  text-decoration: none;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  isolation: isolate;
  overflow: hidden;
  transition: filter 0.2s;
}
.rolesv2-more::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("assets/figma/v5/noise.png");
  background-size: 128px 128px;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}
.rolesv2-more:hover { filter: brightness(1.1); }

.rolesv2-more-text {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 24px;
  color: #fff;
}

.rolesv2-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 5px;
  background: #4a98ff;
  border: 1px solid rgba(230, 197, 197, 0.25);
  flex-shrink: 0;
}

/* ─── Slogan / Metrics v2 ─── */

.sloganv2 {
  position: relative;
  isolation: isolate;
  padding: 100px 0 150px;
  text-align: center;
  /* clip horizontally (no h-scroll from the glow bleed) but let the glow fade
   * freely past the bottom edge — overflow:hidden was cutting it off. */
  overflow-x: clip;
  overflow-y: visible;
}

/* Figma 3569:1550 — contributions calendar (real 53×7 grid) in a near-black
 * rounded panel. The glow is a SEPARATE backlight element BEHIND the panel: two
 * radial gradients bleed out from under the top-left (blue) and bottom-right
 * (magenta) corners; the faint pseudo-code lives in the same backlight layer. */
/* fluid footprint: shrinks with the viewport; JS scales the 1440px calendar to
 * fit and sets this box's height. Below 600px we switch to the mobile layout. */
.sloganv2-cal-fit {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100vw - 200px));
  margin: 30px auto 0;
}
.sloganv2-cal-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  z-index: 1;            /* card paints over the glow balls */
  transform-origin: top left;
}
/* floating glow balls — separate sized elements behind the (opaque) card, on the
 * fit (card footprint, NOT the scaled card) so they're detached from the card yet
 * aligned to its corners. Explicit size + filter:blur = soft halo; only a soft
 * edge peeks past each corner. Move each freely via its own offsets. */
.sloganv2-glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(35px);
}
.sloganv2-glow-l {
  left: -50px;
  top: -50px;
  width: 300px;
  height: 280px;
  background: radial-gradient(circle, rgba(56, 134, 237, 0.7) 0%, rgba(80, 90, 220, 0.32) 38%, transparent 70%);
}
.sloganv2-glow-r {
  right: -50px;
  bottom: -50px;
  width: 300px;
  height: 280px;
  /* violet to match the now-violet bottom-right border corner (was magenta
     rgba(217,70,239) — read as "малиновый" against the фиолетовый кромка) */
  background: radial-gradient(circle, rgba(124, 106, 239, 0.85) 0%, rgba(108, 92, 231, 0.4) 38%, transparent 70%);
}
/* background pseudo-code in the side margins; lines run under the calendar
 * (hidden) and the mask fades them toward the centre — densest at the edges. */
.sloganv2-code {
  position: absolute;
  z-index: 0;
  margin: 0;
  padding: 0;
  font: 400 14px/2.2 "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  white-space: pre;
  pointer-events: none;
  opacity: 0.5;
}
.sloganv2-code-l {
  left: 0;
  top: 24%;
  transform-origin: left center;   /* JS scales it with the calendar from this edge */
  color: rgba(86, 150, 240, 0.75);
  text-align: left;
  /* soft radial patch: dense near the left edge, fades quickly up/down & to centre */
  -webkit-mask-image: radial-gradient(ellipse 78% 50% at 2% 50%, #000 0%, rgba(0,0,0,0.35) 38%, transparent 66%);
          mask-image: radial-gradient(ellipse 78% 50% at 2% 50%, #000 0%, rgba(0,0,0,0.35) 38%, transparent 66%);
}
.sloganv2-code-r {
  right: 0;
  bottom: 4%;
  transform-origin: right center;
  color: rgba(208, 96, 230, 0.8);
  text-align: right;
  -webkit-mask-image: radial-gradient(ellipse 78% 50% at 98% 50%, #000 0%, rgba(0,0,0,0.35) 38%, transparent 66%);
          mask-image: radial-gradient(ellipse 78% 50% at 98% 50%, #000 0%, rgba(0,0,0,0.35) 38%, transparent 66%);
}
.sloganv2-cal {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  height: 308px;
  padding: 32px 22px 28px;
  border-radius: 10px;
  border: 1px solid rgba(130, 140, 165, 0.13);
  background: rgb(13, 15, 20);
  isolation: isolate;
}
/* layer 2 — thin rim along the edge: blue at the top-left corner → violet at
 * the bottom-right (the directional "кромка"); the halo blobs behind keep it
 * from reading as a hard line. F6: the BR end was bright magenta (0.95) — a
 * harsh, off-palette edge that read as "лесенкой" on the rounded corner; softened
 * to the page violet at lower opacity so it feathers instead of stair-stepping. */
.sloganv2-cal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  padding: 4px;            /* match the calculator's ring thickness (was 1.25px → too thin) */
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(135deg,
    rgba(86, 156, 255, 0.8) 0%, rgba(130, 140, 165, 0.1) 34%,
    rgba(130, 140, 165, 0.1) 62%, rgba(108, 92, 231, 0.7) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.sloganv2-cal-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.sloganv2-cal-months {
  display: grid;
  grid-template-columns: 61px repeat(53, 18px);
  column-gap: 7px;
  margin-bottom: 14px;
  line-height: 1;
}
.sloganv2-cal-months span {
  grid-row: 1;
  font: 600 16px/1 "Inter", var(--font-body);
  color: #9aa0aa;
}
.sloganv2-cal-body {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.sloganv2-cal-days {
  display: grid;
  grid-template-rows: repeat(7, 18px);
  align-content: start;
  row-gap: 7px;
  width: 54px;
  font: 500 15px/18px "Inter", var(--font-body);
  color: #9499a3;
}
.sloganv2-cal-days span:nth-child(1) { grid-row: 2; }
.sloganv2-cal-days span:nth-child(2) { grid-row: 4; }
.sloganv2-cal-days span:nth-child(3) { grid-row: 6; }
.sloganv2-cal-grid {
  display: grid;
  grid-template-rows: repeat(7, 18px);
  grid-auto-flow: column;
  grid-auto-columns: 18px;
  gap: 7px;
}
.sloganv2-cal-cell {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.045);
}
.sloganv2-cal-cell.l1 { background: rgb(21, 56, 26); }
.sloganv2-cal-cell.l2 { background: rgb(52, 107, 52); }
.sloganv2-cal-cell.l3 { background: rgb(84, 157, 80); }
.sloganv2-cal-cell.l4 { background: rgb(122, 209, 113); }
.sloganv2-cal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  font: 500 15px/1 "Inter", var(--font-body);
  color: #9499a3;
}
.sloganv2-cal-link {
  color: #8b8f99;
  text-decoration: none;
  transition: color 0.2s;
}
.sloganv2-cal-link:hover { color: rgba(255, 255, 255, 0.85); }
.sloganv2-cal-legend {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sloganv2-cal-legend .sloganv2-cal-cell { width: 16px; height: 16px; }

/* mobile layout (≤600px, toggled by JS as .is-mobile): recent ~27 weeks, no day
 * labels, no "Learn how" link — matching the Figma mobile frame. The calendar
 * sizes to its content and JS scales it to fit. */
/* mobile: the calendar fills the 30px-gutter width (Figma photo 315 wide) —
   not the desktop calc(100vw - 200px), which collapses to ~175px on a phone */
.sloganv2-cal-fit.is-mobile { width: calc(100vw - 60px); }
.sloganv2-cal-fit.is-mobile .sloganv2-cal-wrap { width: auto; }
.sloganv2-cal-fit.is-mobile .sloganv2-cal { width: auto; }
.sloganv2-cal-fit.is-mobile .sloganv2-cal-days { display: none; }
.sloganv2-cal-fit.is-mobile .sloganv2-cal-link { display: none; }
.sloganv2-cal-fit.is-mobile .sloganv2-cal-foot { justify-content: flex-end; }

.sloganv2::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(8,8,7,0) 30%, rgba(8,8,7,0.85) 80%, #080807 100%);
  pointer-events: none;
}

.sloganv2-text {
  position: relative;
  z-index: 1;
  font-family: var(--font-title);
  font-weight: 400;
  /* Figma title/large (node 3569:1549) is 82px, but its sample string is
     shorter ("За 60 дней…3 026"); ours ("За 130 дней…3 597 PR") renders ~18.7px
     per font-px = 1533px at 82px, wider than the 1440 plashka. Cap at 76px so
     the nowrap line sits inside the plashka with ~20px margins (matches macet),
     scaling down below ~1690px so it never clips (designer F5). */
  font-size: clamp(28px, 4.5vw, 76px);
  line-height: 1.18;
  margin: 0 0 30px;
  color: #fff;
  /* F5: was max-width 1440 + left-aligned → the line "поехала". Match the
     calendar plashka width and center so it sits inside the plashka bounds. */
  max-width: min(1440px, calc(100vw - 200px));
  margin-inline: auto;
  text-align: center;
  letter-spacing: 0;
  white-space: nowrap;
}
@media (max-width: 600px) {
  /* the desktop max-width calc(100vw - 200px) collapses to ~175px on a phone,
     forcing the headline onto 4 cramped lines — use the 30px-gutter width so
     it reads as 2 lines like Figma (3704:328) */
  .sloganv2-text {
    white-space: normal;
    max-width: calc(100vw - 60px);
    font-size: clamp(24px, 7.4vw, 30px);
  }
}

.sloganv2-blue { color: var(--fg-blue); }
.sloganv2-white { color: #fff; }
.sloganv2-text > span { display: inline; }
.sloganv2-text > span + span { margin-left: 0.25em; }
.sloganv2-nowrap { white-space: nowrap; }


/* ─── Roles + Slogan responsive ─── */

/* Stack the two-column roles layout into a centred single column. */
@media (max-width: 980px) {
  .rolesv2-content {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin: 50px auto 0;
    gap: 32px;
  }
  .rolesv2-video { height: 520px; }
  .rolesv2-cards { gap: 20px; }
  .rolesv2-card { height: auto; min-height: 230px; }
  .rolesv2-title { font-size: 56px; line-height: 1.12; }
}

@media (max-width: 768px) {
  .rolesv2 { padding: 40px 0 30px; }
  /* Figma title→video gap is 30px and video→cards 30px (3704:242) */
  .rolesv2-content { margin-top: 30px; gap: 30px; }
  .rolesv2-title { font-size: 44px; }
  .rolesv2-video { height: 500px; }   /* bigger demo on mobile — the chat is the star */
  /* No extra demo padding on mobile — the chat fills the card; its own head/
     messages/input padding (~20px) is the only inset. Removes the wide side strip. */
  .rolesv2-demo { padding: 0; }
  /* Figma mobile (3704:242) drops the "Больше возможностей" link — the section
     ends at the carousel + pagination bars. */
  .rolesv2-more { display: none; }
  /* Figma mobile (3728:441): the 4 role cards become a horizontal swipe
     carousel instead of a vertical stack. .rolesv2-right is a grid item, so it
     needs min-width:0 to stop its track expanding to the cards' full width. */
  .rolesv2-right { min-width: 0; }
  .rolesv2-cards {
    display: flex;
    grid-template-columns: none;
    min-width: 0;              /* shrink to the column so overflow-x scrolls */
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
  }
  .rolesv2-cards::-webkit-scrollbar { display: none; }
  .rolesv2-card {
    flex: 0 0 257px;            /* Figma Card_Mobile width = 257 */
    height: auto;
    min-height: 0;             /* one-sentence cards hug their content (was 184 — left dead space below) */
    gap: 12px;                  /* tighter head→body than desktop's 24 */
    scroll-snap-align: start;
  }
  /* Card_Mobile uses smaller type than the desktop card so the copy fits 184px */
  .rolesv2-card-title { font-size: 18px; padding: 4px 0; }
  .rolesv2-card-body { font-size: 13px; line-height: 1.5; }
  /* Mobile cards read as ONE clean sentence — keep the punchy first line, drop
     the longer description (it lives in the demo above anyway). */
  .rolesv2-card-body p + p { display: none; }
  .rolesv2-card-body p:first-child { margin-bottom: 0; }

  /* pagination bars under the carousel (Figma 3704:304 — 44×3, 10px gap) */
  .rolesv2-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;          /* tighter cards→bars gap (was 20) */
  }
  .rolesv2-dot {
    width: 44px;
    height: 3px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: background .25s ease;
  }
  .rolesv2-dot.is-active { background: #fff; }

  .sloganv2 { padding: 50px 30px; }
}

@media (max-width: 480px) {
  /* Figma mobile: title ~40px on one line (3704:245), video 310×330 (3704:247).
     32px is the largest that keeps "Нейра может все." on a single line at 315px. */
  .rolesv2-title { font-size: 32px; line-height: 1.2; white-space: nowrap; }
  .rolesv2-video { height: 450px; }   /* bigger demo on small phones (was 330) */
}

/* ─── Proof v2 ("Почему это работает") ─── */

.proofv2 {
  position: relative;
  isolation: isolate;
  width: min(1440px, calc(100% - 60px));   /* 1440 content like Figma; fluid below */
  margin: 0 auto;
  padding: 80px 0;
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 48% 40% at 50% 54%, rgba(60, 126, 242, 0.45) 0%, transparent 62%),
    radial-gradient(ellipse 82% 72% at 50% 50%, rgba(34, 66, 154, 0.30) 0%, transparent 74%);
}

.proofv2-title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(48px, 5vw, 82px);
  line-height: 1.12;
  color: #fff;
  margin: 0 0 35px;
  letter-spacing: 0;
  text-align: left;
}

.proofv2-row {
  display: grid;
  gap: 25px;
  margin-bottom: 25px;
}
.proofv2-row--3 { grid-template-columns: repeat(3, 1fr); }
.proofv2-row--2 { grid-template-columns: 1fr 1fr; }

.proofv2-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 50px;
  justify-content: center;
  padding: 30px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid #232323;
  backdrop-filter: blur(8px);              /* Figma card container (Neira 3539:4453) */
  -webkit-backdrop-filter: blur(8px);
  isolation: isolate;
  overflow: hidden;
}
.proofv2-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("assets/figma/v5/noise.png");
  background-size: 128px 128px;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
}

.proofv2-card-visual {
  position: relative;
  height: 166px;
  border-radius: 10px;
  border: 1px solid #232323;
  background: transparent;
  overflow: hidden;
}

.proofv2-card--wide .proofv2-card-visual {
  height: 255px;
}

/* Figma-exported PNG fills the entire card-visual frame */
.proofv2-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* "Независимость от моделей" — two logo tickers scrolling in opposite directions */
.proofv2-card-visual--ticker { background: transparent; }
.proofv2-ticker {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.proofv2-ticker-row {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
}
.proofv2-ticker-track {
  display: flex;
  gap: 13px;
  flex-shrink: 0;
  padding-left: 13px;
  will-change: transform;
}
.proofv2-ticker-row--l .proofv2-ticker-track { animation: proofTicker 30s linear infinite; }
.proofv2-ticker-row--r .proofv2-ticker-track { animation: proofTicker 30s linear infinite reverse; }
@keyframes proofTicker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }   /* track = two identical halves → seamless */
}
.proofv2-logo {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid #232323;
  background: radial-gradient(circle at 50% 50%, rgb(24, 28, 23) 0%, rgb(15, 15, 15) 100%);
  box-shadow: inset 0 0 0 1px rgba(230, 197, 197, 0.06);
}
.proofv2-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  opacity: 0.75;
}
@media (prefers-reduced-motion: reduce) {
  .proofv2-ticker-track { animation: none; }
}

.proofv2-card-title {
  font: var(--title-caption);
  color: #fff;
  margin: 0 0 10px;
  padding: 10px 0;
  letter-spacing: 0;
}

.proofv2-card-sub {
  font: var(--body-base);
  color: #858585;
  margin: 0;
  padding-bottom: 11px;
}

/* Visual: code snippet */
.proofv2-visual-code {
  padding: 20px;
}
.proofv2-code {
  font-family: var(--font-code);
  font-size: 13px;
  line-height: 22px;
  color: #858585;
  margin: 0;
  white-space: pre;
}
/* Caret while the snippet types itself on first view (main.js). */
.proofv2-code.is-typing::after {
  content: "\258D";                /* ▍ */
  color: rgba(255, 255, 255, 0.45);
  animation: proofCaret 1s steps(2, start) infinite;
}
@keyframes proofCaret { 50% { opacity: 0; } }
.proofv2-code-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(15, 15, 15, 0.95) 90%);
  pointer-events: none;
}

/* Visual: globe */
.proofv2-visual-globe {
  display: flex;
  align-items: center;
  justify-content: center;
}
.proofv2-globe {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(56, 134, 237, 0.3), transparent 50%),
    radial-gradient(circle at 50% 50%, #1a2540 0%, #0c1020 70%);
  background-image:
    radial-gradient(circle at 50% 50%, transparent 30%, rgba(255,255,255,0.05) 32%, transparent 34%),
    radial-gradient(circle at 50% 50%, transparent 60%, rgba(255,255,255,0.05) 62%, transparent 64%),
    radial-gradient(circle, #1a2540 0%, #0c1020 100%);
  box-shadow: inset 0 0 40px rgba(56, 134, 237, 0.3), 0 0 60px rgba(56, 134, 237, 0.2);
  overflow: hidden;
}
.proofv2-globe::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle 4px at 65% 35%, rgba(255,255,255,0.5), transparent),
    radial-gradient(circle 3px at 40% 55%, rgba(255,255,255,0.4), transparent),
    radial-gradient(circle 5px at 70% 65%, rgba(255,255,255,0.4), transparent),
    radial-gradient(circle 2px at 25% 30%, rgba(255,255,255,0.5), transparent),
    radial-gradient(circle 3px at 55% 25%, rgba(255,255,255,0.4), transparent);
  opacity: 0.7;
}
.proofv2-globe-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255,255,255,0.9), 0 0 24px rgba(56, 134, 237, 0.6);
  transform: translate(-50%, -50%);
}

/* Visual: progress bars */
.proofv2-visual-bars {
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
  padding: 30px 25px;
}
.proofv2-bar-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.proofv2-bar-label {
  font-family: var(--font-body);
  font-size: 13px;
  color: #858585;
  letter-spacing: 0.5px;
}
.proofv2-bar {
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(230, 197, 197, 0.25);
  padding: 4px;
}
.proofv2-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(to right, #0f0f0f 0%, #fff 100%);
}
/* Grow-on-first-view: main.js zeroes the inline width, adds is-anim, then
   restores the target width when the card enters the viewport. Без JS бары
   остаются на статичных 78%/56%. */
.proofv2-bar-fill.is-anim {
  transition: width 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.proofv2-bar-row:nth-child(2) .proofv2-bar-fill.is-anim { transition-delay: 0.15s; }

/* Visual: call-to-task UI (Figma Neira 3539:4453 "Конвертация звонков в задачу") —
   live DOM rebuild of the former calls.png. Fixed 612×195 content frame centered
   in the 255px visual; crops at the sides on narrow screens like the PNG did. */
/* The visual is a 3-slide story: запись звонка → постановка задачи →
   результат. The track slides horizontally; dots below are the nav. */
.proofv2-call-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .proofv2-call-track { transition: none; }
}
.proofv2-call-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Slides 2-3: chat-style panes in the same metrics as the call frame */
.proofv2-call-pane {
  width: 612px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font: 400 12px/16.8px var(--font-body);
  color: #fff;
}
.proofv2-call-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.proofv2-call-msg-ava {
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  object-fit: cover;
}
.proofv2-call-msg-name {
  display: block;
  color: #858585;
  margin-bottom: 3px;
}
.proofv2-call-msg-text {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
}
.proofv2-call-mention { color: #4a98ff; }   /* как .ui-yc-mention в hero-моке */
.proofv2-call-task {
  margin-left: 37px;                        /* под текстом, мимо аватара */
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #232323;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.proofv2-call-task-status {
  font-size: 12px;
  color: #56d364;                           /* зелёный «выполнено», как календарь в slogan */
}
.proofv2-call-task-title {
  margin: 0;
  font-size: 13px;
}
.proofv2-call-task-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 15px;
  border: 1px solid rgba(230, 197, 197, 0.25);
  border-radius: 5px;
  white-space: nowrap;
}
.proofv2-call-frame {
  position: relative;
  width: 612px;
  height: 195px;
  flex: 0 0 auto;
  font: 400 12px/16.8px var(--font-body);
  color: #fff;
}
/* offset inner frame line (Figma "Border" inset -18/-10/-42, cropped below) */
.proofv2-call-frame::before {
  content: "";
  position: absolute;
  inset: -18px -10px -42px;
  border: 1px solid #232323;
  border-radius: 10px;
  pointer-events: none;
}
.proofv2-call-tag {
  position: absolute;
  left: 0;
  top: 0;
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid rgba(230, 197, 197, 0.25);
  border-radius: 5px;
}
.proofv2-call-tag img { width: 13px; height: 13px; display: block; }
.proofv2-call-date { position: absolute; right: 0; top: 4px; }
.proofv2-call-title { position: absolute; left: 0; top: 35px; margin: 0; }
.proofv2-call-playbox {
  position: absolute;
  left: 0;
  top: 64px;
  width: 37px;
  height: 37px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(230, 197, 197, 0.25);
  border-radius: 5px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.proofv2-call-playbox:hover { border-color: rgba(230, 197, 197, 0.5); }
.proofv2-call-playbox img { display: block; }
/* Demo playback (is-playing set in main.js): play icon swaps to a
   CSS-drawn pause glyph. */
.proofv2-call.is-playing .proofv2-call-playbox img { display: none; }
.proofv2-call-playbox::before,
.proofv2-call-playbox::after {
  content: "";
  display: none;
  width: 5px;
  height: 19px;
  border-radius: 2px;
  background: #fff;
}
.proofv2-call.is-playing .proofv2-call-playbox::before,
.proofv2-call.is-playing .proofv2-call-playbox::after { display: block; }
.proofv2-call-time {
  position: absolute;
  left: 40px;
  top: 64px;
  width: 87px;
  height: 37px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proofv2-call-btn {
  position: absolute;
  top: 66px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 15px;
  border: 1px solid rgba(230, 197, 197, 0.25);
  border-radius: 5px;
  white-space: nowrap;
}
.proofv2-call-btn img { display: block; }
.proofv2-call-row {
  position: absolute;
  left: 0;
  width: 612px;
  height: 37px;
  border-radius: 5px;
}
.proofv2-call-ava {
  position: absolute;
  left: 12px;
  top: 5px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  object-fit: cover;
}
.proofv2-call-name {
  position: absolute;
  left: 0;
  top: 10px;
  width: 112px;
  text-align: right;
}
.proofv2-call-wave { position: absolute; inset: 0; }
.proofv2-call-wave i {
  position: absolute;
  top: 7.5px;
  height: 22px;
  border-radius: 4px;
  transition: filter 0.25s ease, box-shadow 0.25s ease;
}
.proofv2-call-wave--pink i { background: #cd44a3; }
.proofv2-call-wave--blue i { background: #2c73d2; }
/* Bars left of the demo playhead light up (is-played set in main.js). */
.proofv2-call-wave--pink i.is-played {
  filter: brightness(1.35);
  box-shadow: 0 0 10px rgba(205, 68, 163, 0.55);
}
.proofv2-call-wave--blue i.is-played {
  filter: brightness(1.35);
  box-shadow: 0 0 10px rgba(44, 115, 210, 0.6);
}
/* bars dim toward the right, as in Figma */
.proofv2-call-wave::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 40%;
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.28));
  pointer-events: none;
}
/* 3-segment pager between visual and text (Figma Frame 165: y 297 = 12px below visual) */
.proofv2-call-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: -38px auto -17px;   /* with the card's 50px gaps → 12px above, 33px below */
}
.proofv2-call-dot {
  appearance: none;
  -webkit-appearance: none;
  width: 71px;
  height: 5px;
  border: 0;
  padding: 0;
  border-radius: 100px;
  background: rgba(217, 217, 217, 0.4);
  transition: background 0.3s ease;
  cursor: pointer;
}
.proofv2-call-dot:hover { background: rgba(217, 217, 217, 0.65); }
.proofv2-call-dot.is-on { background: #d9d9d9; }
.proofv2-call-dot:focus-visible { outline: 2px solid #4a98ff; outline-offset: 3px; }

/* Visual: software icons grid */
.proofv2-visual-icons {
  display: flex;
  align-items: center;
  justify-content: center;
}
.proofv2-icon-grid {
  display: grid;
  grid-template-columns: repeat(8, 60px);
  gap: 12px;
}
.proofv2-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: radial-gradient(circle, #181c17 0%, #0f0f0f 100%);
  border: 1px solid var(--fg-border);
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
}

/* Visual: chat snippet */
.proofv2-visual-chat {
  position: relative;
  padding: 20px 25px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: flex-start;
}
.proofv2-chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.proofv2-chat-msg--right {
  justify-content: flex-end;
  text-align: right;
}
.proofv2-chat-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.proofv2-chat-name {
  font-family: var(--font-body);
  font-size: 12.6px;
  color: #fff;
  font-weight: 500;
}
.proofv2-chat-text {
  font-family: var(--font-body);
  font-size: 12.8px;
  color: #858585;
  letter-spacing: 0.3px;
}
.proofv2-chat-avatar {
  width: 45px;
  height: 45px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(230, 197, 197, 0.25);
}
.proofv2-chat-avatar--user {
  background: var(--fg-blue);
  color: #fff;
  font-weight: 600;
  font-family: var(--font-body);
}
.proofv2-chat-avatar--bot {
  background: #2a1a3a;
  overflow: hidden;
}
.proofv2-chat-avatar--bot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.proofv2-chat-input {
  margin-top: auto;
  position: absolute;
  bottom: 25px;
  left: 25px;
  right: 25px;
  height: 45px;
  border-radius: 10px;
  border: 1px solid var(--fg-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  font-size: 14px;
  color: #858585;
}
.proofv2-chat-input-send { color: var(--fg-blue); }

/* ─── Proof responsive ─── */

@media (max-width: 1100px) {
  .proofv2-row--3 { grid-template-columns: 1fr 1fr; }
  .proofv2-icon-grid { grid-template-columns: repeat(4, 60px); }
}

@media (max-width: 768px) {
  .proofv2 { width: calc(100% - 40px); padding: 60px 0; }
  .proofv2-title { font-size: 38px; margin-bottom: 30px; }
  .proofv2-row--3, .proofv2-row--2 { grid-template-columns: 1fr; }
  /* Figma mobile cards (3704:340): 30px gap → 20px, visual band a fixed 104px
     for every card (incl. the wide ones), so cards don't balloon to ~370-470px */
  .proofv2-card { padding: 24px; gap: 20px; }
  .proofv2-card-visual,
  .proofv2-card--wide .proofv2-card-visual { height: 104px; }
  .proofv2-card-title { font-size: 24px; padding: 4px 0; margin-bottom: 6px; }
  .proofv2-card-sub { font-size: 14px; }
  .proofv2-icon-grid { grid-template-columns: repeat(4, 50px); gap: 8px; }
  .proofv2-icon { width: 50px; height: 50px; font-size: 18px; }

  /* ── Fit the complex visuals into the 104px mobile band ── */
  /* Синергия: the bars were spaced for the 166px desktop band and overflowed
     104 → trim padding/height so both rows sit cleanly. */
  .proofv2-visual-bars { padding: 14px 18px; gap: 12px; }
  .proofv2-bar { height: 16px; }
  .proofv2-bar-row { gap: 7px; }
  /* Конвертация — full 3-step story on mobile (запись → задача → результат).
     The call frame (slide 1) is a fixed 612px desktop layout that can't reflow,
     so it's scaled to fit; the chat slides reflow at full width. Each step has a
     different natural height, so main.js sizes the band to the ACTIVE slide (no
     dead space above the short call-recording step). 120px = the slide-1 default
     before JS runs. per-slide overflow:hidden stops the frame's 612px box bleeding. */
  /* Bleed the call visual out to the card edges (cancel the 24px card padding)
     so the call frame fills the width like the other cards' visuals — the card's
     overflow:hidden + radius clip it cleanly. */
  .proofv2-card-visual.proofv2-call {
    height: 120px;
    margin-left: -24px;
    margin-right: -24px;
    transition: height 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  }
  .proofv2-call-slide { overflow: hidden; }
  .proofv2-call-frame { transform: scale(0.7); transform-origin: center; }  /* bigger call UI (per design) — title/date edges crop at the band sides */
  /* at this scale the two action buttons crop mid-word at the right; hide them on
     mobile for a clean big view (time + waveforms are the focus). */
  .proofv2-call-btn { display: none; }
  /* desktop ::before fades the frame's lower edge into the section (-42px); on
     mobile that forces dead space / clipping, so hug the frame with a tight even
     border instead. */
  .proofv2-call-frame::before { inset: -6px; }
  /* panes now sit in the full-bleed band → restore an inset so chat text doesn't
     touch the card edges (the call frame fills; the chat stays padded). */
  .proofv2-call-pane { width: 100%; gap: 12px; padding: 0 16px; box-sizing: border-box; }
  /* the desktop dots use -38/-17 margins tuned for the 50px card gap; on mobile
     (20px gap) that pulls the pager + title up INTO the frame. Reset to small
     positive spacing so the title clears the call card. */
  .proofv2-call-dots { margin: -8px auto 4px; }   /* pager hugs the call card; clear gap to the title */
  .proofv2-call-task { max-width: 100%; }
}

/* ─── Price calculator v2 ─── */

.pricev2 {
  position: relative;
  isolation: isolate;
  /* F11: was max-width:1440 + padding:60px 0 (no gutter) → the card went
     full-bleed and kissed the screen edges below 1500px while the footer/CTA
     stayed inside a 30px gutter. 1440 content + 2×30 gutter keeps the macet
     width at ≥1500 yet aligns with the footer below it. */
  max-width: 1500px;
  margin: 0 auto;
  padding: 60px 30px;
  font-family: var(--font-body);
  text-align: left;
}
.pricev2-title, .pricev2-sub { padding-left: 30px; padding-right: 30px; }

.pricev2-title {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: clamp(48px, 5vw, 82px);
  line-height: 1.12;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: 0;
}

.pricev2-sub {
  font: var(--body-large);
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 50px;
}

/* Giant vertical "НЕЙРА" running down the left edge of price→FAQ→CTA
 * (audit 6.2b, canonical frame): one element anchored here, bleeding down
 * through the transparent sections behind their content. */
.pagev2-letters {
  /* Figma 3662:502 "NEIRA": Manrope Medium 667px, #361d3d @ 20%, rotated 90° */
  position: absolute;
  z-index: -1;
  top: 70px;
  /* viewport-anchored: same on-screen spot at any width (the container is
     centered, so a fixed px offset only works at one viewport) */
  left: calc(1150px - 50vw);
  font: 500 560px/0.78 var(--font-body);
  color: #361d3d;
  opacity: 0.2;
  transform: rotate(90deg);
  transform-origin: 0 0;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}
/* YUCHAT down the right edge (Figma 3662:504) — same material, anchor and
   stacking as NEIRA (a .pricev2 child: no overflow clipping, proven visible),
   mirrored to the right: same on-screen x at any width. Runs price→CTA. */
.pagev2-letters--yuchat {
  /* Y aligned with the proof title «Почему это работает» (user call) */
  top: -1055px;
  left: calc(50vw + 760px);
}
@media (max-width: 1100px) {
  /* the giant letters belong to the desktop composition only */
  .pagev2-letters { display: none; }
}
/* soft lilac wash behind the letters in the price zone (canonical frame) */
.pagev2-letters--neira::before {
  content: "";
  position: absolute;
  /* coords are in the rotated space: x runs down the page, y runs left */
  left: -100px;
  top: -80px;
  width: 1100px;
  height: 480px;
  background: radial-gradient(ellipse 60% 55% at 45% 50%, rgba(142, 82, 190, 0.10), transparent 70%);
}

.pricev2-card {
  /* Figma 1:994 shell (neon ring, halos) — but the 615px height is NOT kept:
   * the calculator got compacted (options removed 2026-06-12) and the card
   * now hugs its content to avoid dead space. Ring/halo construction below
   * is unchanged: outset box-shadow instead of Figma's sibling Glow group. */
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  width: 1440px;
  max-width: 100%;
  background: #1a1b1e;
  border-radius: 10px;
  padding: 40px;
  text-align: left;
  box-shadow:
    /* halo follows the ring per corner: blue out of the top-left, violet out of
       the bottom-right (Figma 3539:4500) — both already match their ring corner */
    -10px -10px 44px -18px rgba(56, 134, 237, 0.42),
    10px 12px 48px -20px rgba(84, 54, 255, 0.22);
}
.pricev2-card::before {
  /* F8: directional rim — BLUE out of the top-left, faint violet out of the
   * bottom-right (Figma 3539:4500). Was white-TL + saturated-magenta-BR, which
   * the designer read as the colour having "съехало" off the page palette. */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 4px;
  background:
    linear-gradient(to top left, rgba(84, 54, 255, 0.55), transparent 30%),
    linear-gradient(to bottom right, #3886ed, transparent 32%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.pricev2-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

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

.pricev2-label,
.pricev2-label-static {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}

.pricev2-value {
  color: var(--fg-blue);
  font-weight: 600;
}

/* Slider styling */
.pricev2-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--fg-blue) 0%, var(--fg-blue) var(--p, 5%), rgba(255,255,255,0.1) var(--p, 5%), rgba(255,255,255,0.1) 100%);
  outline: none;
  cursor: pointer;
}
.pricev2-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--fg-blue);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(56, 134, 237, 0.5);
}
.pricev2-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--fg-blue);
  cursor: pointer;
}

.pricev2-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #858585;
}

.pricev2-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--fg-border);
}
.pricev2-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.pricev2-tab:hover { color: #fff; }
.pricev2-tab.active {
  /* glass-blue, not flat fill — matches the page's neon/dark language */
  background: rgba(56, 134, 237, 0.16);
  border: 1px solid var(--fg-blue);
  padding: 9px 15px;     /* compensate the border so the pill doesn't grow */
  color: #fff;
}

.pricev2-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px;
  background: linear-gradient(135deg, rgba(56, 134, 237, 0.18) 0%, rgba(15, 15, 15, 0.6) 60%);
  border: 1px solid rgba(56, 134, 237, 0.35);
  border-radius: 14px;
  /* stretch to the form column's height (was align-self: start, which left
     a ~240px void under the panel); the CTA pins to the bottom via margin. */
}

.pricev2-result-row {
  display: flex;
  flex-direction: column;
}
.pricev2-result-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
}
.pricev2-result-total {
  font-family: var(--font-title);
  font-size: 42px;
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.5px;
}
/* Receipt — the math behind the total, fills the panel's middle zone */
.pricev2-receipt {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.pricev2-receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
}
.pricev2-receipt-row b {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* The CTA is the canonical Button component (.btn.btn--primary) — this class
 * only places it inside the result panel; margin-top:auto pins it (and the
 * fineprint below) to the bottom of the stretched panel. */
.pricev2-cta {
  margin: auto auto 4px;
}
.pricev2-fineprint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  line-height: 1.5;
}

/* ─── FAQ v2 ─── */

.faqv2 {
  /* positioned so it paints AFTER .pricev2's stacking context — otherwise the
   * giant background letters (positioned, anchored in price) render over the
   * FAQ title/text (positioned elements beat later non-positioned content) */
  position: relative;
  isolation: isolate;
  max-width: 1440px;
  margin: 0 auto;
  padding: 60px 30px;
  font-family: var(--font-body);
}
.faqv2-title {
  font-family: var(--font-title);
  font-size: clamp(48px, 5vw, 82px);
  line-height: 1.12;
  font-weight: 400;
  color: #fff;
  margin: 0 0 50px;
  letter-spacing: 0;
}
.faqv2-list {
  background: #0f0f0f;
  border-radius: 10px;
  padding: 5px 30px;
  overflow: hidden;
}
.faqv2-item {
  position: relative;
  border: none;
  background: transparent;
}
.faqv2-item + .faqv2-item { border-top: 1px solid #232323; }
.faqv2-q {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 27px 0 27px 30px;   /* design row pitch ≈72px (audit 6.5) */
  font: var(--body-base);
  color: #fff;
  cursor: pointer;
  list-style: none;
}
.faqv2-q::-webkit-details-marker { display: none; }
.faqv2-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  color: var(--fg-blue);
  transition: transform 0.2s;
}
.faqv2-icon::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M5 11 L11 5 M5 5 L11 5 L11 11' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>") center / contain no-repeat;
  mask:         url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M5 11 L11 5 M5 5 L11 5 L11 11' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>") center / contain no-repeat;
}
.faqv2-item[open] .faqv2-icon { transform: translateY(-50%) rotate(45deg); }
.faqv2-a {
  padding: 0 0 24px 30px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
}

/* ─── CTA v2 ─── */

.ctav2 {
  position: relative;
  isolation: isolate;
  text-align: center;
  /* Figma CTA 3539:4531 — frame pt10/pb70 + text band centres 130px text in a
   * 238px box (~54px above), so effective top 64, gap-to-button 54, bottom 70. */
  padding: 64px 30px 70px;
  overflow: hidden;
}
.ctav2-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Soft violet halo centred behind the button (the button's own purple/blue
   * drop-shadow blends into it). */
  background:
    radial-gradient(ellipse 38% 56% at 50% 66%, rgba(106, 78, 255, 0.20) 0%, transparent 70%);
}
.ctav2-quote {
  font: var(--title-base);
  font-size: clamp(30px, 4.55vw, 64px);   /* fluid down; exact 64px at ≥1407px */
  line-height: 1.02;                        /* Figma 65/64 */
  color: #fff;
  margin: 0 auto 54px;
  max-width: 1440px;
  letter-spacing: 0;
}
.ctav2-quote-grad {
  /* Figma CTA line 2 (node 3539:4531, pixels sampled across "Наш — решает
     задачи"): magenta-violet → periwinkle. Wider/brighter than the old
     #c786ff→#9999ff, which read as flat solid lilac (designer F10). */
  background: linear-gradient(90deg, #dd7cff 0%, #8a92ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.ctav2-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
/* ─── Footer v2 ─── */

.footerv2 {
  background: #0f0f0f;
  border: none;                /* override legacy `footer{}` top border */
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  padding: 54px 30px;
  font-family: var(--font-body);
  text-align: left;            /* override legacy `footer{ text-align:center }` */
}
.footerv2-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 44px;
}
/* Figma Frame 82 — the three columns cluster on the right (links pair + stores) */
.footerv2-right {
  display: flex;
  align-items: flex-start;
  gap: 44px;
}
.footerv2-links {
  display: flex;
  align-items: flex-start;
  gap: 51px;
}
/* Figma reserves wider column boxes (134 / 318) — keeps the cluster aligned. */
.footerv2-links .footerv2-col:nth-child(1) { width: 134px; }
.footerv2-links .footerv2-col:nth-child(2) { width: 318px; }
.footerv2-col {
  display: flex;
  flex-direction: column;
  gap: 7.9px;
}
.footerv2-col--brand { width: 360px; gap: 0; }
.footerv2-logo {
  align-self: flex-start;   /* don't let the flex column stretch the wordmark */
  width: auto;
  /* F12: Figma (node 3539:4543) renders the same wordmark asset at ~120×48
     visible ink (its 141×66 box is mostly transparent padding); ours was 167×66
     ≈ 40% too big. 48px → ~121px wide, matching the macet. */
  height: 48px;
  margin-bottom: 12px;
}
.footerv2-tag {
  margin: 0;
  font: var(--body-base);
  color: #d0d0d0;
  max-width: 360px;
}
.footerv2-heading {
  margin: 0 0 7.9px;
  font: var(--body-medium);
  color: #858585;
  letter-spacing: 0;
}
.footerv2-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7.9px;
  font: var(--body-base);
  color: #fff;
}
.footerv2-list a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.footerv2-list a:hover { color: #fff; }
.footerv2-col--stores { gap: 16px; }
.footerv2-stores {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
/* Figma Footer "Store badge" 1:1060/1:1070 — uses canonical Apple/Google PNGs */
.footerv2-store {
  display: inline-block;
  width: 135px;
  height: 40px;
  text-decoration: none;
  transition: transform 0.2s;
}
.footerv2-store:hover { transform: translateY(-1px); }
.footerv2-store img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ─── Price + FAQ + CTA + Footer responsive ─── */

@media (max-width: 900px) {
  .pricev2 { padding: 60px 20px 40px; }
  .pricev2-title { font-size: 38px; }
  .pricev2-sub { font-size: 15px; margin-bottom: 30px; }
  .pricev2-card { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .pricev2-result-total { font-size: 32px; }

  .faqv2 { padding: 60px 20px; }
  .faqv2-title { font-size: 38px; margin-bottom: 24px; }
  .faqv2-q { padding: 18px 20px; font-size: 15px; }
  .faqv2-a { padding: 0 20px 20px; font-size: 14px; }

  /* Figma CTA (3705:432) is a large 5-line block; the clamp floor (30px) read
     too small — bump it so it fills the column like the design. */
  .ctav2 { padding: 56px 20px 60px; }
  .ctav2-quote { font-size: 34px; line-height: 1.15; }

  .footerv2 { padding: 40px 20px; }
  /* Figma footer badges sit side by side (3710:299), not stacked */
  .footerv2-stores { flex-direction: row; gap: 12px; }
  .footerv2-store img { height: 35px; width: auto; }
  /* Figma mobile wordmark is small (3710:245 ≈ 73×34) vs the 48px desktop one */
  .footerv2-logo { height: 34px; }
}

/* Footer reflow — column cluster spreads, then stacks. Figma mobile
   (3710:242) puts the links/contacts/stores first and the brand + © last,
   so flip the order once stacked. */
@media (max-width: 960px) {
  .footerv2-inner { flex-direction: column; gap: 40px; }
  .footerv2-col--brand { width: 100%; order: 2; }
  .footerv2-right { width: 100%; justify-content: flex-start; gap: 56px; order: 1; }
}

/* Below ~780 the links pair + stores no longer fit in one row → stack them. */
@media (max-width: 780px) {
  .footerv2-right { flex-direction: column; gap: 32px; }
  .footerv2-links { gap: 56px; }
  .footerv2-links .footerv2-col:nth-child(1),
  .footerv2-links .footerv2-col:nth-child(2) { width: auto; }
}

@media (max-width: 480px) {
  .footerv2-links { flex-direction: column; gap: 28px; }
}
