/* RevAIvo use-case components.
   Used by the use-case cards on healthcare.html and by every page in /use-cases/.
   Relies on the site tokens (--navy, --gold, --line, --gray, ...) defined in each page's base styles. */

:root { --gold-ink: #8A6417; }

/* ---------- Icon tile (cards + sidebar) ---------- */
.uc-ico {
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--navy-mid), var(--navy-light));
  box-shadow: inset 0 0 0 1px var(--line-dark);
  color: var(--gold);
}
.uc-ico svg {
  position: relative;
  width: 52%;
  height: 52%;
  max-width: 64px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.uc-ico::before, .uc-ico::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--line-dark);
}
.uc-ico::before { inset: -35%; }
.uc-ico::after { inset: -8%; border-color: #2E4E72; }

.uc-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(217,164,65,0.17);
  color: var(--gold-ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

/* ---------- Card grid (healthcare.html + "similar use cases") ---------- */
.uc-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: -24px 0 32px; }
.uc-filter {
  font: 600 14px 'Inter', sans-serif;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--gray);
  cursor: pointer;
}
.uc-filter:hover { border-color: var(--gold); color: var(--ink); }
.uc-filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.uc-filter:focus-visible, .uc-card:focus-visible, .uc-copy:focus-visible, .uc-share:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.uc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.uc-grid.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .uc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .uc-grid, .uc-grid.two { grid-template-columns: 1fr; } }

.uc-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.uc-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -20px rgba(11,31,58,0.45);
}
.uc-card[hidden] { display: none; }
.uc-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 22px; }
.uc-card .uc-ico { width: 60px; height: 60px; border-radius: 12px; }
.uc-card h3 { font-size: 19px; line-height: 1.25; color: var(--ink); margin-bottom: 10px; }
.uc-card p { font-size: 14.5px; line-height: 1.5; color: var(--gray); flex: 1; }
.uc-more {
  align-self: flex-start;
  margin-top: 20px;
  padding: 9px 14px;
  border-radius: 8px;
  background: rgba(217,164,65,0.15);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}
.uc-card:hover .uc-more { background: var(--gold); }

/* ---------- Detail page: hero extras ---------- */
section.hero.uc-hero { padding: 64px 0 72px; }
.uc-hero .solo-hero { max-width: 780px; }
.uc-pill {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(232,199,132,0.08);
  border: 1px solid rgba(232,199,132,0.38);
  color: var(--gold-soft);
  font-size: 13.5px;
  font-weight: 600;
}
.uc-hero h1.headline { font-size: clamp(32px, 4.4vw, 50px); }
.uc-hero .hero-sub { max-width: 640px; }

/* ---------- Detail page: two-column body ---------- */
.uc-main { padding: 72px 0 40px; }
.uc-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; }
@media (max-width: 960px) { .uc-body { grid-template-columns: 1fr; gap: 40px; } }

.uc-sec { padding-top: 56px; }
.uc-sec:first-child { padding-top: 0; }
.uc-sec + .uc-sec { margin-top: 56px; border-top: 1px solid var(--line); }
.uc-eyebrow { font: 600 13.5px 'Space Grotesk', sans-serif; color: var(--gold-ink); margin-bottom: 10px; }
.uc-sec h2 { font-size: clamp(26px, 3vw, 32px); color: var(--ink); }
.uc-lead { margin-top: 14px; font-size: 16.5px; line-height: 1.55; color: var(--gray); }
.uc-sub { margin-top: 28px; font-size: 15px; font-weight: 600; color: var(--ink); }

/* Challenge: problem -> "as a result" cards */
.uc-probs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
@media (max-width: 760px) { .uc-probs { grid-template-columns: 1fr; } }
.uc-prob { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; display: flex; flex-direction: column; }
.uc-prob p { font-size: 15px; line-height: 1.5; color: var(--ink); }
.uc-prob hr { border: 0; border-top: 1px dashed var(--line); margin: 16px 0 14px; }
.uc-prob .uc-as { font: 600 12.5px 'Space Grotesk', sans-serif; color: var(--gold-ink); margin-bottom: 6px; }
.uc-prob .uc-as + p { color: var(--gray); font-size: 14.5px; }

