/* ============================================================
   SHOWCASE PAGE — showcase.css
============================================================ */

/* ── Page Hero ── */
.page-hero {
  position: relative;
  z-index: 1;
  padding: calc(var(--nav-h) + 80px) 32px 120px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.page-hero-inner,
.page-hero-inner > *,
.sc-project-card > * { min-width: 0; }

.page-hero-tag {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 24px;
}

.page-hero-title {
  font-family: var(--f-display);
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 32px;
}

.accent-text {
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-hero-desc {
  font-size: 18px;
  color: var(--dim);
  line-height: 1.6;
  max-width: 600px;
  overflow-wrap: anywhere;
}

.page-hero-grid {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  opacity: 0.3;
}

/* ── Filter Tabs ── */
.sc-filters-wrap {
  position: relative;
  z-index: 1;
  padding: 0 32px 60px;
  display: flex;
  justify-content: center;
}

.sc-filters {
  display: inline-flex;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--bdr);
  border-radius: 99px;
  padding: 6px;
  max-width: 100%;
  flex-wrap: wrap;
}

.sc-filter {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 9px 20px;
  border-radius: 99px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: none;
  transition: all 0.35s var(--ease);
  white-space: nowrap;
}

.sc-filter:hover { color: var(--text); }

.sc-filter.active {
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  color: #000;
  font-weight: 600;
}

/* ── Featured Section ── */
.sc-featured-section {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 100px;
}

.sc-section-tag {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.feat-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #22c55e;
  background: rgba(34,197,94,0.07);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 6px 14px;
  border-radius: 99px;
}

.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: tagPulse 2s ease-in-out infinite;
}

.feat-label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Project Grid ── */
.sc-live-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.sc-live-grid > * { min-width: 0; }

/* Hide filtered cards */
.sc-project-card.hidden {
  display: none;
}

/* ── Project Card ── */
.sc-project-card {
  position: relative;
  background: rgba(255,255,255,0.022);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sc-project-card:hover {
  border-color: var(--border-cyan);
  box-shadow: 0 20px 70px rgba(0,0,0,0.4);
}

/* Meta row */
.sc-project-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.sc-project-info { flex: 1; }

/* Category badge */
.sc-cat-badge {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 12px;
  font-weight: 500;
}

.sc-cat-badge.landing  { color: var(--cyan);   background: var(--cyan-dim);  border: 1px solid var(--bdr-cyan); }
.sc-cat-badge.website  { color: var(--lime);  background: var(--lime-dim); border: 1px solid var(--bdr-lime); }
.sc-cat-badge.ai       { color: var(--rose);  background: var(--rose-dim);  border: 1px solid rgba(255,59,107,0.25); }
.sc-cat-badge.marketing{ color: #f59e0b; background: rgba(245,158,11,0.08);  border: 1px solid rgba(245,158,11,0.18); }

.sc-project-title {
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.sc-project-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.72;
}

/* Live button */
.sc-live-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--cyan);
  background: rgba(34,211,238,0.07);
  border: 1px solid rgba(34,211,238,0.18);
  padding: 9px 16px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.sc-live-btn:hover {
  background: rgba(34,211,238,0.13);
  box-shadow: 0 0 20px rgba(34,211,238,0.12);
}

/* ── Browser Mockup ── */
.browser-mockup {
  border-radius: 14px;
  border: 1px solid var(--border2);
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0,0,0,0.45);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
}

.browser-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.bd {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bd.red    { background: #ef4444; }
.bd.yellow { background: #f59e0b; }
.bd.green  { background: #22c55e; }

.browser-url {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  overflow: hidden;
}

.browser-url span {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.3px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-url svg { flex-shrink: 0; color: #22c55e; }

.browser-ext {
  color: var(--muted);
  flex-shrink: 0;
  transition: color 0.3s;
}
.browser-ext:hover { color: var(--cyan); }

.browser-body {
  height: 380px;
  background: var(--bg2);
  overflow: hidden;
  position: relative;
}

.browser-body iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── iframe overlay / placeholder ── */
.iframe-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg2);
  z-index: 2;
}

.iframe-placeholder,
.demo-placeholder {
  width: min(100%, 320px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 20px;
}

.iframe-overlay.loaded { display: none; }

.ip-icon {
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34,211,238,0.07);
  border: 1px solid rgba(34,211,238,0.14);
  border-radius: 14px;
  color: var(--cyan);
}

.ip-text {
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--dim);
  text-align: center;
}

.ip-sub {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--muted);
  text-align: center;
}

.ip-load-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  color: #000;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  cursor: none;
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 20px rgba(184,255,46,0.25);
  margin: 0 auto;
}

.ip-load-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(184,255,46,0.4);
}

/* ── Card tags ── */
.sc-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sc-card-tags span {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--bdr);
  padding: 5px 12px;
  border-radius: 6px;
}

/* ── AI Demo Card ── */
.ai-card { grid-column: span 1; }

.ai-demo-wrap {
  border-radius: 16px;
  border: 1px solid rgba(168,85,247,0.18);
  background: rgba(168,85,247,0.03);
  overflow: hidden;
}

.ai-demo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(168,85,247,0.12);
  background: rgba(168,85,247,0.04);
}

.ai-demo-dots {
  display: flex;
  gap: 5px;
}

.ai-demo-dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
}

.ai-demo-dots span:nth-child(1) { background: #ef4444; }
.ai-demo-dots span:nth-child(2) { background: #f59e0b; }
.ai-demo-dots span:nth-child(3) { background: #22c55e; }

.ai-demo-title {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.ai-live-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #22c55e;
}

.ai-live-badge span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: tagPulse 2s ease-in-out infinite;
}

/* Chat box */
.ai-chat-box {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
}

.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 9px;
}

.chat-msg.user {
  flex-direction: row-reverse;
}

.chat-avatar {
  font-size: 18px;
  flex-shrink: 0;
}

.chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.6;
  opacity: 1;
  animation: chatPop 0.4s var(--ease) forwards;
}

