/* =============================================================
   Digital Hive - Use Cases parent page styles
   v2: condensed hero w/ illustration, 3-group radio selector,
        9 cards in 3-per-row grid, compact bottom CTA.
   Builds on tokens.css + site.css.
   ============================================================= */

/* -----------------------------------------------------------
   Page header (condensed; was 96/56, now 48/40)
   ----------------------------------------------------------- */
.uc-hero {
  position: relative;
  overflow: hidden;
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border-2);
  background: linear-gradient(180deg, #ECF1F6 0%, #F2F5F9 100%);
}
@media (min-width: 768px) { .uc-hero { padding: 48px 0 32px; } }

.uc-hero__motif {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(circle at 12% 88%, rgba(243, 146, 53, 0.10), transparent 42%),
    radial-gradient(circle at 88% 14%, rgba(36, 66, 113, 0.10), transparent 50%);
}

.uc-hero .container { position: relative; z-index: 1; }

.uc-hero__grid {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 960px) {
  .uc-hero__grid { grid-template-columns: 1.05fr 1fr; gap: 56px; }
}

.uc-hero h1 {
  margin: 12px 0 var(--space-4);
  max-width: 16ch;
}
.uc-hero__sub {
  font-size: var(--fs-18);
  color: var(--fg-2);
  margin: 0;
  max-width: 56ch;
  line-height: 1.5;
}

/* ----- Hero illustration: animated hub-and-spoke network -----
   Center hub matches the Connectors hero SVG; chips float and the
   dashed flow lines march toward the hub (design ref: Home v2). */
.uc-net {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  aspect-ratio: 26 / 22;
}
@media (max-width: 959px) { .uc-net { max-width: 400px; margin-top: 8px; } }

.uc-net__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.uc-net__line { animation: ucDash 1.4s linear infinite; }
.uc-net__line:nth-of-type(2) { animation-duration: 1.7s; }
.uc-net__line:nth-of-type(3) { animation-duration: 1.2s; }
.uc-net__line:nth-of-type(4) { animation-duration: 1.9s; }
.uc-net__line:nth-of-type(5) { animation-duration: 1.5s; }
.uc-net__line:nth-of-type(6) { animation-duration: 1.3s; }
@keyframes ucDash { to { stroke-dashoffset: -24; } }

