/* ============================================
   Showcase Section — AI Demo + Calculator Demo
   Two-column animated product demonstrations
   ============================================ */

/* ── Section Layout ── */
.showcase {
  background: #ffffff;
  padding: var(--space-4xl) 0;
  overflow: hidden;
  border-bottom: 1px solid #e5e7eb;
}

.showcase__heading {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  color: #1d1729;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
  line-height: 1.2;
}

.showcase__heading span {
  color: var(--color-accent-purple, #7243f2);
}

.showcase__subheading {
  text-align: center;
  font-size: 17px;
  color: #6b7280;
  margin-bottom: 48px;
}

.showcase__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* ── Item wrapper ── */
.showcase__item {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.showcase__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 16px 6px 10px;
  background: #f3f4f6;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.showcase__label-icon {
  font-size: 18px;
  line-height: 1;
}

.showcase__label-badge {
  margin-left: 6px;
  padding: 3px 10px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

/* ── Stage (shared) ── */
.showcase__stage {
  position: relative;
  width: 100%;
  height: 420px;
  border-radius: 20px;
  background: #fafbfc;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.04);
}

/* ============================================
   AI DEMO PHASES
   ============================================ */

.ai-demo__upload,
.ai-demo__analysis,
.ai-demo__dashboard,
.ai-demo__message {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

/* Phase 1: Upload */
.ai-demo__upload { opacity: 1; }

.ai-demo__dropzone {
  width: 280px;
  height: 190px;
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: border-color 0.3s;
}

.ai-demo__dropzone-label {
  font-size: 13px;
  color: #9ca3af;
}

.ai-demo__file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  opacity: 0;
}

.ai-demo__file-icon { width: 36px; height: 36px; flex-shrink: 0; }
.ai-demo__file-info { display: flex; flex-direction: column; gap: 2px; }
.ai-demo__file-name { font-size: 14px; font-weight: 600; color: #1d1729; }
.ai-demo__file-size { font-size: 11px; color: #9ca3af; }

/* Phase 2-3: Analysis */
.ai-demo__analysis { gap: 20px; padding: 32px; }

.ai-demo__spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--color-accent-purple, #7243f2);
  border-radius: 50%;
  animation: ai-demo-spin 1s linear infinite;
}

@keyframes ai-demo-spin { to { transform: rotate(360deg); } }

.ai-demo__status {
  font-size: 16px;
  font-weight: 500;
  color: #1d1729;
}

.ai-demo__scan-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ai-demo__scan-line {
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent-purple, #7243f2), transparent);
  opacity: 0;
  box-shadow: 0 0 20px rgba(114, 67, 242, 0.3);
}

.ai-demo__steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.ai-demo__steps p {
  font-size: 13px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
}

.ai-demo__steps p::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent-purple, #7243f2);
  flex-shrink: 0;
}

/* Phase 4: Dashboard */
.ai-demo__dashboard { padding: 28px; gap: 20px; }

.ai-demo__dashboard-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-demo__dashboard-title {
  font-size: 12px;
  font-weight: 600;
  color: #1d1729;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-demo__dashboard-badge {
  font-size: 10px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 20px;
}

.ai-demo__dashboard-body {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.ai-demo__score {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-demo__score svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ai-demo__score-bg { fill: none; stroke: #e5e7eb; stroke-width: 6; }

.ai-demo__score-ring {
  fill: none;
  stroke: var(--color-accent-purple, #7243f2);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
}

.ai-demo__score-text { text-align: center; z-index: 1; }
.ai-demo__score-value { font-size: 28px; font-weight: 700; color: #1d1729; line-height: 1; display: block; }
.ai-demo__score-label { font-size: 11px; color: #9ca3af; margin-top: 2px; display: block; }

.ai-demo__cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ai-demo__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  opacity: 0;
}

.ai-demo__card-left { display: flex; align-items: center; gap: 8px; }

.ai-demo__card-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.ai-demo__card-icon--warning { background: rgba(245, 158, 11, 0.1); }
.ai-demo__card-icon--risk { background: rgba(239, 68, 68, 0.1); }
.ai-demo__card-icon--info { background: rgba(114, 67, 242, 0.1); }
.ai-demo__card-label { font-size: 13px; font-weight: 500; color: #374151; }
.ai-demo__card-value { font-size: 18px; font-weight: 700; color: #1d1729; }

/* Phase 5: Message */
.ai-demo__message { text-align: center; padding: 32px; }

.ai-demo__message h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1d1729;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.ai-demo__message h2 span {
  color: var(--color-accent-purple, #7243f2);
}


/* ============================================
   CALCULATOR DEMO PHASES
   ============================================ */

.calc-demo__form,
.calc-demo__results,
.calc-demo__message {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
}

.calc-demo__form { opacity: 1; }

/* Mac-style header bar */
.calc-demo__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.calc-demo__dots {
  display: flex;
  gap: 6px;
}

.calc-demo__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}

.calc-demo__title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

/* Form body */
.calc-demo__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}

.calc-demo__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
}

.calc-demo__field label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calc-demo__input {
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 600;
  color: #1d1729;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s;
}

.calc-demo__input--active {
  border-color: var(--color-accent-purple, #7243f2);
  box-shadow: 0 0 0 3px rgba(114, 67, 242, 0.1);
}

.calc-demo__btn {
  padding: 14px;
  background: #1d1729;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: auto;
  opacity: 0;
  transition: background 0.3s;
}

.calc-demo__btn--active {
  background: var(--color-accent-purple, #7243f2);
}

/* Results */
.calc-demo__results-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  justify-content: center;
}

.calc-demo__result-main {
  text-align: center;
  padding: 20px 0;
}

.calc-demo__result-number {
  font-size: 56px;
  font-weight: 800;
  color: var(--color-accent-purple, #7243f2);
  line-height: 1;
  display: block;
  letter-spacing: -0.03em;
}

.calc-demo__result-unit {
  font-size: 18px;
  font-weight: 500;
  color: #6b7280;
  display: block;
  margin-top: 4px;
}

.calc-demo__result-label {
  font-size: 13px;
  color: #9ca3af;
  display: block;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.calc-demo__result-details {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.calc-demo__result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #ffffff;
  opacity: 0;
}

.calc-demo__result-row + .calc-demo__result-row {
  border-top: 1px solid #f3f4f6;
}

.calc-demo__result-row span:first-child {
  font-size: 13px;
  color: #6b7280;
}

.calc-demo__result-val {
  font-size: 14px;
  font-weight: 700;
  color: #1d1729;
}

/* PDF Download phase */
.calc-demo__pdf {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
}

.calc-demo__pdf-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px;
}

.calc-demo__pdf-icon {
  width: 72px;
  height: 72px;
  background: rgba(114, 67, 242, 0.08);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calc-demo__pdf-filename {
  font-size: 13px;
  font-weight: 600;
  color: #1d1729;
  background: #f3f4f6;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: -0.01em;
}

.calc-demo__pdf-bar {
  width: 200px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.calc-demo__pdf-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #7243f2, #9b6dff);
  border-radius: 3px;
  transition: width 0.1s linear;
}

.calc-demo__pdf-status {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
}

/* Calc final message */
.calc-demo__message {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}

.calc-demo__message h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1d1729;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.calc-demo__message h2 span {
  color: var(--color-accent-purple, #7243f2);
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
  .showcase__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 560px;
    margin: 0 auto;
  }

  .showcase__heading { font-size: 30px; }
}

@media (max-width: 768px) {
  .showcase__stage {
    height: 380px;
    border-radius: 16px;
  }

  .showcase__heading { font-size: 26px; }
  .showcase__subheading { font-size: 15px; margin-bottom: 32px; }

  .ai-demo__dashboard-body { flex-direction: column; gap: 16px; }
  .ai-demo__score { width: 90px; height: 90px; }
  .ai-demo__score-value { font-size: 24px; }
  .ai-demo__message h2 { font-size: 18px; }

  .calc-demo__result-number { font-size: 44px; }
  .calc-demo__message h2 { font-size: 18px; }
}

@media (max-width: 480px) {
  .showcase__stage { height: 360px; }
  .showcase__heading { font-size: 22px; }
  .ai-demo__dashboard { padding: 20px 14px; }
  .calc-demo__body { padding: 16px; gap: 14px; }
  .calc-demo__result-number { font-size: 36px; }
}
