/* ============================================================
   USE CASES — instrument / blueprint design layer
   Monochromatic, technical. Sits on top of styles.css.
   ============================================================ */

:root{
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  --hair: rgba(0,0,0,0.10);
  --hair-2: rgba(0,0,0,0.06);
  --tick: rgba(0,0,0,0.32);
}

/* ---------- HERO ---------- */
/* the shared .page-header is a full-bleed flex row that centers content; override it so the
   hero is a normal block — text + signal stack, each constrained to the same --maxw as the
   stats and case rows below, and everything sits flush-left for a uniform column down the page */
.uc-hero{ display: block; min-height: auto; padding-top: clamp(7rem, 16vh, 11rem); padding-bottom: clamp(2rem, 5vh, 4rem); text-align: left; }
.uc-hero .eyebrow{ display:block; margin-inline: 0; }
.uc-hero h1{ margin: 0.6rem 0 1.2rem; margin-inline: 0; max-width: 28ch; }
.uc-hero .lead{ max-width: 52ch; margin-inline: 0; }

/* thin live signal strip under the hero */
.uc-signal{
  position: relative;
  margin-top: clamp(3rem, 7vh, 5rem);
  height: clamp(110px, 16vh, 150px);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
}
.uc-signal canvas{ position:absolute; inset:0; width:100%; height:100%; display:block; }
.uc-signal__tag{
  position:absolute; top:10px; left:0; z-index:2;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(0,0,0,0.40);
}
.uc-signal__tag::before{
  content:""; display:inline-block; width:6px; height:6px; margin-right:8px;
  background:#000; border-radius:50%; vertical-align:middle;
  animation: ucLive 1.6s steps(1) infinite;
}

/* ---------- STAT BAND ---------- */
.uc-stats{
  display:grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--hair);
}
.uc-stat{
  padding: clamp(1.6rem, 3.5vw, 2.6rem) clamp(1rem, 2.5vw, 2rem);
  border-left: 1px solid var(--hair-2);
}
.uc-stat:first-child{ border-left: 0; }
.uc-stat__num{
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 2.7rem); line-height: 1;
  letter-spacing: -0.02em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.uc-stat__num small{ font-size: 0.46em; font-weight: 400; opacity: 0.55; margin-left: 0.25em; }
.uc-stat__label{
  margin-top: 0.7rem;
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(0,0,0,0.45); line-height: 1.4;
}

/* ---------- CASE SECTION ---------- */
.uc-case{
  position: relative;
  padding-block: clamp(4.5rem, 11vh, 9rem);
  border-bottom: 1px solid var(--hair-2);
  overflow: hidden; /* clip the oversized watermark — prevents horizontal scroll on mobile */
}
.uc-case__grid{
  display:grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5.5rem); align-items: center;
}
.uc-case--rev .uc-case__fig{ order: -1; }

/* giant editorial watermark number — removed for a cleaner, uniform column (rule kept for easy re-enable) */
.uc-case__watermark{
  display: none;
  position:absolute; top: clamp(1rem, 4vh, 3rem); right: 0;
  font-family: var(--mono); font-weight: 500;
  font-size: clamp(7rem, 22vw, 18rem); line-height: 0.8;
  color: rgba(0,0,0,0.035); letter-spacing: -0.04em;
  pointer-events: none; user-select: none; z-index: 0;
}
.uc-case--rev .uc-case__watermark{ right: auto; left: 0; }

.uc-case__body{ position: relative; z-index: 1; }
.uc-case__kicker{
  display:flex; align-items:center; gap: 0.8rem; margin-bottom: 1.4rem;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(0,0,0,0.45);
}
.uc-case__kicker::before{
  content:""; width: clamp(20px, 4vw, 44px); height:1px; background: var(--tick);
}
.uc-case__body h3{ margin: 0 0 1.1rem; }
.uc-case__body p{ max-width: 52ch; }

