/* The AI-agent pages (/product/*): app/(taste)/[locale]/product/[slug]/page.tsx.
   Scoped to main.casos; only what sits inside a visual, plus the sections' heights. */

/* the hero: the lit frame fills the split's picture column; the call rises in it,
   the measured figure and the channels on the one float card, lower left */
.casos .hero__media > .casos-hero__frame { position: absolute; inset: 0; border-radius: inherit; }
.casos-float { gap: var(--s-3); }
.casos-float__metric { margin: 0; display: grid; gap: var(--s-1); font-size: var(--t-small); color: var(--muted); }
.casos-float__fig { font: 500 var(--t-stat)/1 var(--font-mono); letter-spacing: -0.02em; color: var(--ink); }
.casos-float__ch { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.casos-float__ch li { font: 500 13px/1 var(--font-mono); padding: 6px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--ink); }
@media (max-width: 1023px) { .casos .casos-float { display: none; } }

/* the problem: the statement, then the four steps as a timeline across the frame */
.casos-problem h2 { max-width: 28ch; }
.casos-problem p { max-width: 62ch; }
.casos-steps { margin-top: var(--s-7); padding: var(--s-6); }
.casos-steps .dg { width: 100%; height: 100%; }

/* the facts under a split's words: the channel, the call, the outcome */
.casos-facts { margin: 0; display: grid; gap: 0; }
.casos-facts > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.casos-facts dt { color: var(--muted); }
.casos-facts dd { margin: 0; text-align: right; font-family: var(--font-mono); font-size: var(--t-small); }

/* the chat: WhatsApp's own mark in the head, the time beside each message */
.casos .casos-wa { width: 20px; height: 20px; flex: none; }
.casos .ui-chat .ui-head { gap: 8px; }
.casos .casos-ans { display: block; }
.casos .casos-t { display: block; margin-top: 2px; font: 400 12px/16px var(--font-mono); color: var(--u-muted); }
.casos .ui-msg--me .casos-t { text-align: right; }

/* the voice section is the page's one dark band; its frame stays lit in the page's light colours */
#voz .frame { --card: var(--p-bg); --ink: var(--p-ink); --muted: var(--p-muted); --accent: var(--p-accent); --accent-ink: var(--p-accent-ink); }

/* the call's transcript, on the kit's panel */
.casos-tr { width: 100%; }
.casos-tr__time { font-family: var(--font-mono); }
.casos-tr__meta { margin: 0; padding: 10px 16px 0; font: 400 12px/16px var(--font-mono); color: var(--u-muted); }
.casos-tr__lines { margin: 0; padding: 12px 16px 20px; list-style: none; display: grid; gap: 12px; }
.casos-tr__lines li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; font-size: 13px; line-height: 20px; }
.casos-tr__who { font: 500 12px/20px var(--font-mono); color: var(--u-muted); }
.casos-tr__who.is-ai { color: var(--u-ink); }
.casos-tr__text { color: var(--u-text-2); }

/* the triggers: the pipeline's name and volume under the h2, the bowtie in the frame, the results */
.casos-pipe { margin: 0; font: 500 var(--t-small)/1.5 var(--font-mono); color: var(--muted); }
.casos-pipeframe { margin-top: var(--s-7); padding: var(--s-5); min-height: 240px; }
.casos-pipeframe .dg { width: 100%; height: 100%; }
.casos-results { margin-top: var(--s-6); }
.casos-results .result { display: grid; gap: var(--s-1); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.casos-results .fig, .casos-results__label { margin: 0; }

/* the related agents: the home's product columns */
.casos-related { margin-top: var(--s-7); }
.casos-related .pillar .panel { --p-h: 220px; }

/* tablet and phone: stacked sections take two screens where their content needs it */
@media (min-width: 640px) and (max-width: 1023px) {
  #relacionados { --h: 2; }
  .casos-pipeframe { min-height: 360px; }
  .casos-steps { min-height: 320px; }
}
@media (max-width: 639px) {
  #problema, #texto, #voz, #disparadores { --hm: 2; }
  .casos-steps { padding: var(--s-4); min-height: 520px; }
  .casos-pipeframe { min-height: 420px; padding: var(--s-4); }
  .casos-results .result { grid-column: auto / span 12; }
  .casos-facts dd { max-width: 60%; }
}

/* fixes after the first check */
.casos .casos-hero__frame > .ly-float { position: absolute; }
.casos .hero--split { --ly-h1: clamp(40px, 4.1vw, 58px); }
.casos-split { align-items: stretch; }
.casos-split > .frame--fill { --ratio: 0px; }
.casos .casos-tr .casos-tr__lines { padding: 12px 16px 20px; margin: 0; }
.casos .casos-tr .casos-tr__meta { padding: 10px 16px 0; }
.casos-results .result { padding: var(--s-4) 0 0; }
.casos-stepcols { margin: var(--s-6) 0 0; padding: 0; list-style: none; }
.casos-stepcols h3 { margin: 0 0 var(--s-2); font: 500 var(--t-card)/1.3 var(--font-text); }
.casos-stepcols p { margin: 0; }
.casos-steps { min-height: 180px; }
@media (max-width: 1023px) { .casos-stepcols > li { grid-column: auto / span 6; } }
@media (max-width: 639px) { .casos-stepcols > li { grid-column: auto / span 12; } }
/* the content's longer titles (over 50 characters) set at the h2's size, so the h1 holds three lines */
.casos--long .hero--split { --ly-h1: clamp(30px, 3.35vw, 48px); }
@media (max-width: 639px) {
  .casos .casos-pipeframe { flex: none; height: 480px; min-height: 0; }
  .casos .casos-steps { flex: none; height: 440px; min-height: 0; }
}
@media (min-width: 1024px) and (max-width: 1279px) { .casos .casos-steps { min-height: 120px; } .casos .casos-stepcols { margin-top: var(--s-5); } }
@media (min-width: 640px) and (max-width: 1023px) { .casos .casos-split > .frame--fill { min-height: 440px; } }
