/* What you get — four animated topic rows */
.app-showcase {
  padding: 80px 20px 100px;
  background:
    radial-gradient(1200px 400px at 10% 0%, rgba(102, 126, 234, 0.12), transparent 55%),
    radial-gradient(900px 380px at 90% 20%, rgba(118, 75, 162, 0.1), transparent 50%),
    #f4f6ff;
  overflow: hidden;
}

.app-showcase .section-subtitle {
  margin-bottom: 28px;
}

.topic-lines {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 48px;
}

.topic-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
  gap: 48px 56px;
  align-items: center;
  padding: 36px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(102, 126, 234, 0.12);
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(79, 70, 229, 0.08);
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.topic-line.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.topic-line.is-reverse {
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1fr);
}

.topic-line.is-reverse .topic-copy {
  order: 2;
}

.topic-line.is-reverse .topic-demo {
  order: 1;
}

.topic-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 14px;
}

.topic-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.topic-copy h3 {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 800;
  color: #111827;
  margin-bottom: 10px;
}

.topic-copy .topic-lead {
  font-size: 1.15rem;
  color: #4f46e5;
  font-weight: 600;
  margin-bottom: 14px;
}

.topic-copy p {
  color: #4b5563;
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 520px;
}

.topic-demo {
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-bezel {
  width: min(250px, 72vw);
  background: #111318;
  border-radius: 38px;
  padding: 9px;
  box-shadow:
    0 28px 60px rgba(17, 19, 24, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.phone-bezel img,
.phone-bezel video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 30px;
  background: #0b0d14;
}

.phone-float {
  animation: phoneFloat 5.5s ease-in-out infinite;
}

.phone-reveal {
  position: relative;
  overflow: hidden;
}

.phone-reveal img {
  transform: scale(1.04);
  filter: blur(8px);
  opacity: 0.35;
  transition: transform 0.9s ease, filter 0.9s ease, opacity 0.9s ease;
}

.topic-line.is-visible .phone-reveal.is-ready img {
  transform: scale(1);
  filter: none;
  opacity: 1;
}

.generate-overlay {
  position: absolute;
  inset: 9px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(102, 126, 234, 0.18), rgba(17, 19, 24, 0.55));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  opacity: 1;
  transition: opacity 0.6s ease 0.35s;
  pointer-events: none;
}

.generate-overlay span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(17, 19, 24, 0.55);
  backdrop-filter: blur(8px);
}

.topic-line.is-visible .phone-reveal.is-ready .generate-overlay {
  opacity: 0;
}

.scan-line {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 90px;
  top: 12%;
  background: linear-gradient(180deg, transparent, rgba(165, 180, 252, 0.35), transparent);
  opacity: 0;
}

.topic-line.is-visible .scan-line {
  animation: scanDown 1.4s ease 0.15s both;
}

/* Recording live-transcript card */
.live-card {
  width: min(420px, 100%);
  background: #111318;
  border-radius: 28px;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 28px 60px rgba(17, 19, 24, 0.28);
}

.live-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.live-rec {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fecaca;
}

.live-card.is-playing .live-dot {
  background: #ef4444;
  animation: recPulse 1s ease-in-out infinite;
}

.live-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  opacity: 0.9;
}

.wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 46px;
  padding: 0 18px 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.wave span {
  width: 4px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.85);
  transform-origin: bottom;
}

.live-card.is-playing .wave span {
  animation: waveBar 1s ease-in-out infinite;
}

.live-transcript {
  height: 250px;
  overflow: auto;
  padding: 18px 20px 8px;
  font-size: 0.98rem;
  line-height: 1.75;
  color: #e5e7eb;
  scrollbar-width: thin;
}

.live-transcript .word-now {
  color: #fff;
  background: rgba(99, 102, 241, 0.45);
  border-radius: 4px;
  padding: 0 3px;
}

.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: #a5b4fc;
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

.live-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 16px;
}

.play-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.play-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.45);
}

.play-btn:focus-visible {
  outline: 3px solid #c7d2fe;
  outline-offset: 2px;
}

.live-hint {
  font-size: 0.8rem;
  color: #9ca3af;
}

.video-frame video {
  aspect-ratio: 430 / 962;
  object-fit: cover;
}

.app-showcase-note {
  text-align: center;
  margin-top: 36px;
  color: #4b5563;
  font-size: 0.95rem;
}

.app-showcase-note a {
  color: #4f46e5;
}

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

@keyframes phoneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

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

@keyframes waveBar {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

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

@keyframes scanDown {
  from { opacity: 0; transform: translateY(-20%); }
  20% { opacity: 1; }
  to { opacity: 0; transform: translateY(380%); }
}

@media (max-width: 900px) {
  .topic-line,
  .topic-line.is-reverse {
    grid-template-columns: 1fr;
    padding: 24px 18px 28px;
    gap: 24px;
  }

  .topic-line.is-reverse .topic-copy,
  .topic-line.is-reverse .topic-demo {
    order: unset;
  }

  .topic-copy h3 {
    font-size: 1.55rem;
  }

  .live-card {
    width: min(420px, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .topic-line,
  .phone-reveal img,
  .generate-overlay {
    transition: none;
  }

  .phone-float,
  .live-card.is-playing .live-dot,
  .live-card.is-playing .wave span,
  .caret,
  .scan-line {
    animation: none !important;
  }
}
