/* Jasmine page: her heading and the scripted example window (jasmine-demo.js).
   The window copies the look of Jasmine's own screen: her colours, her Manrope type, the listen
   ring, her speech bubbles, her approval card and job rows, and the request box at the bottom.
   Her screen is one column; here it is two so that the basket and the spreadsheet have room in
   440 pixels: the ring and the conversation on the left, the work on the right.
   The layout classes (.raptor-intro, .raptor-mock, .pro-grid, .fact, .mini-window) come from
   styles.css, so this file holds only what Jasmine's window adds. */

.jasmine-heading { display: flex; align-items: center; gap: 14px; font-size: 44px; font-weight: 500; line-height: 1; }
.jasmine-heading img { width: 52px; height: 52px; }

/* ---------- The window ---------- */

.jasmine-demo {
  --jasmine-bg: #0D0A14;
  --jasmine-surface: #161022;
  --jasmine-raised: #1E1630;
  --jasmine-line: #2C2242;
  --jasmine-fg: #F3EEF9;
  --jasmine-muted: #A79DBA;
  --jasmine-purple: #4B1D8F;
  --jasmine-purple-deep: #2A1150;
  --jasmine-purple-text: #B494F0;
  --jasmine-gold: #D9B45A;
  --jasmine-gold-soft: rgba(217, 180, 90, 0.35);
  --jasmine-ring-size: 60px;
}
.jasmine-window {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 440px;
  text-align: left;
  background: radial-gradient(120% 80% at 50% 0%, #1A1030 0%, var(--jasmine-bg) 60%);
  color: var(--jasmine-fg);
  border: 1px solid var(--jasmine-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(6, 8, 15, 0.55);
  font-size: 12px;
  line-height: 1.5;
}
.jasmine-icon { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Top bar: her name, the AI picker and her five buttons ---------- */

.jasmine-topbar { display: flex; align-items: center; gap: 8px; flex: none; height: 52px; padding: 0 16px; }
.jasmine-wordmark { display: flex; align-items: center; gap: 8px; margin-right: auto; font-size: 16px; font-weight: 700; letter-spacing: 0.01em; }
.jasmine-engine, .jasmine-control { display: inline-flex; align-items: center; justify-content: center; height: 30px; border: 1px solid var(--jasmine-line); border-radius: 999px; background: var(--jasmine-surface); }
.jasmine-engine { gap: 6px; padding: 0 10px 0 12px; font-size: 12px; }
.jasmine-control { width: 30px; }

/* ---------- Body: the ring and the conversation, then the work ---------- */

.jasmine-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.jasmine-listen { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 0; padding: 0 16px 8px; }

/* The listen ring: purple at rest, gold while she hears, thinks or speaks. */
.jasmine-ring-area { position: relative; flex: none; display: grid; place-items: center; width: calc(var(--jasmine-ring-size) + 20px); height: calc(var(--jasmine-ring-size) + 20px); }
.jasmine-halo { position: absolute; width: var(--jasmine-ring-size); height: var(--jasmine-ring-size); border-radius: 50%; background: radial-gradient(circle, var(--jasmine-gold-soft) 0%, transparent 70%); opacity: 0; transition: opacity 200ms ease; }
.jasmine-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--jasmine-ring-size);
  height: var(--jasmine-ring-size);
  border-radius: 50%;
  border: 2px solid rgba(180, 148, 240, 0.35);
  background: radial-gradient(circle at 50% 35%, #6A33B8 0%, var(--jasmine-purple) 45%, var(--jasmine-purple-deep) 100%);
  box-shadow: 0 0 36px rgba(75, 29, 143, 0.55), inset 0 0 24px rgba(0, 0, 0, 0.35);
  transition: border-color 200ms ease;
}
.jasmine-ring .jasmine-icon { width: 27%; height: 27%; stroke-width: 1.6; color: var(--jasmine-fg); }
.jasmine-arc { position: absolute; width: calc(var(--jasmine-ring-size) + 16px); height: calc(var(--jasmine-ring-size) + 16px); border-radius: 50%; border: 2px solid transparent; }
.jasmine-demo[data-state="listening"] .jasmine-ring { border-color: var(--jasmine-gold); }
.jasmine-demo[data-state="listening"] .jasmine-halo { opacity: 1; }
.jasmine-demo[data-state="thinking"] .jasmine-arc,
.jasmine-demo[data-state="working"] .jasmine-arc { border-top-color: var(--jasmine-gold); animation: jasmine-turn 1.1s linear infinite; }
.jasmine-demo[data-state="speaking"] .jasmine-ring { border-color: var(--jasmine-gold); animation: jasmine-breathe 1.6s ease-in-out infinite; }
@keyframes jasmine-turn { to { transform: rotate(360deg); } }
@keyframes jasmine-breathe { 50% { box-shadow: 0 0 52px rgba(217, 180, 90, 0.45), inset 0 0 24px rgba(0, 0, 0, 0.35); } }

.jasmine-state { flex: none; min-height: 21px; font-size: 14px; font-weight: 600; text-align: center; }

/* The conversation shows the last few things said, newest at the bottom; what does not fit goes off the top. */
.jasmine-conversation { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 2px; overflow: hidden; }
.jasmine-line { flex: none; margin: 0; max-width: 90%; padding: 7px 11px; border-radius: 14px; animation: jasmine-appear 0.35s ease; }
.jasmine-line.from-you { align-self: flex-end; background: var(--jasmine-raised); border-bottom-right-radius: 4px; }
.jasmine-line.from-jasmine { align-self: flex-start; background: var(--jasmine-surface); border: 1px solid var(--jasmine-line); border-bottom-left-radius: 4px; }
/* Words still being heard are shown faded until the request ends. */
.jasmine-line.is-live { opacity: 0.7; }
/* Her screen shows no speaker names; they stay in the page for a screen reader. */
.jasmine-line-who { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Work: where her screen shows jobs and approval cards ---------- */

.jasmine-work { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 4px 16px 8px 4px; overflow: hidden; }
.jasmine-work > * { flex: none; animation: jasmine-appear 0.35s ease; }
.jasmine-demo .mini-window { max-width: none; background: var(--jasmine-surface); border-color: var(--jasmine-line); border-radius: 12px; }
.jasmine-demo .mini-bar { background: var(--jasmine-raised); border-bottom: 1px solid var(--jasmine-line); }
.jasmine-demo .mini-bar span { background: var(--jasmine-line); }
.jasmine-demo .mini-bar em { color: var(--jasmine-muted); }

.jasmine-page { padding: 8px 12px 10px; }
.jasmine-page-title { margin: 0 0 4px; font-size: 13px; font-weight: 600; }
.jasmine-basket { list-style: none; margin: 0; padding: 0; font-size: 11px; }
.jasmine-basket li { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; border-bottom: 1px solid var(--jasmine-line); animation: jasmine-appear 0.35s ease; }
.jasmine-basket li span:last-child { flex: none; font-variant-numeric: tabular-nums; }
.jasmine-basket .jasmine-total { margin-top: 2px; border-bottom: 0; font-weight: 700; color: var(--jasmine-gold); }

/* The approval card: gold edge, because it asks the person to let something happen. */
.jasmine-approval { padding: 10px 14px 12px; border: 1px solid var(--jasmine-gold); border-radius: 14px; background: var(--jasmine-raised); }
.jasmine-card-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 700; }
.jasmine-card-heading span:last-child { font-size: 16px; color: var(--jasmine-gold); }
.jasmine-approval-buttons { display: flex; gap: 8px; margin-top: 8px; }
.jasmine-approval-buttons button { height: 28px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--jasmine-line); background: transparent; color: var(--jasmine-fg); font: 600 12px/1 var(--face), sans-serif; cursor: default; }
.jasmine-approval-buttons .jasmine-approve { background: var(--jasmine-gold); border-color: var(--jasmine-gold); color: #1A1030; }

/* A job row, as her screen lists what her AI is doing. */
.jasmine-job { padding: 9px 12px; border: 1px solid var(--jasmine-line); border-radius: 12px; background: var(--jasmine-surface); }
.jasmine-job .jasmine-card-heading { font-weight: 600; color: var(--jasmine-gold); }
.jasmine-steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.jasmine-steps li { display: flex; gap: 8px; align-items: center; color: var(--jasmine-muted); }
.jasmine-steps li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--jasmine-muted); }
.jasmine-steps li.is-working { color: var(--jasmine-fg); }
.jasmine-steps li.is-working::before { border-color: var(--jasmine-gold); }
.jasmine-steps li.is-done::before { background: var(--jasmine-purple-text); border-color: var(--jasmine-purple-text); }

