/* Use-case pages (/{lang}/use-cases and its ten detail pages).
   Loaded only where `uc-page` is present - see configs/defaults/asset_registry.yaml.
   Shared primitives (.nb-inner, .nb-h2, .nb-btn*, .nb-cta*, the theme tokens) come
   from styles.css, which is required on every page. */

.uc-page {
  width: 100%;
  overflow-x: hidden;
}

.uc-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    var(--nb-sec-bg) 0%,
    var(--nb-sec-alt) 100%
  );
}

.uc-hero-dots {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  pointer-events: none;
  background-image: radial-gradient(var(--nb-dot) 1.6px, transparent 1.6px);
  background-size: 34px 34px;
}

.uc-hero-blob {
  position: absolute;
  top: -180px;
  right: -120px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.22),
    transparent 62%
  );
  pointer-events: none;
}

.uc-hero-inner {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 86px 28px 92px;
  text-align: center;
}

.uc-h1 {
  font-family: var(--nb-display);
  font-weight: 800;
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.02;
  letter-spacing: -2px;
  margin: 20px auto 0;
  max-width: 20ch;
  color: var(--nb-ink);
}

.uc-lead {
  max-width: 60ch;
  margin: 22px auto 0;
  font-size: 19px;
  line-height: 1.55;
  color: var(--nb-body);
  text-wrap: pretty;
}

.uc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 34px;
}

/* ---- generic section shell ---------------------------------------------- */

.uc-section {
  background: var(--nb-sec-bg);
  padding: 68px 28px;
}

.uc-section-alt {
  background: var(--nb-sec-alt);
  padding: 88px 28px;
}

.uc-section-tight {
  padding: 40px 28px;
}

.uc-section-head {
  max-width: 720px;
}

.uc-section-lead {
  margin: 16px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--nb-body);
  text-wrap: pretty;
}

/* ---- pillars ------------------------------------------------------------- */

.uc-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}

.uc-pillar {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
  background: var(--nb-card-bg);
  border: 1px solid var(--nb-card-border);
  border-radius: 20px;
  padding: 28px 26px 30px;
}

.uc-pillar-icon {
  grid-row: 1;
  grid-column: 1;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--nb-seg-bg);
  color: var(--nb-pill-fg);
}

.uc-pillar-icon svg {
  stroke: currentColor;
}

.uc-pillar-head {
  grid-row: 1;
  grid-column: 2;
  font-family: var(--nb-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.3px;
  margin: 0;
  color: var(--nb-ink);
}

.uc-pillar-body {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--nb-body);
  text-wrap: pretty;
}

/* ---- signals ------------------------------------------------------------- */

.uc-signals-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: start;
}

.uc-signals {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.uc-signal {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 13px;
  background: var(--nb-card2-bg);
  border: 1px solid var(--nb-card-border);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--nb-body);
}

.uc-signal svg {
  stroke: var(--danger);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  opacity: 0.75;
}

/* ---- risk tiers ---------------------------------------------------------- */

.uc-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 44px;
}

.uc-tier {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 26px;
  background: var(--nb-card-bg);
  border: 1px solid var(--nb-card-border);
}

.uc-tier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.uc-tier-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.uc-tier-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.uc-tier-range {
  font-family: var(--nb-display);
  font-size: 13px;
  font-weight: 800;
}

.uc-tier-copy {
  margin: 16px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--nb-body);
}

.uc-tier-tol {
  margin-top: 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--nb-meta);
}

.uc-tier-1 .uc-tier-name,
.uc-tier-1 .uc-tier-range {
  color: var(--nb-feed-ok-text);
}

.uc-tier-1 .uc-tier-dot {
  background: #34d399;
}

.uc-tier-2 .uc-tier-name,
.uc-tier-2 .uc-tier-range {
  color: var(--nb-warn-fg);
}

.uc-tier-2 .uc-tier-dot {
  background: #f59e0b;
}

.uc-tier-3 {
  background: linear-gradient(160deg, #2a1230, #4a1a2e);
  border-color: rgba(248, 113, 113, 0.45);
}

.uc-tier-3 .uc-tier-name,
.uc-tier-3 .uc-tier-range {
  color: #fca5a5;
}

.uc-tier-3 .uc-tier-dot {
  background: #f87171;
}

.uc-tier-3 .uc-tier-copy {
  color: #e7d6d6;
}

.uc-tier-3 .uc-tier-tol {
  color: #c99b9b;
}

/* ---- deploy -------------------------------------------------------------- */

.uc-deploy {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.uc-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.uc-tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--nb-seg-bg);
  border: 1px solid var(--nb-kicker-border);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--nb-pill-fg);
}

.uc-tag-ok {
  background: var(--nb-feed-ok-bg);
  border-color: var(--nb-feed-ok-border);
  color: var(--nb-feed-ok-text);
}

/* Documentation links under the integration lead. Anchors need an nb-* class:
   base_style strips the bottom border of any <a> without one. */