/* Approach: numbered lists */
.uc-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.uc-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.uc-list li::before {
  counter-increment: uc;
  content: counter(uc);
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: -1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font: 600 12.5px 'Space Grotesk', sans-serif;
}
.uc-list { counter-reset: uc; }
.uc-list.need li::before { background: var(--gold); color: var(--navy); }

/* Solution: feature grid */
.uc-feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 26px; }
@media (max-width: 640px) { .uc-feats { grid-template-columns: 1fr; } }
.uc-feat { background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 4px var(--radius) var(--radius) 4px; padding: 20px 22px; }
.uc-feat .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font: 600 12px 'Space Grotesk', sans-serif; margin-bottom: 12px; }
.uc-feat h3 { font-size: 17.5px; color: var(--ink); margin-bottom: 8px; }
.uc-feat p { font-size: 14.5px; line-height: 1.55; color: var(--gray); }

/* Hand-off boundaries */
.uc-handoff { margin-top: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.uc-handoff h3 { font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.uc-handoff > p { font-size: 14px; color: var(--gray); }
.uc-handoff ul { list-style: none; margin: 14px 0 0; padding: 0; }
.uc-handoff li { position: relative; padding: 10px 0 10px 26px; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.uc-handoff li:first-child { border-top: 0; }
.uc-handoff li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* Example call */
.uc-call { margin-top: 26px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.uc-call-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 22px; background: var(--navy); color: #C9D4E3; font-size: 13px; }
.uc-call-head b { color: #fff; font-weight: 600; }
.uc-turns { padding: 8px 22px 6px; }
.uc-turn { display: grid; grid-template-columns: 78px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.uc-turn:first-child { border-top: 0; }
.uc-turn .who { font: 600 12.5px 'Space Grotesk', sans-serif; color: var(--gray-soft); padding-top: 2px; }
.uc-turn.agent .who { color: var(--gold-ink); }
.uc-turn p { color: var(--ink); }
.uc-turn.handoff p { font-weight: 500; }
.uc-call-foot { padding: 14px 22px; background: rgba(217,164,65,0.12); border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.uc-call-foot b { font-weight: 600; }
@media (max-width: 520px) { .uc-turn { grid-template-columns: 1fr; gap: 2px; } }

/* Impact panel */
.uc-impact { margin-top: 56px; padding: 40px 36px; border-radius: 20px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, var(--navy-light) 0%, var(--navy) 62%); border: 1px solid var(--line-dark); }
.uc-impact h2 { color: #fff; font-size: clamp(26px, 3vw, 32px); }
.uc-impact .uc-lead { color: #B7C4D9; margin-top: 8px; }
.uc-tiles { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 28px; row-gap: 0; margin-top: 30px; }
@media (max-width: 760px) { .uc-tiles { grid-template-columns: 1fr; } .uc-tile { margin-bottom: 22px; } .uc-tile:last-child { margin-bottom: 0; } }
/* subgrid: the value row and label row line up across all three tiles even when one value wraps */
.uc-tile { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 0; align-content: start; padding-top: 16px; border-top: 1px solid var(--line-dark); }
.uc-tile b { display: block; font: 600 clamp(26px, 3.2vw, 34px)/1.1 'Space Grotesk', sans-serif; color: var(--gold-soft); margin-bottom: 8px; text-wrap: balance; }
.uc-tile span { font-size: 14.5px; line-height: 1.45; color: #B7C4D9; }
.uc-note { margin-top: 28px; padding: 4px 0 4px 18px; border-left: 3px solid var(--gold); font-size: 15px; line-height: 1.55; color: var(--ink); }
.uc-result { margin-top: 56px; }
.uc-result h2 { font-size: clamp(26px, 3.2vw, 34px); color: var(--ink); }
.uc-result p { margin-top: 12px; font-size: 16px; color: var(--gray); }

/* Sidebar */
.uc-aside { position: sticky; top: 100px; display: grid; gap: 16px; }
.uc-aside-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.uc-aside .uc-ico { width: 100%; height: 150px; border-radius: 12px; }
.uc-aside .uc-ico svg { width: 64px; height: 64px; }
.uc-aside .btn { width: 100%; justify-content: center; margin-top: 16px; padding: 13px 22px; }
.uc-share-row { display: flex; justify-content: center; gap: 22px; margin-top: 14px; }
.uc-copy, .uc-share { background: none; border: 0; padding: 4px 0; font: 500 13.5px 'Inter', sans-serif; color: var(--gray); cursor: pointer; }
.uc-copy:hover, .uc-share:hover { color: var(--ink); text-decoration: underline; }
.uc-facts { margin: 0; padding: 4px 6px 2px; }
.uc-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.uc-facts div:first-child { border-top: 0; }
.uc-facts dt { color: var(--gray); }
.uc-facts dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }
@media (max-width: 960px) { .uc-aside { position: static; } .uc-aside .uc-ico { display: none; } }

/* Similar use cases + closing banner */
.uc-similar { padding: 72px 0 24px; }
.uc-similar-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.uc-similar-head h2 { font-size: clamp(26px, 3vw, 32px); color: var(--ink); }
.uc-similar-head .btn { background: var(--navy); color: #fff; }
.uc-similar-head .btn:hover { background: var(--navy-light); }
.uc-cta { margin: 56px 0 96px; padding: 52px 48px; border-radius: 24px; color: #fff; background: radial-gradient(90% 160% at 100% 0%, var(--navy-light) 0%, var(--navy) 65%); border: 1px solid var(--line-dark); }
.uc-cta h2 { font-size: clamp(26px, 3.4vw, 38px); max-width: 640px; color: #fff; }
.uc-cta p { margin-top: 14px; font-size: 16.5px; line-height: 1.5; color: #B7C4D9; max-width: 560px; }
.uc-cta .btn { margin-top: 28px; padding: 15px 30px; font-size: 15.5px; }
@media (max-width: 640px) { .uc-cta { padding: 36px 24px; border-radius: 18px; } .uc-impact { padding: 30px 22px; } }

@media (prefers-reduced-motion: reduce) {
  .uc-card { transition: none; }
  .uc-card:hover { transform: none; }
}

/* ---------- Channel chips on cards ---------- */
.uc-chans { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.uc-chans span {
  padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--cream); color: var(--gray); font-size: 12px; font-weight: 500; line-height: 1.4;
}

/* ---------- Messages sent after the call ---------- */
.uc-sends { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; margin-top: 16px; }
.uc-send { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.uc-send-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 16px; background: var(--navy); color: #C9D4E3; font-size: 12.5px; }
.uc-send-chan { display: inline-flex; align-items: center; gap: 7px; flex: none; color: #fff; font-weight: 600; white-space: nowrap; }
.uc-send-chan svg { flex: none; width: 15px; height: 15px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.uc-when { text-align: right; line-height: 1.35; }
.uc-send-body { padding: 16px; }
.uc-subject { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); font: 600 13.5px 'Inter', sans-serif; color: var(--ink); }
.uc-msg { font-size: 14.5px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.uc-send.text .uc-msg { padding: 12px 14px; background: var(--cream); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; }
.uc-sends-note { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--gray-soft); }

/* ---------- Scenario assumptions + page disclaimer ---------- */
.uc-assume { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line-dark); font-size: 13.5px; line-height: 1.55; color: #B7C4D9; }
.uc-disclaimer { max-width: 780px; margin: 0 auto; padding: 8px 0 56px; text-align: center; font-size: 12px; line-height: 1.55; color: var(--gray-soft); }

/* ---------- "Works both ways": inbound and outbound versions of one use case ---------- */
.uc-modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
@media (max-width: 640px) { .uc-modes { grid-template-columns: 1fr; } }
.uc-mode { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.uc-mode-tag { display: inline-block; margin-bottom: 12px; padding: 4px 11px; border-radius: 999px; background: rgba(217,164,65,0.17); color: var(--gold-ink); font-size: 12.5px; font-weight: 600; }
.uc-mode p { font-size: 14.5px; line-height: 1.5; color: var(--gray); }
.uc-mode blockquote { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; background: var(--cream); font-size: 14px; line-height: 1.5; color: var(--ink); }