.jasmine-sheet { width: 100%; border-collapse: collapse; font-size: 11px; }
.jasmine-sheet th, .jasmine-sheet td { padding: 5px 10px; text-align: left; border-bottom: 1px solid var(--jasmine-line); }
.jasmine-sheet th { color: var(--jasmine-muted); font-weight: 400; }
.jasmine-sheet tbody tr:last-child td { border-bottom: 0; }
.jasmine-sheet .jasmine-amount { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- The request box ---------- */

.jasmine-composer { display: flex; gap: 8px; flex: none; padding: 0 16px 14px; }
.jasmine-input { flex: 1; display: flex; align-items: center; height: 38px; padding: 0 18px; border: 1px solid var(--jasmine-line); border-radius: 999px; background: var(--jasmine-surface); color: var(--jasmine-muted); font-size: 13px; }
.jasmine-send { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--jasmine-purple); }
.jasmine-send .jasmine-icon { width: 17px; height: 17px; }

/* ---------- Play with sound ---------- */

.jasmine-play {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  transform: translateX(-50%);
  height: 38px;
  padding: 0 22px;
  border: 1px solid var(--jasmine-gold);
  border-radius: 999px;
  background: var(--jasmine-gold);
  color: #1A1030;
  font: 700 13px/1 var(--face), sans-serif;
  white-space: nowrap;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.jasmine-play:hover { filter: brightness(1.08); }
.jasmine-play:focus-visible { outline: 2px solid var(--jasmine-gold); outline-offset: 3px; }
/* Once sound is on the button steps back, since it only has to switch it off. */
.jasmine-play[aria-pressed="true"] { background: var(--jasmine-raised); border-color: var(--jasmine-line); color: var(--jasmine-fg); }

/* ---------- Narrow screens: the work stacks under the conversation ---------- */

@media (max-width: 900px) {
  .jasmine-demo { --jasmine-ring-size: 48px; }
  .jasmine-window { height: 660px; }
  .jasmine-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: 244px minmax(0, 1fr); }
  /* The ring and her state sit side by side so the conversation keeps its height. */
  .jasmine-listen { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: center; column-gap: 8px; }
  .jasmine-state { text-align: left; }
  .jasmine-conversation { grid-column: 1 / -1; align-self: stretch; }
  .jasmine-work { padding: 0 16px 8px; }
  .jasmine-basket li { padding: 1px 0; }
  .jasmine-sheet th, .jasmine-sheet td { padding: 3px 10px; }
  .jasmine-approval { padding: 8px 12px 10px; }
}
@media (max-width: 520px) {
  .jasmine-engine, .jasmine-control:nth-of-type(n+3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .jasmine-demo *, .jasmine-demo *::before { animation: none !important; transition: none !important; }
  .jasmine-demo[data-state="thinking"] .jasmine-arc,
  .jasmine-demo[data-state="working"] .jasmine-arc { border-color: var(--jasmine-gold); }
}

@keyframes jasmine-appear { from { opacity: 0; transform: translateY(6px); } }
