:root {
  --ag-bg: #06040b;
  --ag-surface: #0e0b18;
  --ag-surface-2: #151125;
  --ag-border: rgba(167, 139, 250, 0.2);
  --ag-accent: #8b5cf6;
  --ag-accent-strong: #673de6;
  --ag-text: #ffffff;
  --ag-muted: #c6badc;
  --ag-dim: #9588ad;
}

.agents-page {
  background: var(--ag-bg);
  color: var(--ag-text);
  overflow-x: clip;
}

.ag-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 200;
  pointer-events: none;
  background: transparent;
}

.ag-scroll-progress > span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(var(--ag-progress, 0));
  background: linear-gradient(90deg, #673de6, #c084fc);
}

.ag-hero {
  position: relative;
  padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 64px);
  background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(103, 61, 230, 0.22), transparent 70%);
}

.ag-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.ag-hero-copy h1 {
  font-size: clamp(2.4rem, 4.6vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
  margin: 0 0 22px;
  color: #fff;
  text-wrap: balance;
}

.ag-hero-copy p {
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.65;
  color: var(--ag-muted);
  max-width: 56ch;
  margin: 0 0 32px;
}

.ag-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.ag-hero-visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: transparent;
  transform: translate3d(0, calc(var(--ag-hero-shift, 0px)), 0) scale(var(--ag-hero-scale, 1));
  will-change: transform;
}

.ag-hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ag-section {
  padding: clamp(64px, 8vw, 112px) 0;
}

.ag-section-head {
  max-width: 66ch;
  margin-bottom: clamp(36px, 4.5vw, 56px);
}

.ag-section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
  color: #fff;
}

.ag-section-head p {
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.65;
  color: var(--ag-muted);
  margin: 0;
}

/* Interactive Sticky Scroll Showcase */
.ag-studio-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.ag-dept-list {
  display: grid;
  gap: 14px;
}

.ag-dept-btn {
  text-align: left;
  width: 100%;
  padding: 20px 22px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 0;
  color: var(--ag-text);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.18s;
}

.ag-dept-btn:hover {
  transform: translateY(-2px);
  background: rgba(167, 139, 250, 0.08);
}

.ag-dept-btn:active {
  transform: scale(0.985);
}

.ag-dept-btn[aria-pressed="true"] {
  background: rgba(103, 61, 230, 0.2);
}

.ag-dept-btn h3 {
  font-size: 1.15rem;
  margin: 0 0 6px;
  color: #fff;
}

.ag-dept-btn p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ag-muted);
  margin: 0;
}

.ag-room-sticky {
  position: sticky;
  top: 104px;
}

.ag-room {
  border-radius: 20px;
  background: var(--ag-surface);
  overflow: hidden;
}

.ag-room-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: #120e20;
}

.ag-room-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
}

.ag-qwen-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e9d5ff;
}

.ag-qwen-badge img {
  width: 20px;
  height: 20px;
  display: block;
}

.ag-room-body {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.ag-room-task {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.94rem;
  line-height: 1.5;
  color: #f3efff;
}

.ag-agent-feed {
  display: grid;
  gap: 10px;
}

.ag-agent-msg {
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--ag-surface-2);
}

.ag-agent-msg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
  font-size: 0.84rem;
}

.ag-agent-msg-head strong {
  color: #e9d5ff;
}

.ag-agent-msg-head span {
  color: var(--ag-dim);
}

.ag-agent-msg p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ag-muted);
}

.ag-room-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: #0b0815;
  font-size: 0.84rem;
  color: var(--ag-muted);
}

/* Full-bleed Editorial Visual Sections */
.ag-split {
  position: relative;
  min-height: clamp(460px, 52vw, 600px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #06040b;
}

.ag-split-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ag-split-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #06040b 0%, rgba(6, 4, 11, 0.92) 40%, rgba(6, 4, 11, 0.38) 72%, rgba(6, 4, 11, 0.16) 100%);
}

.ag-split.is-reversed .ag-split-media::after {
  background: linear-gradient(270deg, #06040b 0%, rgba(6, 4, 11, 0.92) 40%, rgba(6, 4, 11, 0.38) 72%, rgba(6, 4, 11, 0.16) 100%);
}

.ag-split-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.ag-split:hover .ag-split-media img {
  transform: scale(1.02);
}

.ag-split .container {
  position: relative;
  z-index: 2;
  padding-block: clamp(48px, 6vw, 84px);
}

.ag-split-copy {
  max-width: 52ch;
}

.ag-split.is-reversed .ag-split-copy {
  margin-left: auto;
}

.ag-split-copy h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: #fff;
}

.ag-split-copy p {
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--ag-muted);
  margin: 0 0 20px;
}

.ag-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.ag-bullets li {
  position: relative;
  padding-left: 24px;
  color: #ece6fa;
  line-height: 1.5;
}

.ag-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 9px;
  height: 5px;
  border-left: 2px solid #94c7a5;
  border-bottom: 2px solid #94c7a5;
  transform: rotate(-45deg);
}

/* Plans */
.ag-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.ag-plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 28px;
  border-radius: 20px;
  background: var(--ag-surface);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s;
}

.ag-plan-card:hover {
  transform: translateY(-2px);
  background: #130f22;
}

.ag-plan-card.is-featured {
  background: linear-gradient(180deg, rgba(103, 61, 230, 0.24) 0%, #120d21 100%);
  box-shadow: 0 24px 60px rgba(103, 61, 230, 0.2);
}

.ag-plan-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ag-plan-name h3 {
  font-size: 1.45rem;
  margin: 0;
  color: #fff;
}

.ag-plan-tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.18);
  color: #e9d5ff;
}

.ag-plan-price {
  font-size: clamp(2.1rem, 3vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
  margin: 8px 0 6px;
}

.ag-plan-price small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ag-muted);
}

.ag-plan-team {
  font-weight: 600;
  color: #d6bcff;
  margin: 0 0 20px;
}

.ag-plan-meta {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
}

.ag-plan-meta > div {
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ag-plan-meta strong {
  display: block;
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 4px;
}

.ag-plan-meta p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--ag-muted);
}

.ag-plan-card .button {
  width: 100%;
  text-align: center;
}

/* Scroll Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 960px) {
  .ag-hero-grid,
  .ag-studio-grid,
  .ag-plans-grid {
    grid-template-columns: 1fr;
  }
  .ag-split {
    min-height: 440px;
  }
  .ag-split-media::after,
  .ag-split.is-reversed .ag-split-media::after {
    background: linear-gradient(180deg, rgba(6, 4, 11, 0.88) 0%, rgba(6, 4, 11, 0.72) 55%, rgba(6, 4, 11, 0.85) 100%);
  }
  .ag-room-sticky {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ag-hero-visual {
    transform: none !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ag-dept-btn,
  .ag-plan-card,
  .ag-split-media img {
    transition: none;
  }
}