.uc-doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.uc-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--nb-seg-bg);
  border: 1px solid var(--nb-kicker-border);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.uc-doc-link::after {
  content: '\2192';
  font-size: 14px;
}

.uc-doc-link:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.uc-tags-kicker {
  margin: 22px 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--nb-meta);
}

.uc-code-wrap {
  position: relative;
  overflow: hidden;
  background: #0f0c1c;
  border-radius: 22px;
  padding: 26px;
}

.uc-code-blob {
  position: absolute;
  top: -90px;
  left: 30%;
  width: 320px;
  height: 220px;
  background: radial-gradient(
    ellipse,
    rgba(124, 58, 237, 0.28),
    transparent 65%
  );
  pointer-events: none;
}

.uc-code {
  position: relative;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 18px 20px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  line-height: 1.8;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.uc-code-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.uc-code-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.uc-code-dots span:nth-child(1) {
  background: #ff5f57;
}
.uc-code-dots span:nth-child(2) {
  background: #febc2e;
}
.uc-code-dots span:nth-child(3) {
  background: #28c840;
}

.uc-c-comment {
  color: #6f6a8c;
}
.uc-c-spaced {
  margin-top: 14px;
}
.uc-c-tag {
  color: #8b8caf;
}
.uc-c-attr {
  color: #9ee7c8;
}
.uc-c-str {
  color: #e6c07b;
}

/* ---- guarantees ---------------------------------------------------------- */

.uc-guarantees {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(160deg, #171029, #2a1a4e);
  box-shadow: 0 30px 70px rgba(43, 26, 82, 0.4);
  padding: 48px;
}

.uc-guarantees-blob {
  position: absolute;
  top: -110px;
  right: -80px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(168, 85, 247, 0.28),
    transparent 65%
  );
  pointer-events: none;
}

.uc-guarantees-title {
  position: relative;
  font-family: var(--nb-display);
  font-weight: 800;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -1.1px;
  line-height: 1.12;
  margin: 0;
  max-width: 640px;
  color: #ffffff;
}

.uc-guarantees-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 38px;
}

/* Icon in front of the title, not stacked above it. Grid rather than flex so the
   body copy can drop to its own full-width row without wrapping the markup in an
   extra element. */
.uc-guarantees-grid > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: center;
}

.uc-guarantees-grid > div > svg {
  grid-row: 1;
  grid-column: 1;
}

.uc-guarantee-head {
  grid-row: 1;
  grid-column: 2;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.uc-guarantees-grid p {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #c9c1e6;
}

/* ---- other use cases + index grid ---------------------------------------- */

.uc-others-title {
  margin: 0 0 28px;
  text-align: start;
}

.uc-others {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.uc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  text-decoration: none;
  background: var(--nb-card2-bg);
  border: 1px solid var(--nb-card-border);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.uc-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  background: var(--brand-softer);
  box-shadow: 0 10px 26px -18px var(--nb-shadow);
}

.uc-card:hover .uc-card-label {
  color: var(--brand);
}

.uc-card:hover .uc-card-icon {
  background: var(--brand-soft);
  color: var(--brand);
}

.uc-card-label,
.uc-card-icon {
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.uc-card-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--nb-seg-bg);
  color: var(--nb-pill-fg);
}

.uc-card-icon svg {
  stroke: currentColor;
}

.uc-card-label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--nb-ink);
}

.uc-index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.uc-index-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 18px;
  text-decoration: none;
  background: var(--nb-card2-bg);
  border: 1px solid var(--nb-card-border);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.uc-index-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 14px 30px -18px rgba(91, 46, 230, 0.55);
}

.uc-index-body {
  flex: 1;
  min-width: 0;
}

.uc-index-label {
  display: block;
  font-family: var(--nb-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--nb-ink);
}

.uc-index-lead {
  display: block;
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--nb-body);
  text-wrap: pretty;
}

/* ---- responsive ---------------------------------------------------------- */

@media (max-width: 980px) {
  .uc-hero-inner {
    padding: 60px 24px 68px;
  }
  .uc-pillars,
  .uc-tiers,
  .uc-guarantees-grid {
    grid-template-columns: 1fr;
  }
  .uc-signals-grid,
  .uc-deploy {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .uc-others {
    grid-template-columns: repeat(3, 1fr);
  }
  .uc-index-grid {
    grid-template-columns: 1fr;
  }
  .uc-section,
  .uc-section-alt {
    padding: 64px 22px;
  }
  .uc-guarantees {
    padding: 34px 28px;
  }
}

@media (max-width: 560px) {
  .uc-hero-inner {
    padding: 48px 18px 56px;
  }
  .uc-lead {
    font-size: 17px;
  }
  .uc-others {
    grid-template-columns: repeat(2, 1fr);
  }
  .uc-section,
  .uc-section-alt,
  .uc-section-tight {
    padding: 48px 18px;
  }
  .uc-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

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

  .uc-card:hover,
  .uc-index-card:hover {
    transform: none;
  }
}

/* ---- feature pages (ft-page) --------------------------------------------
   These reuse the whole uc-* section shell; only the index grid is new. */

.ft-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.ft-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
  padding: 26px 24px 28px;
  border-radius: 20px;
  background: var(--nb-card2-bg);
  border: 1px solid var(--nb-card-border);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.ft-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px rgba(91, 46, 230, 0.55);
}

