/*
 * Shared product-showcase system.
 * Tokens and restraint follow docs/BRAND_GUIDE.md dark blueprint mode.
 */

.showcase-layout {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 58px;
}

.showcase-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 54px;
  color: var(--ink-muted);
  font-size: 13px;
}

.showcase-nav a:hover {
  color: var(--amber);
}

@media (min-width: 821px) and (max-width: 1400px) {
  .showcase-nav {
    padding-right: 112px;
  }
}

.showcase-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
  gap: clamp(36px, 7vw, 78px);
  align-items: center;
  min-height: 520px;
  padding-bottom: 58px;
}

.showcase-eyebrow,
.showcase-kicker {
  margin: 0 0 12px;
  color: var(--navy-lighter);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.showcase-hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(45px, 7vw, 76px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.showcase-lead {
  max-width: 610px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.68;
}

.showcase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.showcase-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border: 1px solid var(--edge-strong);
  border-radius: 8px;
  background: rgba(20, 38, 64, 0.66);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.showcase-button:hover {
  border-color: var(--navy-light);
  background: var(--surface);
  color: var(--ink);
  transform: translateY(-1px);
}

.showcase-button--primary {
  border-color: var(--amber);
  background: var(--amber);
  color: var(--bg);
}

.showcase-button--primary:hover {
  border-color: #ffc359;
  background: #ffc359;
  color: var(--bg);
}

.showcase-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.showcase-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--navy-lighter);
  content: "";
}

.showcase-visual {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--edge-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 30px 70px -42px rgba(0, 0, 0, 0.92);
}

.showcase-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.showcase-visual figcaption {
  padding: 10px 13px;
  border-top: 1px solid var(--edge);
  color: var(--ink-muted);
  font-size: 11px;
}

.showcase-proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 74px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: rgba(20, 38, 64, 0.54);
}

.showcase-proof > div {
  min-height: 118px;
  padding: 22px;
  border-right: 1px solid var(--edge);
}

.showcase-proof > div:last-child {
  border-right: 0;
}

.showcase-proof strong,
.showcase-proof span {
  display: block;
}

.showcase-proof strong {
  margin-bottom: 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 31px;
  font-weight: 500;
}

.showcase-proof span {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
}

.showcase-section {
  padding: 64px 0;
  border-top: 1px solid var(--edge);
}

.showcase-section--split {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(36px, 8vw, 92px);
}

.showcase-section h2 {
  max-width: 680px;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.showcase-section h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}

.showcase-section__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}

.showcase-section__header > p {
  max-width: 370px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  text-align: right;
}

.showcase-prose {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}

.showcase-prose p {
  margin: 0 0 18px;
}

.showcase-prose p:last-child {
  margin-bottom: 0;
}

.showcase-prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--navy-light);
  text-underline-offset: 3px;
}

.showcase-list {
  display: grid;
  gap: 0;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.showcase-list li {
  padding: 13px 0 13px 22px;
  border-top: 1px solid rgba(42, 63, 102, 0.66);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
  position: relative;
}

.showcase-list li::before {
  position: absolute;
  top: 20px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--navy-lighter);
  content: "";
}

.showcase-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.showcase-steps li {
  min-height: 230px;
  padding: 22px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: rgba(20, 38, 64, 0.54);
}

.showcase-steps li > span {
  display: block;
  margin-bottom: 42px;
  color: var(--ink-muted);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.showcase-steps p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.55;
}

.showcase-demo {
  overflow: hidden;
  border: 1px solid var(--edge-strong);
  border-radius: 10px;
  background: #091523;
  box-shadow: 0 30px 70px -48px rgba(0, 0, 0, 0.94);
}

.showcase-demo__bar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--edge);
  background: rgba(20, 38, 64, 0.86);
  color: var(--ink-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.showcase-demo__dots {
  display: flex;
  gap: 5px;
}

.showcase-demo__dots i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--edge-strong);
}

.showcase-demo__body {
  min-height: 420px;
  padding: 20px;
}

.showcase-note {
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.5;
}

.product-embed {
  display: block;
  width: 100%;
  min-height: 720px;
  border: 0;
  background: #0d1b2a;
}

.product-embed--command {
  min-height: 900px;
  background: #111315;
}

.showcase-actions--below {
  margin-top: 14px;
}

.tree-hero-visual {
  display: grid;
  min-height: 390px;
  place-items: center;
  padding: 32px;
}

.tree-hero-timeline {
  position: relative;
  width: min(420px, 100%);
}

.tree-hero-line {
  height: 2px;
  background: var(--navy-light);
}

.tree-hero-nodes,
.tree-hero-labels {
  display: flex;
  justify-content: space-between;
}

.tree-hero-nodes {
  margin-top: -8px;
}

.tree-hero-nodes i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--navy-lighter);
}

.tree-hero-nodes i:first-child {
  background: var(--amber);
}

.tree-hero-labels {
  margin-top: 18px;
  color: var(--ink-muted);
  font-size: 11px;
}

.showcase-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: 64px;
  padding: 34px;
  border: 1px solid var(--edge-strong);
  border-radius: 10px;
  background: var(--surface);
}

