/* ============================================================
   Barge-in Technology — Dark SaaS Feature Page
   /features/barge-in-technology/
   Palette: #080910 bg · #6958ED brand · #9AFFF7 teal · #EDCF4B yellow
   ============================================================ */

/* ── Page-level tokens ── */
.bi-page {
  --bi-bg:        #080910;
  --bi-bg-alt:    #0D0F1A;
  --bi-bg-card:   rgba(255,255,255,0.03);
  --bi-purple:    #6958ED;
  --bi-purple-hi: #8272FE;
  --bi-teal:      #9AFFF7;
  --bi-yellow:    #EDCF4B;
  --bi-text:      rgba(255,255,255,0.85);
  --bi-muted:     rgba(255,255,255,0.45);
  --bi-dim:       rgba(255,255,255,0.2);
  --bi-border:    rgba(255,255,255,0.08);
  --bi-ease:      cubic-bezier(0.22, 1, 0.36, 1);

  background: var(--bi-bg);
  color: var(--bi-text);
  font-family: 'Roboto', sans-serif;
}

/* ════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════ */
.bi-hero .uc-hero__gradient-left {
  position: absolute;
  top: -160px; left: -220px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(105,88,237,0.38) 0%, transparent 65%);
  filter: blur(90px);
  pointer-events: none; z-index: 1;
}
.bi-hero .uc-hero__gradient-right {
  position: absolute;
  top: -80px; right: -160px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(154,255,247,0.18) 0%, transparent 65%);
  filter: blur(90px);
  pointer-events: none; z-index: 1;
}

/* ── Waveform diagram ── */
.bi-hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bi-wave-diagram {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.bi-wave-svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 24px rgba(154,255,247,0.08));
}

/* Animated paths */
.bi-wave-ai {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: bi-draw-wave 1.6s var(--bi-ease) 0.3s forwards;
}
.bi-wave-human {
  stroke-dasharray: 480;
  stroke-dashoffset: 480;
  animation: bi-draw-wave 1.8s var(--bi-ease) 1.0s forwards;
}
.bi-wave-flat {
  opacity: 0;
  animation: bi-fade-in 0.6s ease 2.4s forwards;
}
.bi-interrupt-line {
  opacity: 0;
  animation: bi-fade-in 0.4s ease 0.9s forwards;
}
.bi-interrupt-dot {
  opacity: 0;
  animation: bi-fade-in 0.4s ease 0.9s forwards,
             bi-pulse-dot 2s ease-in-out 1.4s infinite;
}

@keyframes bi-draw-wave {
  to { stroke-dashoffset: 0; }
}
@keyframes bi-fade-in {
  to { opacity: 1; }
}
@keyframes bi-pulse-dot {
  0%, 100% { r: 5; opacity: 0.9; }
  50%       { r: 7; opacity: 0.5; }
}