/* spec sheet (mono key/value rows) */
.uc-spec{
  list-style: none; margin: 1.8rem 0 0; padding: 0;
  border-top: 1px solid var(--hair);
}
.uc-spec li{
  display:flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.65rem 0; border-bottom: 1px solid var(--hair-2);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.01em;
}
.uc-spec .k{ color: rgba(0,0,0,0.45); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.66rem; }
.uc-spec .v{ color: var(--ink); text-align: right; }

/* inline metric chips */
.uc-metrics{ display:flex; flex-wrap:wrap; gap: 0.6rem; margin-top: 1.8rem; }
.uc-chip{
  display:inline-flex; align-items:baseline; gap:0.5rem;
  border: 1px solid var(--hair); padding: 0.5rem 0.8rem;
  font-family: var(--mono); font-size: 0.7rem; color: var(--ink);
}
.uc-chip .lab{ font-size:0.58rem; letter-spacing:0.1em; text-transform:uppercase; color: rgba(0,0,0,0.42); }

/* ---------- FIGURE (blueprint frame) ---------- */
.uc-fig{
  position: relative;
  min-height: clamp(320px, 42vh, 440px);
  border: 1px solid var(--hair);
  background-image: radial-gradient(circle, rgba(0,0,0,0.045) 1px, transparent 1.4px);
  background-size: 22px 22px; background-position: center;
}
.uc-fig canvas{ position:absolute; inset:1px; width:calc(100% - 2px); height:calc(100% - 2px); display:block; }
/* corner ticks */
.uc-fig::before, .uc-fig::after{ content:""; position:absolute; width:11px; height:11px; pointer-events:none; }
.uc-fig::before{ top:9px; left:9px; border-top:1px solid var(--tick); border-left:1px solid var(--tick); }
.uc-fig::after{ bottom:9px; right:9px; border-bottom:1px solid var(--tick); border-right:1px solid var(--tick); }
/* figure top tag + bottom caption */
.uc-fig__tag, .uc-fig__cap{
  position:absolute; z-index:2; left:14px; right:14px;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(0,0,0,0.40);
  display:flex; justify-content: space-between; gap: 1rem;
}
.uc-fig__tag{ top:12px; }
.uc-fig__cap{ bottom:12px; }
.uc-fig__live{ color: rgba(0,0,0,0.55); }
.uc-fig__live::before{
  content:""; display:inline-block; width:5px; height:5px; margin-right:6px;
  background:#000; border-radius:50%; vertical-align:middle;
  animation: ucLive 1.6s steps(1) infinite;
}
@keyframes ucLive{ 0%,50%{opacity:1;} 51%,100%{opacity:0.15;} }

/* ---------- FEATURE (full-width figure) ---------- */
.uc-case--feature .uc-case__grid{ display:block; }
.uc-case--feature .uc-case__body{
  max-width: 56ch; margin-bottom: clamp(2.2rem, 5vh, 3.5rem);
}
.uc-case--feature .uc-case__body p{ max-width: 60ch; }
.uc-case--feature .uc-fig{
  min-height: clamp(380px, 52vh, 560px);
}

/* ---------- STATEMENT (centered pull-quote beats) ---------- */
.uc-statement{
  min-height: auto;                              /* release .scene's 88vh so the band isn't a huge void */
  padding-block: clamp(4rem, 10vh, 7rem);
  border-bottom: 1px solid var(--hair-2);
}
.uc-statement h2{
  max-width: 26ch; margin-inline: auto;          /* auto margins actually center the text box */
  font-weight: 300;
  font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.25;
}
.uc-statement em{ font-style: normal; color: rgba(0,0,0,0.32); }
.uc-statement__mark{
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(0,0,0,0.40); margin-bottom: 1.4rem;
  display:flex; align-items:center; justify-content:center; gap: 0.8rem;   /* center the eyebrow row */
}
.uc-statement__mark::before{ content:""; width: 36px; height:1px; background: var(--tick); }