.uc-net__glow { animation: ucGlow 4.8s ease-in-out infinite; }
@keyframes ucGlow {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

.uc-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  background: #fff;
  border: 1px solid var(--border-1);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(25,51,89,0.10), 0 2px 4px rgba(25,51,89,0.04);
  white-space: nowrap;
  animation: ucFloat 5s ease-in-out infinite;
}
.uc-chip img {
  width: 18px; height: 18px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.uc-chip__name {
  display: block;
  font-size: 12px;
  font-weight: var(--fw-bold);
  color: var(--dh-navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.uc-chip__count {
  display: block;
  font-size: 10px;
  color: var(--fg-2);
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}
@keyframes ucFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* chip positions + staggered float (durations/delays vary so the
   field never moves in lockstep) */
.uc-chip--pbi { left: 4%;   top: 5%;  }
.uc-chip--tab { right: 5%;  top: 2%;  animation-duration: 6s;   animation-delay: 0.8s; }
.uc-chip--cog { left: 0%;   top: 44%; animation-duration: 5.4s; animation-delay: 0.4s; }
.uc-chip--qlk { right: 0%;  top: 42%; animation-duration: 6.2s; animation-delay: 1.2s; }
.uc-chip--lkr { left: 7%;   top: 79%; animation-duration: 5.8s; animation-delay: 0.6s; }
.uc-chip--dbx { right: 7%;  top: 77%; animation-duration: 5.2s; animation-delay: 1.6s; }

@media (prefers-reduced-motion: reduce) {
  .uc-net__line, .uc-net__glow, .uc-chip { animation: none; }
}

/* -----------------------------------------------------------
   Group selector (segmented radio)
   ----------------------------------------------------------- */
.uc-tabs {
  padding: 28px 0 0;
  background: transparent;
}
.uc-tabs__inner {
  display: flex; justify-content: center;
}
.uc-tabs__bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  max-width: 920px;
  background: var(--dh-white);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow-1);
}
@media (min-width: 720px) {
  .uc-tabs__bar { grid-template-columns: repeat(3, 1fr); gap: 4px; }
}

.uc-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 18px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  text-align: left;
  color: var(--fg-2);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
}
.uc-tab__index {
  font-size: 10px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  display: flex; align-items: center; gap: 6px;
}
.uc-tab__index::before {
  content: "";
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--dh-grey-300);
  background: #fff;
  transition: border-color var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.uc-tab__lbl {
  font-size: var(--fs-18);
  font-weight: var(--fw-bold);
  color: var(--dh-navy);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.uc-tab__sub {
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.3;
}
.uc-tab:hover { background: var(--dh-grey-50); }
.uc-tab.is-on {
  background: var(--dh-navy);
}
.uc-tab.is-on .uc-tab__index,
.uc-tab.is-on .uc-tab__lbl,
.uc-tab.is-on .uc-tab__sub { color: #fff; }
.uc-tab.is-on .uc-tab__sub { color: rgba(255,255,255,0.7); }
.uc-tab.is-on .uc-tab__index::before {
  background: var(--dh-orange);
  border-color: var(--dh-orange);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.25) inset;
}

/* -----------------------------------------------------------
   Grouped rows: heading above (indented) + 3-card row beneath
   ----------------------------------------------------------- */
.uc-group-row {
  display: block;
  padding: 36px 0;
  border-top: 1px solid var(--border-2);
}
.uc-group-row:first-child { border-top: 0; padding-top: 8px; }
.uc-group-row:last-child { padding-bottom: 8px; }
@media (min-width: 768px) {
  .uc-group-row { padding: 48px 0; }
}

.uc-group-row__head {
  position: relative;
  padding-left: 18px;
  margin: 0 0 var(--space-6);
  max-width: 720px;
}
@media (min-width: 768px) {
  /* Indent the heading slightly so the accent bar reads as a margin marker */
  .uc-group-row__head { padding-left: 22px; margin-left: 8px; }
}
.uc-group-row__head::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 4px; height: 44px;
  background: var(--accent, var(--dh-orange));
  border-radius: 2px;
}
.uc-group-row[data-group="ux"]      .uc-group-row__head { --accent: var(--dh-orange); }
.uc-group-row[data-group="trans"]   .uc-group-row__head { --accent: var(--dh-navy-500); }
.uc-group-row[data-group="govern"]  .uc-group-row__head { --accent: var(--dh-yellow); }

.uc-group-row__index {
  display: block;
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.uc-group-row__title {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: var(--fw-semibold);
  color: var(--dh-navy);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 6px;
}
.uc-group-row__sub {
  font-size: var(--fs-14);
  color: var(--fg-2);
  margin: 0;
  line-height: 1.4;
}

.uc-group-row__cards {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .uc-group-row__cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .uc-group-row__cards { grid-template-columns: repeat(3, 1fr); } }

/* group accents on the cards themselves */
.uc-group-row[data-group="ux"]      .uc-card { --accent: var(--dh-orange); }
.uc-group-row[data-group="trans"]   .uc-card { --accent: var(--dh-navy-500); }
.uc-group-row[data-group="govern"]  .uc-card { --accent: var(--dh-yellow); }

/* -----------------------------------------------------------
   Card grid (3 per row at desktop)
   ----------------------------------------------------------- */
.uc-grid-section { padding: 56px 0; }
@media (min-width: 768px) { .uc-grid-section { padding: 72px 0; } }

.uc-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .uc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .uc-grid { grid-template-columns: repeat(3, 1fr); } }

.uc-card[hidden] { display: none; }
.uc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  background: var(--dh-white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.uc-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent, var(--dh-grey-300));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-slow) var(--ease-out);
}
.uc-card:hover {
  border-color: var(--dh-navy);
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}
.uc-card:hover::before { transform: scaleX(1); }
.uc-card:active { transform: scale(0.99); }

/* group accents */
.uc-grid[data-group="ux"]      .uc-card { --accent: var(--dh-orange); }
.uc-grid[data-group="trans"]   .uc-card { --accent: var(--dh-navy-500); }
.uc-grid[data-group="govern"]  .uc-card { --accent: var(--dh-yellow); }