/* Status badges on waveform */
.bi-wave-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.bi-wave-badge--ai {
  bottom: 28px; left: 8px;
  background: rgba(130,114,254,0.12);
  border: 1px solid rgba(130,114,254,0.28);
  color: #8272FE;
}
.bi-wave-badge--human {
  bottom: 28px; right: 8px;
  background: rgba(154,255,247,0.1);
  border: 1px solid rgba(154,255,247,0.25);
  color: #9AFFF7;
}
.bi-wave-badge__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  animation: bi-blink 1.8s ease-in-out infinite;
}
.bi-wave-badge__dot--purple { background: #8272FE; }
.bi-wave-badge__dot--teal   { background: #9AFFF7; animation-delay: 0.9s; }
@keyframes bi-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ════════════════════════════════════════════════
   SCROLL ANIMATIONS
════════════════════════════════════════════════ */
@keyframes bi-fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bi-animate {
  opacity: 0;
  transform: translateY(22px);
}
.bi-animate.bi-visible {
  animation: bi-fadeUp 0.6s var(--bi-ease) both;
  animation-delay: var(--bi-delay, 0s);
}

/* ════════════════════════════════════════════════
   SECTION META (plat-form.framer.ai pattern)
════════════════════════════════════════════════ */
.bi-section-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.bi-section-num {
  font-size: 11px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bi-section-line {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

/* ════════════════════════════════════════════════
   SECTION 01 — WHAT IS BARGE-IN
════════════════════════════════════════════════ */
.bi-what {
  background: var(--bi-bg);
  padding: clamp(64px, 8vw, 112px) 0;
}

.bi-what__header {
  max-width: 820px;
  margin-bottom: 56px;
}

.bi-what__title {
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 1.5rem;
}

.bi-what__body p {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.78;
  color: var(--bi-muted);
  margin: 0 0 1.1rem;
}
.bi-what__body p:last-child { margin-bottom: 0; }

/* ── Stats ── */
.bi-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bi-stat {
  background: var(--bi-bg-card);
  border: 1px solid var(--bi-border);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}
.bi-stat::before {
  content: '';
  position: absolute;
  left: 0; top: 12%; bottom: 12%;
  width: 3px;
  background: linear-gradient(to bottom, var(--bi-purple), var(--bi-teal));
  border-radius: 0 2px 2px 0;
}
.bi-stat:hover {
  border-color: rgba(105,88,237,0.3);
}

.bi-stat__num {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #8272FE, #9AFFF7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.bi-stat__label {
  font-size: 13px;
  color: var(--bi-muted);
  line-height: 1.5;
}

/* ════════════════════════════════════════════════
   SECTION 02 — HOW IT WORKS
════════════════════════════════════════════════ */
.bi-how {
  background: var(--bi-bg-alt);
  padding: clamp(64px, 8vw, 112px) 0;
}

.bi-how__title {
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 56px;
  max-width: 680px;
}

/* ── Steps ── */
.bi-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

/* Horizontal connector dashed line between step numbers */
.bi-steps__connector {
  position: absolute;
  top: 36px; /* aligns with center of step num */
  left: calc(33.33% - 24px);
  right: calc(33.33% - 24px);
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    rgba(105,88,237,0.35) 0px,
    rgba(105,88,237,0.35) 6px,
    transparent 6px,
    transparent 14px
  );
  pointer-events: none;
  z-index: 0;
}

.bi-step {
  padding: 0 28px 0 0;
  position: relative;
  z-index: 1;
}
.bi-step:last-child { padding-right: 0; }

.bi-step__num {
  font-size: clamp(4rem, 7vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, var(--bi-purple), var(--bi-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.45;
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
  position: relative;
}

.bi-step__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(105,88,237,0.1);
  border: 1px solid rgba(105,88,237,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bi-purple-hi);
  margin-bottom: 18px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.bi-step:hover .bi-step__icon {
  background: rgba(105,88,237,0.18);
  border-color: rgba(105,88,237,0.4);
  transform: translateY(-2px);
}

.bi-step__title {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 600;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.bi-step__body {
  font-size: 14px;
  line-height: 1.72;
  color: var(--bi-muted);
  margin: 0;
}

/* ════════════════════════════════════════════════
   SECTION 03 — USE CASES BENTO
════════════════════════════════════════════════ */
.bi-usecases {
  background: var(--bi-bg);
  padding: clamp(64px, 8vw, 112px) 0;
}

.bi-usecases__title {
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 .75rem;
}
.bi-usecases__sub {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--bi-muted);
  margin: 0 0 48px;
  max-width: 560px;
}

/* ── Bento grid ── */
.bi-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto auto;
  gap: 16px;
}

/* Card base */
.bi-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--bi-border);
  border-radius: 20px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s var(--bi-ease), transform 0.3s var(--bi-ease), box-shadow 0.3s;
}
.bi-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(105,88,237,0.06) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
}
.bi-card:hover {
  border-color: rgba(105,88,237,0.28);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(105,88,237,0.12);
}
.bi-card:hover::after { opacity: 1; }

/* Layouts */
.bi-card--wide {
  grid-column: 1 / 3;
}
.bi-card--narrow {
  grid-column: auto;
}
.bi-card--full {
  grid-column: 1 / 4;
  display: flex;
  align-items: flex-start;
  gap: 48px;
}
.bi-card__full-left {
  min-width: 220px;
}
.bi-card__full-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Card elements */
.bi-card__icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(105,88,237,0.1);
  border: 1px solid rgba(105,88,237,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bi-purple-hi);
  margin-bottom: 20px;
  transition: background 0.3s, border-color 0.3s;
}
.bi-card:hover .bi-card__icon {
  background: rgba(105,88,237,0.16);
  border-color: rgba(105,88,237,0.35);
}

