/* ==========================================
   SHOWCASES.CSS - Pages showcase KarimBuilds
   ========================================== */

/* ===== HERO SHOWCASE ===== */
.sc-hero {
  padding: 7rem 0 4rem;
  background: linear-gradient(135deg, #0f172a 0%, #0d2347 50%, #0a3a7a 100%);
  position: relative;
  overflow: hidden;
}

.sc-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

.sc-hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
}

.sc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: rgba(255,255,255,.75);
  margin-bottom: var(--space-sm);
}

.sc-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.sc-hero h1 span {
  background: linear-gradient(135deg, #4a9ce6, #14edd2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sc-hero-lead {
  font-size: var(--font-size-lg);
  color: rgba(255,255,255,.6);
  line-height: var(--line-height-relaxed);
  max-width: 580px;
  margin: 0 auto;
}

.sc-hero-lead strong {
  color: rgba(255,255,255,.9);
}

/* ===== SECTIONS ===== */
.sc-section {
  padding: var(--space-2xl) 0;
}

.sc-section-alt {
  background: var(--color-bg-light);
}

.sc-section-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  text-align: center;
  background: var(--gradient-bold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

.sc-section-lead {
  text-align: center;
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  max-width: 560px;
  margin: 0 auto var(--space-lg);
  line-height: var(--line-height-relaxed);
}

/* ===== CONTEXT CARDS ===== */
.ctx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.ctx-card {
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}

.ctx-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.ctx-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.ctx-label--before { color: var(--color-warning); }
.ctx-label--after  { color: var(--color-primary); }
.ctx-label--result { color: var(--color-success); }

.ctx-card h3 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.ctx-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  line-height: var(--line-height-relaxed);
  margin-bottom: 0;
}

/* ===== DEMO SHELL (interface mockup) ===== */
.demo-shell {
  background: #0f172a;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-xl);
  padding: 2rem;
  overflow: hidden;
}

.demo-shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.demo-shell-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e4e6ed;
  margin: 0;
}

.demo-shell-meta {
  font-size: 0.75rem;
  color: #64748b;
}

/* Common dark demo tokens */
.d-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 1rem;
}

.d-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.d-table th {
  color: #64748b;
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.d-table td {
  color: #cbd5e1;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,.03);
  vertical-align: middle;
}

.d-table-wrap {
  overflow-x: auto;
}

.d-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.d-kpi {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: 1rem;
}

.d-kpi h4 {
  color: #64748b;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.d-kpi .d-val {
  font-size: 1.75rem;
  font-weight: 800;
  color: #e4e6ed;
  line-height: 1;
}

.d-kpi .d-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.d-kpi .d-sub--ok  { color: #22c55e; }
.d-kpi .d-sub--err { color: #ef4444; }

.d-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 700;
}

.d-badge--ok   { background: rgba(34,197,94,.15);  color: #22c55e; }
.d-badge--warn { background: rgba(245,158,11,.15); color: #f59e0b; }
.d-badge--err  { background: rgba(239,68,68,.15);  color: #ef4444; }
.d-badge--info { background: rgba(79,70,229,.15);  color: #818cf8; }
.d-badge--muted{ background: rgba(255,255,255,.08); color: #94a3b8; }

/* ===== FEATURE CARDS ===== */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feat-card {
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-base);
}

.feat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.feat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 1rem;
}

.feat-icon--blue   { background: rgba(43,127,217,.1); }
.feat-icon--green  { background: rgba(16,185,129,.1); }
.feat-icon--orange { background: rgba(245,158,11,.1); }
.feat-icon--red    { background: rgba(239,68,68,.1); }
.feat-icon--purple { background: rgba(91,79,184,.1); }

.feat-card h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.feat-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  line-height: var(--line-height-relaxed);
  margin-bottom: 0;
}

/* ===== STACK CARDS ===== */
.sc-stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 820px;
  margin: 0 auto;
}

.sc-stack-card {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.sc-stack-card h3 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.sc-stack-card p {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  line-height: var(--line-height-relaxed);
  margin-bottom: 0;
}

/* ===== TAGS ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-sm);
  justify-content: center;
}

.tag {
  padding: 0.3rem 0.85rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: rgba(255,255,255,.7);
}

/* ===== BACK LINK ===== */
.sc-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  padding: var(--space-sm) 0 0;
  transition: gap var(--transition-fast);
}

.sc-back:hover {
  gap: 0.65rem;
  color: var(--color-primary-dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .ctx-grid,
  .feat-grid,
  .sc-stack-grid { grid-template-columns: 1fr; }

  .d-kpis { grid-template-columns: repeat(2, 1fr); }

  .sc-hero { padding: 5.5rem 0 3rem; }
}

@media (max-width: 480px) {
  .d-kpis { grid-template-columns: 1fr 1fr; }
}