.uc-card__index {
  font-size: 12px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dh-orange);
  margin-bottom: 14px;
  display: inline-block;
}

.uc-card__tag {
  font-size: var(--fs-12);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--fg-accent);
  margin-bottom: 10px;
  display: inline-block;
}

.uc-card h3 {
  font-size: clamp(20px, 1.4vw, 22px);
  line-height: 1.2;
  letter-spacing: -0.018em;
  color: var(--dh-navy);
  margin: 0 0 var(--space-3);
}
.uc-card__problem {
  font-size: 14.5px;
  color: var(--fg-2);
  line-height: 1.55;
  margin: 0 0 20px;
}

.uc-card__divider {
  display: block;
  width: 32px;
  height: 1px;
  background: var(--border-1);
  margin: 0 0 16px;
}

.uc-card__outcomes {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.uc-card__outcomes li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
  color: var(--dh-navy);
  line-height: 1.45;
}
.uc-card__outcomes .check {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  color: var(--dh-orange);
  margin-top: 1px;
}

.uc-card__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--dh-navy);
  border-bottom: none;
}
.uc-card__link .arrow { transition: transform var(--dur-base) var(--ease-out); }
.uc-card:hover .uc-card__link { color: var(--dh-orange); }
.uc-card:hover .uc-card__link .arrow { transform: translateX(6px); }

/* hide / show animation when switching groups */
.uc-card.is-hidden { display: none; }
.uc-card.is-enter { animation: ucFade var(--dur-slow) var(--ease-out); }
@keyframes ucFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* -----------------------------------------------------------
   Comparison teaser
   ----------------------------------------------------------- */
.uc-compare {
  padding: 48px 0;
  background: var(--bg-3);
  border-top: 1px solid var(--border-2);
}
@media (min-width: 768px) { .uc-compare { padding: 48px 0; } }
.uc-compare__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
.uc-compare__head h3 {
  font-size: var(--fs-32);
  letter-spacing: -0.02em;
  color: var(--dh-navy);
  margin: 0;
}
.uc-compare__head p {
  margin: 0;
  font-size: var(--fs-16);
  color: var(--fg-2);
}
.uc-compare__grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .uc-compare__grid { grid-template-columns: repeat(3, 1fr); } }
.uc-compare__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  background: var(--dh-white);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.uc-compare__card:hover { border-color: var(--dh-navy); transform: translateY(-1px); }
.uc-compare__title {
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
  color: var(--dh-navy);
  letter-spacing: -0.01em;
}
.uc-compare__title em {
  font-style: normal;
  color: var(--fg-2);
  font-weight: var(--fw-medium);
  padding: 0 4px;
}
.uc-compare__card .arrow { color: var(--dh-orange); flex-shrink: 0; }

/* -----------------------------------------------------------
   Bottom CTA - compact navy panel with small chaos→order graphic
   ----------------------------------------------------------- */
.uc-cta {
  position: relative;
  overflow: hidden;
  padding: 40px 0;
  background: var(--dh-navy);
  color: #fff;
}
@media (min-width: 768px) { .uc-cta { padding: 56px 0; } }

.uc-cta__motif {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 52'><polygon points='30,1 59,17 59,35 30,51 1,35 1,17' fill='none' stroke='%23ffffff' stroke-width='0.4' stroke-opacity='0.07'/></svg>");
  background-repeat: repeat;
  background-size: 60px 52px;
}
.uc-cta .container { position: relative; z-index: 1; }

.uc-cta__grid {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 720px) {
  .uc-cta__grid { grid-template-columns: 1fr auto; gap: 48px; }
}

.uc-cta__copy { max-width: 620px; }
/* .uc-cta__eyebrow — consolidated into site.css */
.uc-cta__eyebrow { color: var(--dh-orange); }
.uc-cta h2 {
  font-size: clamp(22px, 2.4vw, 30px);
  color: #fff;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: var(--fw-semibold);
}
.uc-cta p {
  font-size: var(--fs-16);
  color: rgba(255,255,255,0.78);
  margin: 0 0 var(--space-4);
  line-height: 1.5;
  max-width: 58ch;
}
.uc-cta__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.uc-cta .btn--accent {
  background: var(--dh-orange);
  color: #fff;
  border: 1px solid var(--dh-orange);
}
.uc-cta .btn--accent:hover { background: var(--link-hover); border-color: var(--link-hover); }
/* .btn--ghost-light base → site.css; page-level sizing only */
.uc-cta .btn--ghost-light {
  border-color: rgba(255,255,255,0.3);
  padding: 11px 22px;
  font-weight: var(--fw-bold);
  font-size: var(--fs-14);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-md);
}