.chat-msg.bot .chat-bubble {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--bdr);
  border-bottom-left-radius: 4px;
  color: #f0ede8;
  user-select: text;
}

.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--cyan-dim), var(--lime-dim));
  border: 1px solid var(--bdr-cyan);
  border-bottom-right-radius: 4px;
  color: #f0ede8;
  user-select: text;
}

@keyframes chatPop {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.delayed-1 .chat-bubble { animation-delay: 0.8s; }
.delayed-2 .chat-bubble { animation-delay: 1.6s; }
.delayed-3 .chat-bubble { animation-delay: 2.4s; }
.delayed-4 .chat-bubble { animation-delay: 3.2s; }

/* AI demo footer stats */
.ai-demo-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(168,85,247,0.12);
}

.ai-stat-row {
  display: flex;
  gap: 24px;
}

.ai-stat {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.ai-stat span {
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--rose);
  display: block;
}

/* AI CTA row */
.ai-cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Tracking Demo ── */
.tracking-demo {
  border-radius: 16px;
  border: 1px solid rgba(245,158,11,0.15);
  background: rgba(245,158,11,0.02);
  overflow: hidden;
}

.td-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(245,158,11,0.1);
  background: rgba(245,158,11,0.03);
}

.td-title {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.td-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #22c55e;
}

.td-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  animation: tagPulse 2s ease-in-out infinite;
}

.td-events {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.td-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.td-event-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.td-event-icon {
  font-size: 16px;
  width: 32px;
  text-align: center;
}

.td-event-name {
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 600;
}

.td-event-type {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.td-event-right { flex: 1; text-align: right; }

.td-event-count {
  font-family: var(--f-display);
  font-size: 15px;
  font-weight: 700;
  color: #f59e0b;
  margin-bottom: 5px;
}

.td-bar {
  height: 4px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.td-bar-fill {
  height: 100%;
  width: var(--w);
  border-radius: 99px;
  animation: tdFill 1.4s var(--ease-out) 0.5s both;
}

.td-bar-fill.green  { background: #22c55e; }
.td-bar-fill.cyan   { background: var(--cyan); }
.td-bar-fill.violet { background: var(--rose); }

@keyframes tdFill { from { width: 0; } }

.td-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid rgba(245,158,11,0.1);
}

.ts-label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.ts-value {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 700;
  color: #22c55e;
}

/* ── Stats Strip ── */
.sc-stats-strip {
  position: relative;
  z-index: 1;
  padding: 60px 32px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sc-stats-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 32px;
}

.sc-stat-pill {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-direction: column;
  text-align: center;
}

.sc-stat-pill > span:first-child {
  font-family: var(--f-display);
  font-size: 46px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.sc-stat-pill > span:last-child {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .sc-live-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .page-hero {
    min-height: auto;
    padding: 136px 20px 72px;
  }
  .page-hero-desc { font-size: 16px; }
  .sc-section-tag {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .sc-filters-wrap {
    padding: 0 20px 40px;
    overflow: visible;
    justify-content: center;
  }
  .sc-filters {
    min-width: 0;
    width: 100%;
    justify-content: center;
  }
  .sc-project-card { padding: 22px 20px; }
  .sc-featured-section { padding: 0 20px 80px; }
  .browser-body { height: 280px; }
  .browser-bar {
    padding: 9px 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .browser-url { min-width: 0; }
  .browser-ext { margin-left: auto; }
  .sc-project-meta {
    flex-direction: column;
    align-items: stretch;
  }
  .sc-live-btn {
    width: 100%;
    justify-content: center;
  }
  .td-event {
    flex-direction: column;
    align-items: flex-start;
  }
  .td-event-right {
    width: 100%;
    text-align: left;
  }
  .prompt-eng-preview,
  .browser-mockup { border-radius: 12px; }
}

@media (max-width: 480px) {
  .page-hero { padding: 128px 16px 64px; }
  .page-hero-desc { font-size: 15px; }
  .sc-featured-section { padding: 0 16px 72px; }
  .sc-filters-wrap { padding: 0 16px 28px; }
  .sc-project-card {
    padding: 18px 16px;
    border-radius: 18px;
  }
  .sc-section-tag { margin-bottom: 28px; }
  .feat-badge {
    font-size: 9px;
    letter-spacing: 1.2px;
  }
  .sc-stats-strip { padding: 48px 16px; }
  .sc-stat-pill { flex: 1 1 130px; }
  .sc-filters {
    width: 100%;
    justify-content: stretch;
    flex-direction: column;
    border-radius: 16px;
    padding: 5px;
  }
  .sc-filter {
    font-size: 10px;
    padding: 8px 14px;
    width: 100%;
    text-align: center;
  }
  .ai-stat-row { flex-wrap: wrap; gap: 12px; }
  .browser-bar { padding: 8px 10px; }
  .browser-url {
    padding: 4px 8px;
    min-width: 0;
  }
  .browser-url span { font-size: 8.5px; }
  .browser-body { height: 220px; }
  .sc-card-tags span {
    font-size: 9px;
    padding: 4px 10px;
  }
  .pep-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .pep-nav-links {
    flex-wrap: wrap;
    gap: 8px;
  }
  .pep-hero-title { font-size: 20px; }
  .pep-code-block { overflow-x: auto; }
}

@media (max-width: 360px) {
  .browser-body { height: 200px; }
}