.showcase-cta h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.showcase-cta p:not(.showcase-kicker) {
  max-width: 600px;
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Sanitized tool previews */
.tool-demo {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 450px;
}

.tool-demo__side {
  padding: 18px 14px;
  border-right: 1px solid var(--edge);
  background: rgba(20, 38, 64, 0.5);
}

.tool-demo__brand {
  margin: 0 0 24px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
}

.tool-demo__nav {
  display: grid;
  gap: 6px;
}

.tool-demo__nav button {
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.tool-demo__nav button:hover,
.tool-demo__nav button.is-active {
  border-color: var(--edge);
  background: var(--surface);
  color: var(--ink);
}

.tool-demo__main {
  min-width: 0;
  padding: 20px;
}

.tool-demo__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.tool-demo__heading h3 {
  margin: 0;
  font-size: 17px;
}

.tool-demo__heading span {
  color: var(--ink-muted);
  font-size: 11px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.metric-card {
  padding: 14px;
  border: 1px solid var(--edge);
  border-radius: 7px;
  background: rgba(20, 38, 64, 0.58);
}

.metric-card strong,
.metric-card span {
  display: block;
}

.metric-card strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
}

.metric-card span {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 10px;
}

.demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.demo-table th,
.demo-table td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--edge);
  color: var(--ink-soft);
  text-align: left;
}

.demo-table th {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-table tr[data-demo-row] {
  cursor: pointer;
}

.demo-table tr[data-demo-row]:hover,
.demo-table tr.is-selected {
  background: rgba(61, 90, 156, 0.16);
}

.demo-pill {
  display: inline-flex;
  padding: 3px 7px;
  border: 1px solid var(--edge-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 9px;
}

.demo-pill--amber {
  border-color: rgba(245, 166, 35, 0.5);
  color: var(--amber);
}

.detail-drawer {
  display: grid;
  grid-template-rows: 0fr;
  border-top: 0 solid var(--edge);
  transition: grid-template-rows 180ms ease, border-top-width 180ms ease;
}

.detail-drawer.is-open {
  grid-template-rows: 1fr;
  border-top-width: 1px;
}

.detail-drawer > div {
  overflow: hidden;
}

.detail-drawer__content {
  padding: 16px 4px 2px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

/* Evolution demo */
.evolution-demo {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
  min-height: 500px;
}

.evolution-map {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-right: 1px solid var(--edge);
  background:
    linear-gradient(to right, rgba(120, 148, 197, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 148, 197, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
}

.evolution-path {
  position: absolute;
  top: 68px;
  bottom: 68px;
  left: 76px;
  width: 2px;
  background: var(--navy-light);
}

.evolution-node {
  position: absolute;
  left: 61px;
  width: min(430px, calc(100% - 92px));
  padding-left: 46px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.evolution-node:nth-of-type(1) { top: 55px; }
.evolution-node:nth-of-type(2) { top: 112px; }
.evolution-node:nth-of-type(3) { top: 169px; }
.evolution-node:nth-of-type(4) { top: 226px; }
.evolution-node:nth-of-type(5) { top: 283px; }
.evolution-node:nth-of-type(6) { top: 340px; }
.evolution-node:nth-of-type(7) { top: 397px; }

.evolution-node::before {
  position: absolute;
  top: 3px;
  left: 8px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--navy-lighter);
  border-radius: 50%;
  background: var(--bg);
  content: "";
}

.evolution-node strong,
.evolution-node span {
  display: block;
}

.evolution-node strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
}

.evolution-node span {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 10px;
}

.evolution-node:hover::before,
.evolution-node.is-active::before {
  border-color: var(--amber);
  background: var(--amber);
}

.evolution-node.is-active strong {
  color: var(--amber);
}

.evolution-detail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
}

.evolution-detail__age {
  color: var(--navy-lighter);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.evolution-detail h3 {
  margin: 14px 0 10px;
  font-size: 28px;
}

.evolution-detail p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 820px) {
  .showcase-layout {
    width: min(100% - 28px, 700px);
    padding-top: 72px;
  }

  .showcase-nav {
    margin-bottom: 34px;
  }

  .showcase-hero {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: 0;
    padding-bottom: 46px;
  }

  .showcase-visual {
    order: -1;
  }

  .showcase-proof {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 50px;
  }

  .showcase-proof > div:nth-child(2) {
    border-right: 0;
  }

  .showcase-proof > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--edge);
  }

  .showcase-section,
  .showcase-section--split {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 48px 0;
  }

  .showcase-steps {
    grid-template-columns: 1fr;
  }

  .showcase-steps li {
    min-height: 0;
  }

  .showcase-steps li > span {
    margin-bottom: 24px;
  }

  .showcase-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-demo {
    grid-template-columns: 1fr;
  }

  .tool-demo__side {
    border-right: 0;
    border-bottom: 1px solid var(--edge);
  }

  .tool-demo__nav {
    display: flex;
    overflow-x: auto;
  }

  .tool-demo__nav button {
    white-space: nowrap;
  }

  .evolution-demo {
    grid-template-columns: 1fr;
  }

  .evolution-map {
    min-height: 450px;
    border-right: 0;
    border-bottom: 1px solid var(--edge);
  }

  .product-embed,
  .product-embed--command {
    min-height: 760px;
  }
}

@media (max-width: 520px) {
  .showcase-hero h1 {
    font-size: 43px;
  }

  .showcase-section__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .showcase-section__header > p {
    text-align: left;
  }

  .showcase-proof strong {
    font-size: 26px;
  }

  .showcase-proof > div {
    min-height: 104px;
    padding: 17px;
  }

  .showcase-demo__body,
  .tool-demo__main {
    padding: 12px;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .showcase-cta {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-button,
  .detail-drawer {
    transition: none;
  }
}