/* ----- CTA illustration: chaos → order ----- */
.uc-cta__art {
  display: none;
  position: relative;
}
@media (min-width: 720px) {
  .uc-cta__art {
    display: grid;
    grid-template-columns: 150px 40px 110px;
    align-items: center;
    gap: 18px;
    width: 338px;
  }
}

.uc-cta__chaos {
  position: relative;
  width: 150px; height: 130px;
}
.uc-cta__tile {
  position: absolute;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}
.uc-cta__tile::before {
  content: '';
  display: block;
  height: 7px;
  background: rgba(255,255,255,0.22);
}
.uc-cta__tile--1 { top: 6px;  left: 2px;  width: 58px; height: 42px; transform: rotate(-8deg);  border-color: rgba(243,146,53,0.45); }
.uc-cta__tile--1::before { background: rgba(243,146,53,0.65); }
.uc-cta__tile--2 { top: 0;    left: 50px; width: 64px; height: 36px; transform: rotate(5deg); }
.uc-cta__tile--2::before { background: rgba(255,255,255,0.28); }
.uc-cta__tile--3 { top: 38px; left: 32px; width: 68px; height: 42px; transform: rotate(-3deg);  background: rgba(255,255,255,0.10); }
.uc-cta__tile--3::before { background: rgba(41,182,246,0.55); }
.uc-cta__tile--4 { top: 76px; left: 4px;  width: 54px; height: 38px; transform: rotate(7deg);   border-color: rgba(247,200,18,0.4); }
.uc-cta__tile--4::before { background: rgba(247,200,18,0.7); }
.uc-cta__tile--5 { top: 82px; left: 62px; width: 58px; height: 36px; transform: rotate(-6deg); }
.uc-cta__tile--5::before { background: rgba(255,255,255,0.22); }
.uc-cta__tile--6 { top: 14px; left: 88px; width: 56px; height: 40px; transform: rotate(11deg);  border-color: rgba(82,196,145,0.4); }
.uc-cta__tile--6::before { background: rgba(82,196,145,0.6); }
.uc-cta__tile--7 { top: 50px; left: 78px; width: 62px; height: 44px; transform: rotate(-13deg); background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); }
.uc-cta__tile--7::before { background: rgba(180,100,220,0.5); }
.uc-cta__tile--8 { top: 96px; left: 36px; width: 52px; height: 34px; transform: rotate(14deg);  border-color: rgba(243,146,53,0.3); }
.uc-cta__tile--8::before { background: rgba(243,100,80,0.55); }
.uc-cta__tile--9 { top: -4px; left: 24px; width: 50px; height: 30px; transform: rotate(3deg); background: rgba(255,255,255,0.04); }
.uc-cta__tile--9::before { background: rgba(255,255,255,0.18); }

.uc-cta__arrow {
  width: 40px; height: 16px;
  opacity: 0.9;
}

.uc-cta__order {
  position: relative;
  width: 110px;
  padding: 18px 14px;
  background: #fff;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.45);
}
.uc-cta__order-hex {
  position: absolute;
  top: -8px; left: -8px;
  width: 16px; height: 16px;
  background: var(--dh-orange);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.uc-cta__order-line {
  display: block;
  height: 6px;
  border-radius: 2px;
  background: var(--dh-grey-100, #E7ECF2);
}
.uc-cta__order-line:first-of-type { width: 100%; background: var(--dh-navy); }
.uc-cta__order-line:nth-of-type(2) { width: 80%; }
.uc-cta__order-line:nth-of-type(3) { width: 60%; }

@media (hover: none) {
  .uc-card:hover { transform: none; }
  .uc-card:hover::before { transform: scaleX(0); }
  .uc-card:hover .uc-card__link .arrow { transform: none; }
  .uc-compare__card:hover { transform: none; }
}