/* ---------- CLOSE ---------- */
.uc-close{ padding-block: clamp(6rem, 16vh, 12rem); text-align:center; }
.uc-close h2{ max-width: 30ch; margin: 1.4rem auto; }
.uc-close .lead{ max-width: 50ch; margin: 0 auto; }
.uc-close__actions{ margin-top: 2.6rem; display:flex; flex-wrap:wrap; gap:1rem; justify-content:center; }

/* ---------- RESPONSIVE ---------- */

/* tablet / small laptop: collapse EVERY case — including full-width "feature" cases — into one stacked column */
@media (max-width: 900px){
  /* the shared .page-header is display:flex (row) — stack the hero's text + signal strip vertically */
  .uc-hero{ flex-direction: column; align-items: stretch; justify-content: flex-start; min-height: 0; }
  .uc-hero .wrap{ width: 100%; }

  .uc-case__grid,
  .uc-case--feature .uc-case__grid{ display: grid; grid-template-columns: 1fr; gap: clamp(2rem, 7vw, 3rem); }
  /* on stacked layout, figure always follows the text — even on reversed cases */
  .uc-case--rev .uc-case__fig{ order: 0; }
  /* drop the desktop body margin so the grid gap is the only separator (no double space) */
  .uc-case--feature .uc-case__body{ max-width: none; margin-bottom: 0; }

  .uc-stats{ grid-template-columns: repeat(2, 1fr); }
  .uc-stat{ border-top: 1px solid var(--hair-2); }
  .uc-stat:first-child, .uc-stat:nth-child(2){ border-top: 0; }
  .uc-stat:nth-child(odd){ border-left: 0; }

  /* keep the watermark a quiet accent, anchored to the corner so it never sits under copy */
  .uc-case__watermark{ font-size: clamp(5rem, 22vw, 9rem); top: 0.5rem; }
  .uc-case--rev .uc-case__watermark{ left: auto; right: 0; }

  .uc-fig, .uc-case--feature .uc-fig{ min-height: clamp(280px, 56vw, 420px); }
}

/* phones */
@media (max-width: 600px){
  .uc-hero{ padding-top: clamp(5.5rem, 14vh, 8rem); }
  .uc-signal{ height: clamp(86px, 22vw, 120px); margin-top: clamp(2rem, 7vh, 3.5rem); }
  .uc-signal__tag{ font-size: 0.54rem; letter-spacing: 0.08em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .uc-stats{ grid-template-columns: 1fr; }
  .uc-stat{ display:flex; align-items: baseline; gap: 0.9rem; padding: 1.1rem 0; border-left: 0; border-top: 1px solid var(--hair-2); }
  .uc-stat:first-child{ border-top: 0; }
  .uc-stat__num{ font-size: clamp(1.6rem, 9vw, 2.1rem); min-width: 4.5ch; }
  .uc-stat__label{ margin-top: 0; line-height: 1.4; }
  /* keep the <br> so the two label lines stack cleanly beside the number (hiding it ran the words together) */

  .uc-case{ padding-block: clamp(3.5rem, 12vh, 5.5rem); }
  .uc-case__body h3{ font-size: clamp(1.35rem, 6.5vw, 1.7rem); }
  .uc-case__body p{ max-width: none; }
  .uc-case__kicker{ margin-bottom: 1rem; }

  /* spec rows: give the value room to wrap below the key on very narrow screens */
  .uc-spec li{ flex-wrap: wrap; gap: 0.15rem 1rem; }
  .uc-spec .v{ text-align: left; }

  .uc-fig, .uc-case--feature .uc-fig{ min-height: clamp(260px, 72vw, 360px); }
  .uc-fig__tag, .uc-fig__cap{ font-size: 0.55rem; left: 10px; right: 10px; }
  /* drop the secondary readout so the two mono labels can't collide in a narrow frame */
  .uc-fig__tag span:last-child, .uc-fig__cap span:last-child{ display: none; }

  .uc-statement{ padding-block: clamp(4.5rem, 16vh, 8rem); }
  .uc-close__actions .btn{ width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce){
  .uc-fig__live::before, .uc-signal__tag::before{ animation: none; }
}
