/* ThynkIA 08/11/2026: home "Antes y después de un agente" (V4).
   White window: the average ROI on a dark card, beside one table (before, with an agent, change).
   Plays once when it reaches the screen: js/reveal.js adds .is-in to [data-play]; the 322 counts up (site.js data-count).
   The starting (hidden) states only apply while reveal.js runs (html.tk-rv), so without it everything simply shows. */
.rx4-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; }
.rx4-head .lead { justify-self: end; }
.rx4-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.rx4-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.rx4-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 16px; margin-top: 50px; }
.rx4-hero { background: var(--ink); color: #fff; border-radius: 24px; padding: 34px 32px; display: flex; flex-direction: column; }
.rx4-k { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #a9a3f7; }
.rx4-roi { font-size: 128px; line-height: .9; font-weight: 600; letter-spacing: -.06em; margin: 22px 0 6px; font-variant-numeric: tabular-nums; }
.rx4-roi small { font-size: 64px; letter-spacing: -.03em; }
.rx4-roi-p { margin: 0; color: #c9cbd3; font-size: 16.5px; }
.rx4-bars { margin-top: auto; display: grid; gap: 14px; padding-top: 30px; }
.rx4-bars > div { display: grid; grid-template-columns: 96px 1fr 64px; gap: 12px; align-items: center; font-size: 14px; color: #c9cbd3; }
.rx4-bars b { text-align: right; color: #fff; font-weight: 600; white-space: nowrap; }
.rx4-bars .tr { height: 12px; border-radius: 9px; background: rgba(255,255,255,.07); overflow: hidden; }
.rx4-bars .tr i { display: block; height: 100%; width: calc(var(--w) * 100%); border-radius: inherit; background: #6b7080; transform-origin: left; transition: transform 1.2s var(--ease) .5s; }
.rx4-bars .now .tr i { background: linear-gradient(90deg, var(--accent), var(--accent-2, #8f84f5)); transition-delay: .9s; }

.rx4-tbl { background: var(--ground); border-radius: 24px; padding: 10px 28px 14px; min-width: 0; }
.rx4-tbl table { width: 100%; border-collapse: collapse; }
.rx4-tbl thead th { text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim, #8a8f9c); padding: 18px 12px 14px; }
.rx4-tbl thead th.c { color: var(--accent); }
.rx4-tbl th:first-child { padding-left: 0; }
.rx4-tbl tbody th, .rx4-tbl td { padding: 22px 12px; border-top: 1px solid rgba(11,15,26,.08); font-size: 17px; vertical-align: middle; text-align: left; }
.rx4-tbl tbody th { font-weight: 600; color: var(--ink); padding-left: 0; }
.rx4-tbl tbody tr { transition: opacity .5s var(--ease), translate .5s var(--ease); transition-delay: calc(var(--k) * 160ms + 200ms); }
/* the strike is a background line, so it also crosses out every line of a value that wraps */
.rx4 .old { color: var(--dim, #8a8f9c); font-size: 19px; line-height: 1.35; padding: 0 3px; background: linear-gradient(#d0453a, #d0453a) left 58% / 100% 2.5px no-repeat;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size .45s var(--ease); transition-delay: calc(var(--k) * 160ms + 650ms); }
.rx4 .new { display: inline-block; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; color: var(--ink); transition: opacity .4s var(--ease), scale .5s cubic-bezier(.2,.9,.25,1.15); transition-delay: calc(var(--k) * 160ms + 950ms); }
.rx4 .chg { display: inline-flex; white-space: nowrap; align-items: center; min-height: 30px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: #4a35c9; font-size: 14px; font-weight: 700; line-height: 1.2; }

.rx4-foot { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rx4-foot li { border: 1px solid rgba(11,15,26,.1); border-radius: var(--r-m); padding: 16px 20px; display: flex; align-items: baseline; gap: 12px; }
.rx4-foot b { font-size: 28px; font-weight: 600; letter-spacing: -.03em; white-space: nowrap; color: var(--ink); }
.rx4-foot span { color: var(--ink-2); font-size: 15px; line-height: 1.35; }
.rx4-more { margin: 34px 0 0; }
.rx4-more a { font-weight: 600; text-decoration: none; font-size: 16px; color: var(--accent); }
.rx4-more a:hover { text-decoration: underline; }

/* starting states (only while reveal.js is running, and only until the block is on screen) */
.tk-rv .rx4-grid:not(.is-in) .rx4-bars .tr i { transform: scaleX(0); }
.tk-rv .rx4-grid:not(.is-in) tbody tr { opacity: 0; translate: -14px 0; }
.tk-rv .rx4-grid:not(.is-in) .old { background-size: 0% 2.5px; }
.tk-rv .rx4-grid:not(.is-in) .new { opacity: 0; scale: .85; }

@media (max-width: 1240px) {
  .rx4-grid { grid-template-columns: 1fr; }
  .rx4-roi { font-size: 104px; }
}
@media (max-width: 900px) {
  .rx4-head { grid-template-columns: 1fr; gap: 18px; }
  .rx4-head .lead { justify-self: start; }
}
/* phones: each row becomes a small card (name, then before -> with an agent, then the change) */
@media (max-width: 700px) {
  .rx4-grid { margin-top: 34px; }
  .rx4-hero { padding: 26px 22px; }
  .rx4-roi { font-size: 84px; }
  .rx4-roi small { font-size: 44px; }
  .rx4-bars > div { grid-template-columns: auto 1fr auto; }
  .rx4-bars > div > span:first-child { white-space: nowrap; min-width: 72px; }
  .rx4-tbl { padding: 6px 18px 10px; }
  .rx4-tbl thead { display: none; }
  .rx4-tbl table, .rx4-tbl tbody { display: block; }
  .rx4-tbl tbody tr { display: grid; grid-template-columns: auto auto 1fr; align-items: center; column-gap: 12px; row-gap: 6px; padding: 16px 0; border-top: 1px solid rgba(11,15,26,.08); }
  .rx4-tbl tbody tr:first-child { border-top: 0; }
  .rx4-tbl tbody th, .rx4-tbl td { display: block; padding: 0; border: 0; }
  .rx4-tbl tbody th { grid-column: 1 / -1; font-size: 15px; }
  .rx4-tbl td:nth-child(3)::before { content: "→"; color: var(--dim, #8a8f9c); margin-right: 10px; font-size: 16px; }
  .rx4-tbl td:last-child { justify-self: end; }
  .rx4 .old { font-size: 16px; }
  .rx4 .new { font-size: 21px; }
  .rx4 .chg { font-size: 12.5px; padding: 3px 10px; min-height: 26px; }
  .rx4-foot { grid-template-columns: 1fr; gap: 10px; }
  .rx4-foot li { padding: 14px 16px; }
  .rx4-foot b { font-size: 24px; }
}
@media (max-width: 420px) {
  .rx4-tbl tbody tr { grid-template-columns: auto 1fr; }
  .rx4-tbl td:last-child { grid-column: 1 / -1; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .rx4-bars .tr i, .rx4-tbl tbody tr, .rx4 .old, .rx4 .new { transition: none; }
}
