/* ============================================================
   METRIDIUM v2 — Shared Card & Grid Styles
   Tech cards, bento grid, PDF overlay, solution cards, alias rotation
   Used across Landing and Labs pages.
   ============================================================ */

.tag {
  font-family: var(--font-mono);
  letter-spacing: 0.35em;
  color: var(--secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}

.tech-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--white-12);
  padding: 1.25rem 1.4rem;
  background: rgba(6, 10, 20, 0.85);
  box-shadow: inset 0 0 30px rgba(148, 226, 255, 0.04);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tech-card::before {
  content: '';
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(circle, rgba(0, 255, 200, 0.08), transparent 55%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.tech-card > * {
  position: relative;
  z-index: 1;
}

.tech-card:hover {
  border-color: rgba(0, 255, 200, 0.35);
}

.tech-card:hover::before {
  opacity: 1;
  transform: scale(1);
}

.tech-card header .tag {
  margin: 0;
}

.tech-card h3 {
  margin: 0.15rem 0 0.1rem;
  letter-spacing: 0.05em;
}

.title-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  overflow: hidden;
}

.title-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  filter:
    drop-shadow(0 4px 10px rgba(0, 255, 200, 0.25))
    drop-shadow(0 -2px 6px rgba(255, 255, 255, 0.25));
}

.title-alias {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.tech-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.tech-card__link {
  margin-top: 0.4rem;
  align-self: flex-start;
  position: relative;
  z-index: 2;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 255, 200, 0.35);
  background: rgba(0, 255, 200, 0.06);
  color: rgba(0, 255, 200, 0.9);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

.tech-card__link:hover {
  border-color: rgba(0, 255, 200, 0.6);
  background: rgba(0, 255, 200, 0.16);
  color: #061019;
  box-shadow: 0 8px 18px rgba(0, 255, 200, 0.12);
}

/* PDF overlay */
.pdf-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 10, 0.78);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.pdf-overlay:target {
  display: flex;
}

.pdf-panel {
  width: min(1100px, 100%);
  height: min(78vh, 860px);
  background: rgba(8, 12, 22, 0.92);
  border: 1px solid var(--white-12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pdf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  background: rgba(9, 14, 24, 0.85);
  border-bottom: 1px solid var(--white-08);
}

.pdf-header h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.pdf-close {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--white-12);
  background: var(--white-04);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  text-decoration: none;
  font-size: 1.3rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pdf-close:hover {
  background: var(--white-12);
  border-color: var(--white-12);
}

.pdf-frame {
  flex: 1;
  background: rgba(0, 0, 0, 0.25);
}

.pdf-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000000;
}

/* Bento grid */
.scene--solutions .bento-grid {
  display: grid;
  width: min(1200px, 100%);
  margin: 0 auto 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-auto-rows: minmax(320px, 1fr);
  gap: 1.5rem;
  min-height: clamp(540px, 70vh, 860px);
}

.bento-item {
  border-radius: var(--radius-lg);
  border: 1px solid var(--white-12);
  padding: 1.5rem;
  background: rgba(8, 12, 22, 0.78);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease;
  display: flex;
  flex-direction: column;
}

.solution-link {
  align-self: flex-start;
  margin: 0.6rem 0 0.2rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 255, 200, 0.35);
  background: rgba(0, 255, 200, 0.08);
  color: rgba(0, 255, 200, 0.9);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.25s ease;
}

.solution-link:hover {
  border-color: rgba(0, 255, 200, 0.6);
  background: rgba(0, 255, 200, 0.16);
  color: #061019;
  box-shadow: 0 10px 25px rgba(0, 255, 200, 0.12);
}

.bento-item::after {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(148, 226, 255, 0.25), transparent 60%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.25);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.bento-item:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 255, 163, 0.45);
}

.bento-item:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.solution-systems {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--white-08);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.systems-label {
  font-family: var(--font-mono);
  letter-spacing: 0.35em;
  font-size: 0.58rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.systems-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.system-pill {
  border: 1px solid var(--white-12);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  background: rgba(9, 14, 24, 0.7);
  min-width: 120px;
}

.system-pill strong {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
}

.system-pill span {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.55);
}

.bento-large,
.bento-tall {
  grid-row: span 1;
}

.bento-item .tag {
  font-family: var(--font-mono);
  letter-spacing: 0.35em;
  color: var(--secondary);
  font-size: 0.8rem;
}

/* About section layout */
.scene--about {
  flex-direction: column;
  gap: 2rem;
}

.scene--about,
.scene--connect {
  align-items: center;
}

.scene--about .about-copy,
.scene--about .metrics,
.scene--connect .connect-grid {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.scene--about .metrics {
  margin-top: 1rem;
}

.metrics {
  display: flex;
  gap: clamp(1rem, 8vw, 5rem);
  flex-wrap: wrap;
  justify-content: center;
}

.metric-value {
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--primary);
  font-weight: 700;
  display: block;
  text-align: center;
}

.metrics p {
  margin: 0.3rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}