/**
 * Internal Fleet Catalog Stylesheet — PragCore Architecture
 * Pure monochrome aesthetics, optical specular catchlights, frosted glass (blur 28px).
 * Strictly zero emojis. Enforces Rule 13 Hard CSS Privacy Gate.
 */

/* ==========================================================================
   Hard CSS Privacy Gate (Rule 13)
   ========================================================================== */
body:not(.internal-unlocked):not(.sovereign-unlocked) [data-tier="internal"],
body:not(.internal-unlocked):not(.sovereign-unlocked) [data-tier="sovereign"] {
  display: none !important;
}

body:not(.internal-unlocked):not(.sovereign-unlocked) #internal-protected-content {
  display: none !important;
}

/* ==========================================================================
   Internal Layout & Shell
   ========================================================================== */
.internal-main {
  min-height: calc(100vh - 110px);
  padding: 40px 24px 80px;
  position: relative;
  z-index: 10;
}

.internal-shell {
  max-width: 1320px;
  margin: 0 auto;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.internal-hero {
  margin-bottom: 36px;
}

.internal-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.16);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e2e4e9;
  margin-bottom: 16px;
}

.internal-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: inline-block;
  animation: pulse-emerald 2s infinite;
}

@keyframes pulse-emerald {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.internal-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #ffffff;
  margin: 0 0 12px 0;
}

.internal-desc {
  font-size: 1.05rem;
  color: #9aa0a6;
  max-width: 780px;
  line-height: 1.5;
  margin: 0 0 28px 0;
}

/* ==========================================================================
   Fleet Telemetry Bar
   ========================================================================== */
.internal-telemetry-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.telemetry-tile {
  background: rgba(18, 19, 26, 0.75);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
}

.telemetry-tile-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #80868b;
  margin-bottom: 6px;
}

.telemetry-tile-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.02em;
}

.telemetry-tile-sub {
  font-size: 0.75rem;
  color: #34d399;
  margin-top: 4px;
}

/* ==========================================================================
   Filter Bar & Search Input
   ========================================================================== */
.internal-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.internal-search-wrap {
  position: relative;
  width: 100%;
}

.internal-search-input {
  width: 100%;
  height: 48px;
  padding: 0 18px 0 46px;
  background: rgba(18, 19, 26, 0.75);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.internal-search-input:focus {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15), inset 0 1px 0 0 rgba(255, 255, 255, 0.16);
}

.internal-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #80868b;
  pointer-events: none;
}

.internal-division-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.internal-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 16px;
  color: #9aa0a6;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.internal-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.internal-tab.is-active {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Product Grid & Cards
   ========================================================================== */
.internal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.internal-card {
  background: rgba(18, 19, 26, 0.75);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.8), inset 0 1px 0 0 rgba(255, 255, 255, 0.16);
  transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.internal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 28px 56px -14px rgba(0, 0, 0, 0.9), inset 0 1px 0 0 rgba(255, 255, 255, 0.24);
}

.internal-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.internal-card-title {
  font-size: 1.12rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.internal-card-div {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #80868b;
  margin: 0;
}

.internal-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: #34d399;
  white-space: nowrap;
}

.internal-card-preview-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 10px 0 14px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #08080c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.16), 0 8px 24px -4px rgba(0, 0, 0, 0.6);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.internal-card-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.internal-card:hover .internal-card-preview-img {
  transform: scale(1.025);
}

.internal-card-tagline {
  font-size: 0.88rem;
  font-weight: 500;
  color: #e2e4e9;
  margin: 0 0 10px 0;
}

.internal-card-strapline {
  font-size: 0.82rem;
  color: #9aa0a6;
  line-height: 1.45;
  margin: 0 0 16px 0;
  flex-grow: 1;
}

.internal-card-metrics {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  margin-bottom: 16px;
}

.internal-metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.internal-metric-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  color: #80868b;
  letter-spacing: 0.05em;
}

.internal-metric-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  font-feature-settings: "tnum" 1;
}

.internal-card-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.72rem;
  color: #80868b;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 18px;
  word-break: break-all;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.internal-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.internal-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.internal-card-btn--primary {
  background: #ffffff;
  color: #030306;
  border: 1px solid #ffffff;
}

.internal-card-btn--primary:hover {
  background: #e2e4e9;
  border-color: #e2e4e9;
}

.internal-card-btn--secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #e2e4e9;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.internal-card-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.internal-card-btn--explainer {
  background: transparent;
  color: #80868b;
  border: 1px dashed rgba(255, 255, 255, 0.16);
}

.internal-card-btn--explainer:hover {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
}

/* ==========================================================================
   Plain Language Explainer Modal
   ========================================================================== */
.explainer-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 6, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.explainer-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.explainer-modal-card {
  background: rgba(18, 19, 26, 0.95);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  max-width: 580px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.9), inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

.explainer-modal-backdrop.is-open .explainer-modal-card {
  transform: scale(1);
}

.explainer-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.explainer-modal-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #34d399;
}

.explainer-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: #9aa0a6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.explainer-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.explainer-modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px 0;
}

.explainer-modal-body {
  font-size: 1rem;
  line-height: 1.6;
  color: #e2e4e9;
  margin-bottom: 24px;
}

/* ==========================================================================
   Clearance Active HUD Header Placement
   ========================================================================== */
.clearance-active-hud {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(18, 19, 26, 0.8);
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #34d399;
  letter-spacing: 0.05em;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);
}

.hud-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.btn-clearance-exit {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e2e4e9;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-clearance-exit:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Responsive */
@media (max-width: 768px) {
  .internal-grid {
    grid-template-columns: 1fr;
  }
  .internal-telemetry-bar {
    grid-template-columns: 1fr 1fr;
  }
}
