/* ==============================================================================
   Vertex AI - 5 AI Agents Interactive Stage Stylesheet
   Modern, responsive 2-column showcase with sleek tab navigation & interactive HUD
   ============================================================================== */

.agents {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.agents .wrap {
  position: relative;
  z-index: 2;
}

.agents .sec-head h2 {
  margin: 14px 0 16px;
  font-size: clamp(30px, 4.2vw, 50px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.agents .sec-head p {
  color: var(--text-2);
  max-width: 640px;
  font-size: 17px;
  line-height: 1.6;
}

/* ------------------------------------------------------------------------------
   1. Tab Switcher Navigation
   ------------------------------------------------------------------------------ */
.agent-tabs-wrap,
.agent-tabs-wrap .tabs,
.agents .tabs,
.stage > .tabs {
  margin-top: 24px;
  margin-bottom: 24px;
  width: 100%;
}

.agent-tabs-wrap .tabs,
.agents .tabs,
.agent-tabs,
.stage > .tabs {
  display: flex;
  gap: 12px;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.25) transparent;
}

.agent-tabs-wrap .tabs::-webkit-scrollbar,
.agents .tabs::-webkit-scrollbar,
.stage > .tabs::-webkit-scrollbar,
.agent-tabs::-webkit-scrollbar {
  height: 4px;
}

.agent-tabs-wrap .tabs::-webkit-scrollbar-thumb,
.agents .tabs::-webkit-scrollbar-thumb,
.stage > .tabs::-webkit-scrollbar-thumb,
.agent-tabs::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 4px;
}

.agent-tab,
.agents .tab,
.tab {
  appearance: none;
  flex: 1 1 0;
  min-width: 175px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text-2);
  text-align: left;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--sans);
  box-sizing: border-box;
  scroll-snap-align: start;
}

.agent-tab:hover,
.tab:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(15, 23, 42, 0.85);
  transform: translateY(-2px);
}

.agent-tab.is-active,
.tab.is-active {
  border-color: var(--cyan);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.14), rgba(15, 21, 34, 0.95));
  box-shadow: 0 10px 28px -10px rgba(34, 211, 238, 0.35), inset 0 1px 0 rgba(34, 211, 238, 0.5);
  color: #fff;
}

.agent-tab.is-active::after,
.tab.is-active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.tab-header,
.t-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
}

.tab.is-active .t-title,
.agent-tab.is-active .tab-header {
  color: #fff;
}

.tab-desc,
.tab small {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.tab.is-active small,
.agent-tab.is-active .tab-desc {
  color: var(--text-2);
}

/* Status Pills */
.pill {
  font: 500 10.5px var(--mono);
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
  flex-shrink: 0;
}

.pill.live {
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.pill.live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulseDot 2s infinite ease-in-out;
}

.pill.soon {
  background: rgba(251, 191, 36, 0.1);
  color: var(--amber);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ------------------------------------------------------------------------------
   2. Main Showcase Container & View
   ------------------------------------------------------------------------------ */
.stage {
  position: relative;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(15, 21, 34, 0.95), rgba(10, 14, 24, 0.98));
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8), 0 0 50px -15px rgba(34, 211, 238, 0.12);
  padding: 40px;
  overflow: hidden;
}

.stage::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  padding: 1px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), transparent 45%, transparent 55%, rgba(139, 92, 246, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.view {
  position: relative;
  width: 100%;
  min-height: 460px;
}

/* ------------------------------------------------------------------------------
   3. Showcase Pane (Two-Column Layout)
   ------------------------------------------------------------------------------ */
.pane {
  display: none;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
  min-height: 460px;
}

.pane.is-active,
.pane:not([hidden]) {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  animation: paneFade 0.3s ease-out;
}

@keyframes paneFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Left Column: Information & Actions */
.pane-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pane-body .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 11.5px var(--mono);
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  align-self: flex-start;
}

.pane-body h3 {
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  color: #fff;
}

.pane-body p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-2);
  margin-bottom: 22px;
}

/* Feature Specs with Cyan Glowing Checkmarks */
.specs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.specs li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.45;
}

.specs li::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2322d3ee'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") center / 11px no-repeat;
  border: 1px solid rgba(34, 211, 238, 0.35);
}

/* Mini KPI highlights inside left column */
.pane-kpis {
  display: flex;
  gap: 20px;
  padding: 14px 18px;
  margin-bottom: 26px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.pane-kpi {
  display: flex;
  flex-direction: column;
}

.pane-kpi b {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.pane-kpi span {
  font: 500 11px var(--mono);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Action Buttons */
.pane-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Right Column: Interactive Screen Wrapper */
.pane-screen {
  position: relative;
  width: 100%;
}

/* ------------------------------------------------------------------------------
   4. Responsive Breakpoints
   ------------------------------------------------------------------------------ */
@media (max-width: 860px) {
  .stage {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .pane,
  .pane.is-active,
  .pane:not([hidden]) {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }

  .pane-body {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    padding: 24px 20px;
    backdrop-filter: blur(12px);
  }

  .pane-body h3 {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .pane-body p {
    font-size: 15px;
    margin-bottom: 18px;
  }

  .pane-kpis {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    background: rgba(10, 15, 29, 0.6) !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-radius: 12px !important;
  }

  .pane-kpi {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }

  .pane-kpi b {
    display: block !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #fff !important;
    line-height: 1.2 !important;
  }

  .pane-kpi span {
    display: block !important;
    font: 500 11px var(--mono) !important;
    color: var(--text-3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
  }

  .pane-screen {
    border-radius: 18px;
    overflow: hidden;
  }
}

@media (max-width: 580px) {
  .stage {
    padding: 16px 12px;
  }

  .pane-body {
    padding: 18px 14px;
  }

  .agent-tab,
  .agents .tab,
  .tab {
    min-width: 160px;
    padding: 12px 12px;
  }

  .pane-kpis {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .pane-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .pane-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}