/* The privacy page is the reason most people move, so it takes the full row
   and reads as a headline rather than one card among seven. */
.ft-card.is-flagship {
  grid-column: 1 / -1;
  background: linear-gradient(160deg, #171029, #2a1a4e);
  border-color: rgba(168, 85, 247, 0.35);
}

.ft-card-icon {
  grid-row: 1;
  grid-column: 1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--nb-seg-bg);
  color: var(--nb-pill-fg);
}

.ft-card-icon svg {
  stroke: currentColor;
}

.ft-card.is-flagship .ft-card-icon {
  background: rgba(255, 255, 255, 0.1);
  color: #d9c4ff;
}

.ft-card-badge {
  grid-row: 3;
  grid-column: 1 / -1;
  display: inline-block;
  justify-self: start;
  margin-top: 16px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #e7deff;
}

.ft-card-label {
  grid-row: 1;
  grid-column: 2;
  display: block;
  margin-top: 0;
  font-family: var(--nb-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--nb-ink);
}

.ft-card.is-flagship .ft-card-label {
  font-size: 24px;
  color: #ffffff;
}

.ft-card-statement {
  grid-row: 2;
  grid-column: 1 / -1;
  display: block;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--nb-body);
  text-wrap: pretty;
}

.ft-card.is-flagship .ft-card-statement {
  font-size: 16px;
  color: #c9c1e6;
  max-width: 60ch;
}

/* The proof list is a positive checklist, not a warning list like uc-signal. */
.ft-page .uc-signal.ft-proof {
  background: var(--nb-feed-ok-bg);
  border-color: var(--nb-feed-ok-border);
}

.ft-page .uc-signal.ft-proof svg {
  stroke: var(--nb-feed-ok-text);
}

@media (max-width: 980px) {
  .ft-grid {
    grid-template-columns: 1fr;
  }
}

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

  .ft-card:hover {
    transform: none;
  }
}

/* ---------------------------------------------------------------------------
   Use-case detail: the page-specific sections.

   These replace the three generic "pillars" every page used to share. The shape
   follows the argument: what the attack looks like -> the numbered mechanism that
   stops it -> the arithmetic -> how it goes in -> what it does not solve.
   --------------------------------------------------------------------------- */

.uc-signals-head {
  margin-bottom: 14px;
  font-family: var(--nb-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--nb-ink);
}

.uc-attack-body {
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--nb-body);
  max-width: 62ch;
  text-wrap: pretty;
}

/* Numbered because it is a sequence, not a feature list. */
.uc-mech {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 30px;
  counter-reset: uc-mech;
}

@media (max-width: 860px) {
  .uc-mech {
    grid-template-columns: 1fr;
  }
}

.uc-mech-step {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  align-items: center;
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--nb-card-bg);
  border: 1px solid var(--nb-card-border);
}

.uc-mech-num {
  grid-row: 1;
  grid-column: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--nb-seg-bg);
  color: var(--brand);
  font-family: var(--nb-display);
  font-size: 15px;
  font-weight: 800;
}

.uc-mech-head {
  grid-row: 1;
  grid-column: 2;
  margin: 0;
  font-family: var(--nb-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--nb-ink);
}

.uc-mech-body {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--nb-body);
  text-wrap: pretty;
}

/* Spacing only - the box itself is the framework .alert component. */
.uc-page .alert {
  margin: 26px 0 0;
  font-size: 15px;
  line-height: 1.65;
}

/* Integration: three short blocks rather than one wall of prose. */
.uc-integration {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 26px;
}

.uc-int-item {
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--nb-card2-bg);
  border: 1px solid var(--nb-card-border);
}

.uc-int-head {
  margin: 0 0 8px;
  font-family: var(--nb-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--nb-ink);
}

.uc-int-body {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--nb-body);
  text-wrap: pretty;
}

/* What it does not solve. Deliberately not styled as a warning: it is the part
   of the page that earns the rest of it. */
.uc-limit {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
  margin-top: 30px;
  padding: 22px 26px;
  border-radius: 18px;
  background: var(--nb-card2-bg);
  border: 1px dashed var(--nb-kicker-border);
}

.uc-limit-icon {
  grid-row: 1;
  grid-column: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--nb-seg-bg);
  color: var(--nb-meta);
}

.uc-limit-head {
  grid-row: 1;
  grid-column: 2;
  margin: 0;
  font-family: var(--nb-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--nb-ink);
}

.uc-limit-body {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.68;
  color: var(--nb-body);
  text-wrap: pretty;
}

@media (max-width: 980px) {
  .uc-integration {
    grid-template-columns: 1fr;
  }
}