.bi-card__title {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 600;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.bi-card__body {
  font-size: 14px;
  line-height: 1.72;
  color: var(--bi-muted);
  margin: 0 0 16px;
}
.bi-card__tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.08em;
  background: rgba(154,255,247,0.08);
  border: 1px solid rgba(154,255,247,0.18);
  color: var(--bi-teal);
  width: fit-content;
}

/* ════════════════════════════════════════════════
   FAQ
════════════════════════════════════════════════ */
.bi-faq {
  background: var(--bi-bg-alt);
  padding: clamp(64px, 8vw, 112px) 0;
}

.bi-faq__title {
  font-size: clamp(1.85rem, 3.8vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 48px;
  max-width: 560px;
}

.bi-faq__list {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bi-faq__item {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--bi-border);
  background: var(--bi-bg-card);
  transition: border-color 0.25s;
}
.bi-faq__item:has(.bi-faq__q[aria-expanded="true"]) {
  border-color: rgba(105,88,237,0.3);
}

.bi-faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: rgba(255,255,255,0.85);
  font-size: clamp(0.9rem, 1.3vw, 1rem);
  font-weight: 500;
  font-family: 'Roboto', sans-serif;
  line-height: 1.45;
  transition: color 0.2s;
}
.bi-faq__q:hover { color: #fff; }
.bi-faq__q[aria-expanded="true"] { color: var(--bi-purple-hi); }

.bi-faq__chevron {
  flex-shrink: 0;
  color: var(--bi-dim);
  transition: transform 0.3s var(--bi-ease), color 0.2s;
}
.bi-faq__q[aria-expanded="true"] .bi-faq__chevron {
  transform: rotate(180deg);
  color: var(--bi-purple-hi);
}

.bi-faq__a {
  padding: 0 24px 20px;
}
.bi-faq__a p {
  font-size: 14px;
  line-height: 1.75;
  color: var(--bi-muted);
  margin: 0;
}

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

/* 1024px — tablet landscape */
@media (max-width: 1024px) {
  .bi-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .bi-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  .bi-step { padding-right: 20px; }
  .bi-bento {
    grid-template-columns: 1fr 1fr;
  }
  .bi-card--wide  { grid-column: 1 / 3; }
  .bi-card--full  { grid-column: 1 / 3; flex-direction: column; gap: 20px; }
  .bi-card__full-left { min-width: 0; }
}

/* 768px — tablet portrait */
@media (max-width: 768px) {
  .bi-steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .bi-steps__connector { display: none; }
  .bi-step { padding-right: 0; }
  .bi-step__num { font-size: clamp(3.5rem, 10vw, 5rem); }

  .bi-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bi-bento {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .bi-card--wide,
  .bi-card--full { grid-column: 1 / 2; }
  .bi-card--full { flex-direction: column; gap: 16px; }

  .bi-wave-diagram { max-width: 100%; }
}

/* 480px — mobile */
@media (max-width: 480px) {
  .bi-what__header { margin-bottom: 36px; }
  .bi-how__title   { margin-bottom: 36px; }
  .bi-faq__title   { margin-bottom: 32px; }
  .bi-faq__q { padding: 16px 18px; font-size: 0.9rem; }
  .bi-faq__a { padding: 0 18px 16px; }
  .bi-stat   { padding: 20px 18px; }
}
