@import url("theme/tokens.css");

/* deck-wide legibility bump: captions, axis labels and legends were too faded */
:root {
  --faint: #8ba3bd;
}

:root {
  --bad: #e5484d; /* false alarm: red, distinct from --alarm orange (undecided) */
}

html, body, .reveal-viewport, .reveal {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
}

.reveal {
  font-size: 32px;
  font-weight: 400;
}

.reveal .slides {
  text-align: left;
}

.reveal .slides section {
  text-align: left;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

.reveal h1,
.reveal h2,
.reveal h3 {
  font-family: var(--font-text);
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.1;
  text-shadow: none;
  margin: 0;
}

.reveal .slides section.asset h1,
.reveal .slides section.asset h2,
.reveal .slides section.asset h3,
.reveal .slides section.asset ul,
.reveal .slides section.asset ol {
  display: none;
}

.reveal .slides section.asset p {
  margin: 0;
  padding: 0;
  font-size: 0;
  line-height: 0;
}

.reveal .slides section.asset .asset {
  position: absolute;
  inset: 0;
  width: 1920px;
  height: 1080px;
  object-fit: contain;
  background: var(--bg);
  border: 0;
  display: block;
}

.reveal .slides section.text h2 {
  position: absolute;
  left: 96px;
  top: 94px;
  font-size: 56px;
  font-weight: 600;
  width: 1728px;
}

.reveal .slides section.text .body {
  position: absolute;
  left: 96px;
  top: 200px;
  width: 1728px;
  font-size: 32px;
  line-height: 1.35;
  color: var(--ink);
}

.reveal .slides section.text .body p {
  font-size: 32px;
  margin: 0 0 0.4em 0;
}

.reveal .slides section.text .body ul,
.reveal .slides section.text .body ol {
  margin: 0.2em 0 0.6em 1.2em;
  padding: 0;
}

.reveal .slides section.text .body li {
  font-size: 32px;
  margin: 0.18em 0;
}

.reveal .slides section.text .big {
  position: absolute;
  left: 96px;
  top: 620px;
  font-family: var(--font-mono);
  font-size: 240px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin: 0;
}

/* v2 additions: two-column text slides, stat rows, stubs */

.reveal .slides section.text .cols {
  position: absolute;
  left: 96px;
  top: 220px;
  width: 1728px;
  display: flex;
  gap: 96px;
}

.reveal .slides section.text .cols .col {
  flex: 1;
  font-size: 34px;
  line-height: 1.4;
}

.reveal .slides section.text .cols .col h3 {
  font-size: 28px;
  font-weight: 600;
  color: var(--muted, #8ba3c0);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 24px 0;
}

.reveal .slides section.text .cols .col ul {
  margin: 0 0 0 1.1em;
  padding: 0;
}

.reveal .slides section.text .cols .col li {
  font-size: 34px;
  margin: 0.35em 0;
}

.reveal .slides section.text .cols .col .accent {
  color: var(--accent);
  font-weight: 600;
}

.reveal .slides section.text .stats {
  position: absolute;
  left: 96px;
  top: 560px;
  width: 1728px;
  display: flex;
  gap: 48px;
}


.reveal .slides section.text .stats .stat {
  flex: 1;
}

.reveal .slides section.text .stats .stat .n {
  font-family: var(--font-mono);
  font-size: 88px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.05;
}

.reveal .slides section.text .stats .stat .l {
  font-size: 26px;
  color: var(--muted, #8ba3c0);
  margin-top: 12px;
  line-height: 1.3;
}

.reveal .slides section.text .punch {
  position: absolute;
  left: 96px;
  top: 860px;
  width: 1728px;
  font-size: 40px;
  font-weight: 600;
  color: var(--ink);
}

.reveal .slides section.text .inline-video {
  position: absolute;
  left: 96px;
  top: 190px;
  width: 1500px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
}

.reveal .slides section.text .inline-video video {
  display: block;
  width: 100%;
  height: auto;
}

.reveal .slides section.text .cards-lead {
  position: absolute;
  left: 96px;
  top: 560px;
  width: 1728px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.reveal .slides section.text .det-cards {
  position: absolute;
  left: 96px;
  top: 230px;
  width: 1728px;
  display: flex;
  gap: 48px;
}

.reveal .slides section.text .det-cards .det-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 32px;
}

.reveal .slides section.text .det-cards .det-card h3 {
  font-size: 26px;
  font-weight: 600;
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 20px 0;
}

.reveal .slides section.text .det-cards .det-card img {
  width: 100%;
  height: 300px;
  object-fit: contain;
  background: var(--bg);
  border-radius: 8px;
  display: block;
}

.reveal .slides section.text .det-cards .det-card .quote {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  font-weight: 600;
  font-style: italic;
  color: var(--ink);
  text-align: center;
  background: var(--bg);
  border-radius: 8px;
  padding: 0 24px;
}

.reveal .slides section.text .det-cards .det-card .cap {
  font-size: 26px;
  line-height: 1.35;
  color: var(--muted);
  margin-top: 20px;
}

.reveal .slides section.text .pairs {
  position: absolute;
  left: 96px;
  top: 230px;
  width: 1728px;
}

.reveal .slides section.text .pairs .pair-head {
  display: flex;
  gap: 48px;
  margin-bottom: 24px;
}

.reveal .slides section.text .pairs .pair-head .h {
  flex: 1;
  font-size: 26px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.reveal .slides section.text .pairs .pair-head .h.flagged {
  color: var(--accent);
}

.reveal .slides section.text .pairs .pair-head .h.allowed {
  color: var(--ok);
}

.reveal .slides section.text .pairs .cat {
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--faint);
  margin: 0 0 12px 0;
}

.reveal .slides section.text .pairs .pair {
  display: flex;
  gap: 48px;
  margin-bottom: 30px;
  align-items: stretch;
}

.reveal .slides section.text .pairs .pair .flag,
.reveal .slides section.text .pairs .pair .ok {
  flex: 1;
  font-size: 32px;
  line-height: 1.35;
  padding: 18px 28px;
  border-radius: 10px;
}

.reveal .slides section.text .pairs .pair .flag {
  border-left: 6px solid var(--accent);
  background: rgba(92, 168, 245, 0.08);
}

.reveal .slides section.text .pairs .pair .ok {
  border-left: 6px solid var(--ok);
  background: rgba(61, 207, 154, 0.08);
}

/* title slide */

.reveal .slides section.text.title-slide h1 {
  position: absolute;
  left: 96px;
  top: 290px;
  width: 1728px;
  font-size: 112px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--ink);
}

/* Loop: 10s idle, strike "Model", write "Pipeline" above, hold 10s, un-write, un-strike. Scoped to .present so it restarts on every visit. */
.title-slide .swap {
  position: relative;
  display: inline-block;
}

.title-slide .swap-strike {
  position: absolute;
  left: -4%;
  top: 36%;
  width: 108%;
  height: 40%;
  overflow: visible;
}

.title-slide .swap-strike path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 9px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1 3;
  stroke-dashoffset: 1.1;
}

.title-slide .swap-new {
  position: absolute;
  left: 50%;
  bottom: 94%;
  transform: translateX(-50%) rotate(-3deg);
  font-size: 76px;
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  /* Padding gives the italic overhang room inside the clip box; without it the final "e" gets shaved. */
  padding: 0.1em 0.25em;
  clip-path: inset(0 100% 0 0);
}

.title-slide.present .swap {
  animation: swap-dim 24s ease-in-out infinite;
}

.title-slide.present .swap-strike path {
  animation: swap-strike 24s ease-in-out infinite;
}

.title-slide.present .swap-new {
  animation: swap-write 24s ease-in-out infinite;
}

@keyframes swap-strike {
  0%, 41.7% { stroke-dashoffset: 1.1; }
  44.2%, 92.5% { stroke-dashoffset: 0; }
  95.4%, 100% { stroke-dashoffset: 1.1; }
}

@keyframes swap-write {
  0%, 44.6% { clip-path: inset(0 100% 0 0); }
  48.3%, 89.6% { clip-path: inset(0 0 0 0); }
  92.5%, 100% { clip-path: inset(0 0 0 100%); }
}

@keyframes swap-dim {
  0%, 41.7% { color: var(--ink); }
  44.2%, 92.5% { color: var(--muted); }
  95.4%, 100% { color: var(--ink); }
}

.reveal .slides section.text.title-slide .subtitle {
  position: absolute;
  left: 96px;
  top: 470px;
  width: 1728px;
  font-size: 40px;
  color: var(--muted);
  margin: 0;
}

.reveal .slides section.text.title-slide .socials {
  position: absolute;
  left: 96px;
  top: 680px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-size: 36px;
}

.reveal .slides section.text.title-slide .socials a,
.reveal .slides section.text.title-slide .socials .row {
  color: var(--ink);
  text-decoration: none;
}

.reveal .slides section.text.title-slide .socials .k {
  display: inline-block;
  width: 200px;
  font-family: var(--font-mono);
  font-size: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.reveal .slides section.text.title-slide .byline {
  position: absolute;
  left: 96px;
  top: 560px;
  width: 1728px;
  font-family: var(--font-mono);
  font-size: 28px;
  color: var(--muted);
  margin: 0;
}

.reveal .slides section.text.title-slide .title-viz {
  position: absolute;
  left: 96px;
  top: 700px;
  width: 1728px;
  height: 230px;
}

.reveal .slides section.text.title-slide .wordmark {
  width: 300px;
  top: 94px;
  right: 96px;
  bottom: auto;
}

.title-viz .ch {
  opacity: 0.12;
  animation: chunk-cycle 16s linear infinite;
  animation-delay: calc(var(--i) * 0.45s);
}

@keyframes chunk-cycle {
  0% { opacity: 0.12; }
  2% { opacity: 1; }
  68% { opacity: 1; }
  76% { opacity: 0.12; }
  100% { opacity: 0.12; }
}

@media print {
  .title-viz .ch {
    animation: none;
    opacity: 1;
  }
}

.reveal .slides section.text .bar-viz {
  position: absolute;
  left: 96px;
  top: 205px;
  width: 1728px;
  height: 345px;
}

.reveal .slides section.text svg .rowlab {
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 0.08em;
  fill: var(--faint);
}

.reveal .slides section.text svg .evlab {
  font-size: 22px;
  fill: var(--ink);
}

.reveal .slides section.text svg .caplab {
  font-size: 22px;
  fill: var(--faint);
}

.reveal .slides section.text .quotes {
  position: absolute;
  left: 96px;
  top: 604px;
  width: 1728px;
}

.reveal .slides section.text .quotes .lead {
  font-size: 32px;
  color: var(--ink);
  margin: 0 0 28px 0;
}

.reveal .slides section.text .quotes .quote-row {
  display: flex;
  gap: 32px;
  align-items: baseline;
  margin-bottom: 22px;
}

.reveal .slides section.text .quotes .quote-row .who {
  width: 300px;
  font-size: 26px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.reveal .slides section.text .quotes .quote-row .q {
  font-size: 36px;
  font-style: italic;
  font-weight: 600;
  color: var(--ink);
}

.reveal .slides section.text .quotes .quote-row .who .v {
  display: inline-block;
  margin-left: 10px;
  font-size: 20px;
  letter-spacing: 0.06em;
  padding: 2px 10px;
  border-radius: 6px;
}

.reveal .slides section.text .quotes .quote-row .who .v.flag {
  color: var(--accent-soft);
  border: 1px solid var(--accent);
}

.reveal .slides section.text .quotes .quote-row .who .v.clean {
  color: var(--ok);
  border: 1px solid var(--ok);
}

/* slide 9: animated Live-API stream */
.reveal .slides section.text .live-viz {
  position: absolute;
  left: 96px;
  top: 200px;
  width: 1728px;
  height: 430px;
}

@keyframes liveFlow {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 1; }
  92% { opacity: 1; }
  100% { transform: translateX(920px); opacity: 0; }
}

/* One 20s dialogue loop: ask (0-4s), answer A (5-9s), ask (10-14s), answer B (15-19s).
   Lane runs x=380..1388; pills are 520 wide, so each trip is 488px. */
@keyframes liveAsk {
  0% { transform: translateX(0); opacity: 0; }
  4% { opacity: 1; }
  36% { opacity: 1; }
  40% { transform: translateX(488px); opacity: 0; }
  100% { transform: translateX(488px); opacity: 0; }
}

@keyframes liveAnswer {
  0%, 25% { transform: translateX(0); opacity: 0; }
  27% { opacity: 1; }
  43% { opacity: 1; }
  45% { transform: translateX(-488px); opacity: 0; }
  100% { transform: translateX(-488px); opacity: 0; }
}

.live-viz .frame {
  animation: liveFlow 5s linear infinite;
}

.live-viz .adot {
  animation: liveFlow 2.5s linear infinite;
}

.live-viz .nudge {
  animation: liveAsk 10s linear infinite;
}

.live-viz .reply {
  animation: liveAnswer 20s linear infinite;
}

/* slide 10: frames + Sonnet batch chain */
@keyframes framesShort {
  0% { transform: translateX(0); opacity: 0; }
  8% { opacity: 0.9; }
  90% { opacity: 0.9; }
  100% { transform: translateX(250px); opacity: 0; }
}

@keyframes backlogGrow {
  from { transform: scaleX(0.03); }
  to { transform: scaleX(1); }
}

@keyframes verdictDot {
  0% { transform: translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(330px); opacity: 0; }
}

@keyframes verdictDotShort {
  0% { transform: translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(100px); opacity: 0; }
}

.fviz .vdot12 {
  animation: verdictDotShort 5s linear infinite;
}

@keyframes verdictDotXS {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(58px); opacity: 0; }
}

.fviz .vdot17 {
  animation: verdictDotXS 4s linear infinite;
}

.fviz .frame10 {
  animation: framesShort 3s linear infinite;
}

.fviz .backlog {
  transform-box: fill-box;
  transform-origin: left center;
  animation: backlogGrow 14s linear infinite;
}

.fviz .vdot {
  animation: verdictDot 6s linear infinite;
}

/* slide 11: same screen, two histories */
@keyframes ctxPulse {
  0%, 42% { opacity: 1; }
  50%, 92% { opacity: 0.25; }
  100% { opacity: 1; }
}

.whyviz .ctx {
  animation: ctxPulse 9s ease-in-out infinite;
}

.reveal .slides section.text.stub h2 {
  color: var(--muted, #8ba3c0);
}

.reveal .slides section.text.stub .stub-tag {
  position: absolute;
  right: 96px;
  top: 100px;
  font-family: var(--font-mono);
  font-size: 26px;
  color: var(--warn, #f2994a);
  border: 1px solid var(--warn, #f2994a);
  padding: 6px 16px;
  border-radius: 6px;
}

.reveal .slides section.text .slide-ref {
  position: absolute;
  left: 96px;
  right: 260px;
  top: 984px;
  border-top: 1px solid var(--faint);
  padding-top: 10px;
  font-size: 22px;
  color: var(--faint);
  line-height: 1.3;
}

.reveal .slides section.text .wordmark {
  position: absolute;
  right: 96px;
  bottom: 48px;
  width: 140px;
  height: auto;
  pointer-events: none;
}

.reveal .slides section.asset .slide-ref,
.reveal .slides section.asset .wordmark {
  display: none;
}

.reveal .controls,
.reveal .playback {
  display: none;
}

.reveal .progress {
  height: 4px;
  color: var(--accent);
}

.reveal .slide-number {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--faint);
  background: transparent;
}

@media print {
  html, body, .reveal-viewport, .reveal, .reveal .slides, .reveal .slides section {
    background: #06162b !important;
    color: #f4f7fb !important;
  }
  .reveal .slides section.asset .asset {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

.reveal .slides section.text .bias-tag {
  position: absolute;
  left: 96px;
  top: 40px;
  padding: 4px 14px;
  border: 2px solid var(--alarm);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--alarm);
}

.reveal .slides section.text .bias-chip {
  display: inline-block;
  margin-left: 0.3em;
  padding: 0 10px;
  border: 2px solid var(--alarm);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--alarm);
  vertical-align: 0.2em;
  white-space: nowrap;
}
