/* trilith-3d.css — Dedicated Trilith 3D editorial showcase matching Ternara lab-brand.css
   (Cormorant Garamond + Manrope, ivory #f8f7f3 / studio #eff2eb / forest #285b48 / obsidian #0c1411). */

.t3d-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 22px 0 22px;
}

.t3d-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.t3d-filter {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.t3d-filter:hover {
  border-color: var(--green);
  color: var(--green);
}

.t3d-filter[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.t3d-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
}

.sl-3d-card.is-hidden {
  display: none;
}

/* Zoom button on 3D stage */
.sl-3d-stage {
  cursor: zoom-in;
}

.t3d-zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(12, 20, 17, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #edf3e7;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.sl-3d-stage:hover .t3d-zoom-hint,
.sl-3d-stage:focus-within .t3d-zoom-hint {
  opacity: 1;
}

.sl-3d-stage.is-video {
  cursor: default;
}

.sl-3d-stage.is-video .t3d-zoom-hint {
  display: none;
}

/* Subtle elevation on hover for cards */
.sl-3d-card {
  transition: border-color .2s ease, box-shadow .2s ease;
}

.sl-3d-card:hover {
  border-color: #b7c8ba;
  box-shadow: 0 12px 32px rgba(25, 65, 50, 0.06);
}

/* Studio Live WebGL CAD Shell */
.t3d-studio-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.t3d-studio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.t3d-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--studio);
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  color: var(--ink);
}

.t3d-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.t3d-studio-frame {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(25, 65, 50, 0.08);
}

.t3d-studio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--studio);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
}

.t3d-studio-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
}

.t3d-studio-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(40, 91, 72, 0.16);
}

.t3d-studio-iframe {
  width: 100%;
  height: 820px;
  border: 0;
  display: block;
  background: #f8f7f3;
}

@media (max-width: 900px) {
  .t3d-studio-iframe {
    height: 640px;
  }
}

/* Physical SKY130A Metal Stack Legend */
.t3d-stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.t3d-layer {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.t3d-swatch {
  width: 16px;
  height: 44px;
  border-radius: 6px;
  flex: 0 0 16px;
  border: 1px solid rgba(16, 24, 21, 0.14);
}

.t3d-swatch--diff { background: linear-gradient(180deg, #27b36b, #146e42); }
.t3d-swatch--poly { background: linear-gradient(180deg, #e04638, #991f17); }
.t3d-swatch--li1  { background: linear-gradient(180deg, #ff8c2e, #d4520c); }
.t3d-swatch--met2 { background: linear-gradient(180deg, #3bbf77, #1c7c48); }
.t3d-swatch--met3 { background: linear-gradient(180deg, #4b87d4, #224f8c); }
.t3d-swatch--pdn  { background: linear-gradient(180deg, #3c6ab8, #193261); }

.t3d-layer-meta {
  min-width: 0;
}

.t3d-layer-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green);
}

.t3d-layer h4 {
  margin: 3px 0 4px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
}

.t3d-layer p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 960px) {
  .t3d-stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .t3d-stack-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Full-Res Lightbox (CSP-safe) */
.t3d-lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 16, 13, 0.92);
  backdrop-filter: blur(8px);
}

.t3d-lb[hidden] {
  display: none;
}

.t3d-lb-inner {
  position: relative;
  max-width: min(1440px, 95vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.t3d-lb-img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid #2b4036;
  background: #0c1411;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.t3d-lb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #dce7df;
  font-size: 13px;
  line-height: 1.45;
}

.t3d-lb-close {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.t3d-lb-close:hover {
  background: var(--green);
  border-color: var(--green);
}

/* Studio bar link */
.t3d-studio-bar .sl-dl-link {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}
.t3d-studio-bar .sl-dl-link:hover {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

/* Honest scope callout polish */
.sl-callout {
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--studio);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
}
.sl-callout strong {
  color: var(--ink);
}
