/* =========================================================
   AppBuild AI demo — styles
   Drop-in CSS. No framework dependencies.
   Replace the font-family declarations with your brand font.
   ========================================================= */

/* Optional reset for the demo container only.
   Remove if your site already provides a reset. */
.demo-wrap *,
.demo-wrap *::before,
.demo-wrap *::after {
  box-sizing: border-box;
}

/* ---------- Outer canvas ---------- */
.demo-wrap {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  border-radius: 16px;
}

.demo-stage {
  position: relative;
  width: 290px;
  height: 560px;
}

/* ---------- Phone frame ---------- */
.phone {
  position: absolute;
  inset: 0;
  background: #0F1115;
  border-radius: 48px;
  padding: 10px;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #EAF2FB 0%, #CFE0F3 100%);
  border-radius: 38px;
  overflow: hidden;
}

.notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 26px;
  background: #0F1115;
  border-radius: 14px;
  z-index: 5;
}

.statusbar {
  position: absolute;
  top: 14px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #0C447C;
  z-index: 4;
}

.statusbar .dots {
  width: 6px;
  height: 6px;
  background: #0C447C;
  border-radius: 50%;
  box-shadow: 10px 0 0 #0C447C, 20px 0 0 #0C447C;
}

.stage-content {
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 18px;
}

/* ---------- Scene fade transitions ---------- */
.scene {
  position: absolute;
  inset: 0;
  padding: 14px 18px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.scene.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Scene 1: prompt card ---------- */
.s1-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  font-weight: 500;
  color: #0C447C;
  text-align: center;
  margin: 24px 0 6px;
}

.s1-sub {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  color: #185FA5;
  text-align: center;
  margin: 0 0 22px;
  line-height: 1.5;
}

.prompt-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 120px;
  position: relative;
  box-shadow: 0 1px 3px rgba(12, 68, 124, 0.08);
}

.prompt-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: #888780;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.prompt-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  color: #0C447C;
  line-height: 1.5;
  min-height: 60px;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 18px;
  background: #185FA5;
  margin-left: 1px;
  vertical-align: -3px;
  animation: blink 1s steps(2) infinite;
}

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

/* ---------- Add-logo row ---------- */
.brand-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 0.5px solid rgba(12, 68, 124, 0.08);
}

.brand-label {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  color: #888780;
  flex: 1;
}

.add-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px dashed #B5D4F4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
  position: relative;
}

.add-btn svg {
  width: 16px;
  height: 16px;
  stroke: #185FA5;
  transition: stroke 0.25s ease;
}

.add-btn.tapped {
  background: #185FA5;
  border-color: #185FA5;
  border-style: solid;
  transform: scale(0.92);
}

.add-btn.tapped svg {
  stroke: #fff;
}

.add-btn.tapped::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #185FA5;
  opacity: 0;
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0%   { opacity: 0.6; transform: scale(0.8); }
  100% { opacity: 0;   transform: scale(1.4); }
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #fff;
  border: 0.5px solid rgba(12, 68, 124, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-logo.in {
  opacity: 1;
  transform: scale(1);
}

.brand-logo svg {
  width: 20px;
  height: 20px;
}

/* ---------- Build button ---------- */
.build-btn {
  margin-top: 14px;
  background: linear-gradient(90deg, #1D9E75 0%, #185FA5 100%);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 11px;
  text-align: center;
  border-radius: 10px;
  opacity: 0.45;
  transition: opacity 0.3s;
}

.build-btn.ready {
  opacity: 1;
}

/* ---------- Scene 2: loading spinner ---------- */
.s2-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 80%;
}

.spin-ring {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(24, 95, 165, 0.2);
  border-top-color: #185FA5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

.s2-text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: #185FA5;
  font-weight: 500;
}

.s2-sub {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  color: #888780;
  margin-top: 6px;
}

/* ---------- Scene 3: finished app ---------- */
.s3-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-top: 4px;
}

.s3-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff;
  border: 0.5px solid rgba(12, 68, 124, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s3-logo svg {
  width: 22px;
  height: 22px;
}

.s3-name {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #0C447C;
  line-height: 1.2;
}

.s3-tag {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 11px;
  color: #185FA5;
  line-height: 1.2;
  margin-top: 2px;
}

/* ---------- App cards ---------- */
.app-card {
  background: #fff;
  border-radius: 14px;
  padding: 13px 15px;
  margin-bottom: 9px;
  box-shadow: 0 1px 3px rgba(12, 68, 124, 0.08);
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.35s ease;
}

.app-card.in {
  transform: translateY(0);
  opacity: 1;
}

.card-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #E6F1FB;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon.green { background: #E1F5EE; }
.card-icon.amber { background: #FAEEDA; }

.card-icon svg {
  width: 17px;
  height: 17px;
}

.card-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #0C447C;
  line-height: 1.25;
}

.card-sub {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  color: #888780;
  line-height: 1.3;
  margin-top: 1px;
}

.card-meta {
  margin-left: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #0F6E56;
  flex-shrink: 0;
}

.card-cta {
  margin-left: auto;
  background: linear-gradient(90deg, #1D9E75 0%, #185FA5 100%);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 8px;
  flex-shrink: 0;
}

.card-pill {
  margin-left: auto;
  background: #FAEEDA;
  color: #854F0B;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* ---------- Tab bar ---------- */
.tabbar {
  position: absolute;
  bottom: 14px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-around;
  padding: 9px 0 5px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
}

.tab {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 10px;
  color: #888780;
  text-align: center;
  line-height: 1.2;
}

.tab.active {
  color: #185FA5;
  font-weight: 500;
}

.tab svg {
  display: block;
  margin: 0 auto 2px;
  stroke: currentColor;
}

/* ---------- Floating chips ---------- */
.float-chip {
  position: absolute;
  background: #fff;
  border-radius: 12px;
  padding: 7px 11px;
  box-shadow: 0 4px 14px rgba(12, 68, 124, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #0C447C;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: all 0.5s ease;
  z-index: 3;
}

.float-chip.in { opacity: 1; }

.chip-tl {
  top: 88px;
  left: -22px;
  transform: translateX(-10px);
}
.chip-tl.in { transform: translateX(0); }

.chip-tr {
  top: 170px;
  right: -12px;
  transform: translateX(10px);
  background: linear-gradient(90deg, #1D9E75 0%, #185FA5 100%);
  color: #fff;
  border-radius: 18px;
  padding: 6px 14px;
  font-size: 11px;
}
.chip-tr.in { transform: translateX(0); }

.chip-bl {
  bottom: 90px;
  left: -30px;
  transform: translateX(-10px);
}
.chip-bl.in { transform: translateX(0); }

.chip-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #E1F5EE;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chip-icon svg {
  width: 11px;
  height: 11px;
}

.chip-title {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.1;
}

.chip-sub {
  font-size: 10px;
  color: #888780;
  font-weight: 400;
  line-height: 1.2;
  margin-top: 1px;
}

/* ---------- Controls (industry selector pills) ---------- */
.controls {
  margin: 0 0 18px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  padding: 4px;
  width: max-content;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.7);
  border: 0.5px solid rgba(12, 68, 124, 0.12);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(12, 68, 124, 0.06);
}

.vert-pill {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #185FA5;
  background: transparent;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.vert-pill.active {
  background: #185FA5;
  color: #fff;
  box-shadow: 0 1px 3px rgba(24, 95, 165, 0.3);
}

.vert-pill:hover:not(.active) {
  background: rgba(24, 95, 165, 0.08);
}

/* ---------- Accessibility helper ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
