/* demo.css — slide deck + scene styling, layered on top of panel.css.
   Blank dark stage; the flash UI is the only thing that matters. */

html, body {
  background: #04060a;
}

/* ============================ Deck ============================ */
#deck {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(1100px 520px at 50% -8%, rgba(31, 233, 136, 0.055), transparent 62%),
    #04060a;
}
#deck::-webkit-scrollbar { display: none; }
#deck { scrollbar-width: none; }

.slide {
  position: relative;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 74px 24px 92px;
}

/* Scene label + caption */
.label {
  z-index: 2;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.34);
}
.caption {
  z-index: 2;
  margin-top: 18px;
  max-width: 640px;
  text-align: center;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.6);
}
.caption strong { color: rgba(255, 255, 255, 0.92); font-weight: 600; }

/* ============================ Ghost backdrop (fake desktop) ============================ */
.ghost-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.ghost {
  position: absolute;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  opacity: 0;
  transition: opacity 1100ms ease 250ms;
}
.slide.in .ghost { opacity: 1; }
.ghost-a {
  width: min(780px, 72vw);
  height: min(480px, 58vh);
  left: 50%;
  top: 52%;
  transform: translate(-52%, -58%);
}
.ghost-b {
  width: min(300px, 26vw);
  height: min(230px, 30vh);
  left: 6%;
  bottom: 10%;
  transform: rotate(-4deg);
}
.ghost-dots { display: flex; gap: 6px; padding: 14px 18px; }
.ghost-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.13); }
.ghost-lines { display: flex; flex-direction: column; gap: 9px; padding: 6px 18px; }
.ghost-lines span { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.09); }

/* Fake code editor behind the "solve a problem" scene */
.code-ghost {
  width: min(700px, 66vw);
  height: min(440px, 56vh);
  left: 50%;
  top: 54%;
  transform: translate(-44%, -58%);
  background: rgba(2, 6, 4, 0.5);
}
.code-ghost .gline {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.13);
  white-space: pre;
  padding: 0 22px;
}

/* ============================ Stage ============================ */
.stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(880px, 100%);
  height: min(664px, 84vh);
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}
.slide.in .stage { opacity: 1; transform: none; }
#panel { width: min(880px, 100%); }

/* ============================ Deck chrome ============================ */
.deck-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  pointer-events: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 600;
}
.brand .logo { display: inline-flex; color: var(--accent); }
.count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.deck-foot {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 14px;
}
.nav-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
  font-size: 19px; line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 160ms ease;
}
.nav-btn:hover {
  border-color: rgba(31, 233, 136, 0.5);
  color: var(--accent);
  background: rgba(31, 233, 136, 0.08);
}
.nav-btn:disabled { opacity: 0.28; pointer-events: none; }
.dots { display: flex; gap: 7px; }
.dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: all 220ms ease;
}
.dots i:hover { background: rgba(255, 255, 255, 0.4); }
.dots i.on { background: var(--accent); width: 20px; border-radius: 4px; }

/* ============================ Scene helpers ============================ */
.scene-hl {
  box-shadow: 0 0 0 2px rgba(31, 233, 136, 0.55), 0 0 18px rgba(31, 233, 136, 0.35);
  background: rgba(31, 233, 136, 0.16) !important;
  color: #9bf3ce !important;
}

/* Conversation turns rendered inside #messages */
#messages { gap: 3px; }
#messages .tc-turn {
  padding: 7px 11px;
  border-radius: 11px;
  margin: 2px 0;
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 88%;
}
#messages .tc-them {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.82);
}
#messages .tc-you {
  align-self: flex-end;
  background: rgba(31, 233, 136, 0.08);
  border: 1px solid rgba(31, 233, 136, 0.2);
  color: rgba(222, 255, 240, 0.94);
}
.tc-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-right: 7px;
}
.ai-caret {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  vertical-align: -2px;
  background: var(--accent);
  border-radius: 1px;
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

/* ============================ Final slide ============================ */
.final-wrap {
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.final-wrap .big-logo { color: var(--accent); margin-bottom: 20px; }
.final-wrap h2 {
  font-size: 23px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.final-wrap p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 14.5px;
  line-height: 1.65;
  max-width: 540px;
  margin: 0 auto 24px;
}
.final-wrap p strong { color: #fff; font-weight: 600; }
.final-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.final-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 160ms ease;
}
.final-links .primary { background: var(--accent); color: #04120a; }
.final-links .primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.final-links .ghost-link {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
}
.final-links .ghost-link:hover { border-color: rgba(31, 233, 136, 0.5); color: var(--accent); }

/* Reveal helper for static content */
.fx { opacity: 0; transform: translateY(10px); transition: opacity 560ms ease, transform 560ms cubic-bezier(0.22, 1, 0.36, 1); }
.slide.in .fx { opacity: 1; transform: none; }
.fx-1 { transition-delay: 120ms; }
.fx-2 { transition-delay: 300ms; }
.fx-3 { transition-delay: 480ms; }

/* ============================ Responsive ============================ */
@media (max-width: 880px) {
  #action-row { flex-wrap: wrap; }
  .sep { display: none; }
}
@media (max-width: 760px) {
  .slide { padding: 70px 14px 86px; }
  .caption { font-size: 13.5px; }
  .stage { height: min(600px, 76vh); }
  .ghost-b { display: none; }
}
@media (max-height: 640px) {
  .stage { height: min(560px, 78vh); }
  .caption { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .stage, .ghost, .fx { transition: none !important; opacity: 1 !important; transform: none !important; }
}
