/* ==========================================================================
   ZOVRON SOVEREIGN DESIGN HUB — 100% LIGHT MODE STUDIO AESTHETIC
   Clean Slate Canvas, Crisp Elevation, Natural Responsive Modal Architecture,
   Interactive Specimen Timeline Scrubber, Pro Subscription Paywall.
   ========================================================================== */

/* 1. Global Page Base & Typography */
body[data-page="portfolio"] {
  background-color: #f8fafc !important;
  color: #0f172a !important;
  font-family: var(--font-sans, 'Plus Jakarta Sans', -apple-system, sans-serif);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.st-hub-section {
  padding: 48px 0 100px;
  background: #f8fafc;
  min-height: 100vh;
}

/* 2. Top Header Utility Strip */
.st-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #4f46e5;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.st-auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.st-auth-pill:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.st-auth-pill.subscribed {
  background: #ecfdf5;
  border-color: #10b981;
  color: #059669;
}

.st-hub-title {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0 0 14px 0;
  line-height: 1.15;
}

.st-hub-sub {
  font-size: 1rem;
  color: #64748b;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 3. Search Bar */
.st-search-wrapper {
  max-width: 640px;
  margin: 0 auto 28px;
  position: relative;
}

.st-search-icon-wrap {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.st-search-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 14px 24px 14px 48px;
  color: #0f172a;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.st-search-input:focus {
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.st-search-input::placeholder {
  color: #94a3b8;
}

/* 4. Filter Pills */
.st-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.st-filter-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.st-filter-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.st-filter-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.st-count-display {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 28px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* 5. Card Grid & Card Styling */
.st-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 1080px) {
  .st-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 640px) {
  .st-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Card scroll reveal keyframes & classes */
.st-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.st-card.st-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.st-card-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1.6 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: #09090b;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transform-style: preserve-3d;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.st-card:hover .st-card-stage {
  border-color: #cbd5e1;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.st-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.st-card:hover .st-card-img {
  transform: scale(1.02);
}

.st-card-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.st-card-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.st-card:hover .st-card-sheen {
  opacity: 1;
}

.st-price-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.st-preview-pill {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.2s ease;
  z-index: 5;
}

.st-card:hover .st-preview-pill {
  opacity: 1;
  transform: translateY(0);
}

.st-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 4px;
}

.st-card-title {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.st-card-type {
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* 6. Clean Modal Architecture (100% Light Mode) */
.st-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  box-sizing: border-box;
}

.st-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.st-modal-dialog {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  width: 100%;
  max-width: 860px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
  transform: scale(0.94) translateY(18px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.st-modal-backdrop.open .st-modal-dialog {
  transform: scale(1) translateY(0);
}

.st-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #f1f5f9;
}

.st-modal-type-tag {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 12px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
}

.st-modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.st-modal-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* 7. Specimen Live Motion Stage (Exact Scrolltide Preview Screen) */
.st-modal-specimen-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 440px;
  background: #09090b;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  display: block;
}

.st-modal-specimen-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.st-modal-specimen-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.st-timeline-scrubber {
  display: none !important;
}

.st-scrub-play-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.st-scrub-play-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.st-scrub-slider {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  accent-color: #6366f1;
  cursor: ew-resize;
  outline: none;
}

.st-scrub-time {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #e2e8f0;
  flex-shrink: 0;
  min-width: 80px;
  text-align: right;
}

.st-scrub-speed-btn,
.st-stage-mode-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.st-scrub-speed-btn:hover,
.st-stage-mode-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.st-stage-mode-btn.available {
  background: rgba(99, 102, 241, 0.4);
  border-color: #6366f1;
  color: #e0e7ff;
}

.st-physics-mount {
  width: 100%;
  height: 100%;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 8. Modal Body & Actions */
.st-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.st-modal-title {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.st-modal-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

.st-tag-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.st-tag-chip {
  background: #f1f5f9;
  color: #475569;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
}

/* Commercial Custom Build Action Box */
.st-build-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.st-build-price-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.st-build-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.st-build-price {
  font-family: var(--font-mono, monospace);
  font-size: 1.45rem;
  font-weight: 800;
  color: #059669;
}

.st-build-sla {
  font-size: 0.78rem;
  color: #64748b;
}

.st-btn-order {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  white-space: nowrap;
}

.st-btn-order:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.25);
}

/* AI Component Recipe Prompt Box */
.st-prompt-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.st-prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.st-prompt-badge-locked {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ef4444;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
}

.st-prompt-badge-unlocked {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #059669;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
}

.st-prompt-preview {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.5;
  max-height: 110px;
  overflow-y: auto;
  white-space: pre-wrap;
  transition: all 0.2s ease;
}

.st-prompt-preview.locked {
  user-select: none;
  filter: blur(4px);
  background: #f1f5f9;
  color: #94a3b8;
}

.st-btn-prompt-action {
  background: #6366f1;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.st-btn-prompt-action:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* 9. Subscription Paywall Modal */
.st-sub-dialog {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  width: 100%;
  max-width: 720px;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
  box-sizing: border-box;
}

.st-sub-header {
  text-align: center;
  margin-bottom: 28px;
}

.st-sub-title {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.st-sub-plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .st-sub-plans-grid { grid-template-columns: 1fr; }
}

.st-plan-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.st-plan-card.featured {
  border-color: #6366f1;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

.st-plan-badge {
  position: absolute;
  top: -10px;
  right: 20px;
  background: #6366f1;
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.st-plan-name {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.st-plan-price {
  font-family: var(--font-mono, monospace);
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
}

.st-plan-period {
  font-size: 0.82rem;
  color: #64748b;
}

.st-plan-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  color: #475569;
}

.st-plan-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.st-plan-btn {
  width: 100%;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.st-plan-btn:hover {
  background: #e2e8f0;
}

.st-plan-btn.featured {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
}

.st-plan-btn.featured:hover {
  background: #4f46e5;
}

.st-sub-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}

/* 10. Compact Mobile Responsive Layout */
@media (max-width: 640px) {
  .st-modal-dialog {
    border-radius: 16px;
    max-height: 95vh;
  }
  .st-modal-body {
    padding: 16px 14px;
    gap: 14px;
  }
  .st-modal-title {
    font-size: 1.25rem;
  }
  .st-modal-desc {
    font-size: 0.84rem;
  }
  .st-build-box {
    padding: 12px 14px;
    gap: 12px;
  }
  .st-build-price {
    font-size: 1.25rem;
  }
  .st-btn-order {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
  }
  .st-prompt-box {
    padding: 12px 14px;
    gap: 10px;
  }
  .st-btn-prompt-action {
    width: 100%;
    justify-content: center;
    padding: 9px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .st-sub-dialog {
    padding: 20px 16px;
    border-radius: 16px;
  }
  .st-sub-title {
    font-size: 1.35rem;
  }
  .st-sub-plans-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .st-plan-card {
    padding: 16px;
  }
}
