/* ============================================================
   Apextech Solution — Featured Recent Projects section
   Design tokens match the site system:
   brand: #a78bfa / #8b5cf6 / #7c3aed / #6d28d9
   ink:   #1b2942 / #111a2e / #0a0f1b / #05080f
   mist:  #eef1f6 / #c3ccd9 / #9aa7ba
   fonts: Space Grotesk (display), JetBrains Mono (mono)
   ============================================================ */

@keyframes apx-fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.apx-featured {
  position: relative;
  background-color: #05080f;
  color: #eef1f6;
  padding: 6rem 0;
  overflow: hidden;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (min-width: 640px) { .apx-featured { padding: 8rem 0; } }

/* subtle grid backdrop — same as site .bg-grid */
.apx-featured::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(195, 204, 217, 0.043) 1px, transparent 1px),
    linear-gradient(rgba(195, 204, 217, 0.043) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

/* violet ambient glow, top-left + bottom-right */
.apx-featured::after {
  content: "";
  position: absolute;
  top: -220px; right: -180px;
  width: 560px; height: 560px;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.16), transparent 65%);
  pointer-events: none;
}

.apx-featured * { box-sizing: border-box; margin: 0; }

.apx-featured .apx-wrap {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px) { .apx-featured .apx-wrap { padding: 0 2rem; } }

/* ---------- section header ---------- */
.apx-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: 3.5rem;
}

.apx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 1.25rem;
}
.apx-eyebrow::before {
  content: "";
  width: 2rem; height: 1px;
  background: linear-gradient(90deg, #8b5cf6, transparent);
}

.apx-featured h2 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: #eef1f6;
  max-width: 21ch;
}
.apx-featured h2 .apx-accent {
  background: linear-gradient(92deg, #a78bfa, #8b5cf6 55%, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.apx-head-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  padding-bottom: 0.35rem;
}
@media (min-width: 640px) { .apx-head-right { align-items: flex-end; text-align: right; } }

.apx-count {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: rgba(238, 241, 246, 0.45);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.apx-count::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 9999px;
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.8);
  animation: apx-pulse 2.4s ease-in-out infinite;
}
@keyframes apx-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.apx-head-note {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(238, 241, 246, 0.3);
  max-width: 24ch;
  line-height: 1.9;
}

.apx-sub {
  margin-top: 1rem;
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(238, 241, 246, 0.55);
}

/* ---------- cards grid ---------- */
.apx-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 900px) {
  .apx-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 2rem; }
}

.apx-card {
  position: relative;
  display: block;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(27, 41, 66, 0.5), rgba(10, 15, 27, 0.65));
  border: 1px solid rgba(195, 204, 217, 0.12);
  border-radius: 1.25rem;
  overflow: hidden;
  transition: border-color 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
  will-change: transform;
}
.apx-card:hover,
.apx-card:focus-visible {
  border-color: rgba(139, 92, 246, 0.55);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px -18px rgba(124, 58, 237, 0.35);
}
.apx-card:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 3px; }

/* reveal on scroll */
.apx-card { opacity: 0; }
.apx-card.apx-in {
  animation: apx-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@media (prefers-reduced-motion: reduce) {
  .apx-card { opacity: 1; animation: none !important; }
  .apx-count::before { animation: none; }
}

/* ---------- browser chrome frame ---------- */
.apx-shot {
  position: relative;
  margin: 0;
  background: #0a0f1b;
}
.apx-shot-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: rgba(5, 8, 15, 0.9);
  border-bottom: 1px solid rgba(195, 204, 217, 0.1);
}
.apx-dots { display: flex; gap: 0.4rem; flex-shrink: 0; }
.apx-dots span {
  width: 10px; height: 10px;
  border-radius: 9999px;
  display: block;
}
.apx-dots span:nth-child(1) { background: #ff5f57; }
.apx-dots span:nth-child(2) { background: #febc2e; }
.apx-dots span:nth-child(3) { background: #28c840; }

.apx-url {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(238, 241, 246, 0.55);
  background: rgba(27, 41, 66, 0.55);
  border: 1px solid rgba(195, 204, 217, 0.08);
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.apx-url svg { flex-shrink: 0; opacity: 0.7; }

.apx-live-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
  padding: 0.3rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
}
.apx-live-pill i {
  width: 6px; height: 6px;
  border-radius: 9999px;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.9);
}

.apx-shot-img {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.apx-shot-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transform: scale(1.001);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}
.apx-card:hover .apx-shot-img img {
  transform: scale(1.035);
  filter: saturate(1.08);
}

/* hover arrow chip on photo */
.apx-open {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: #7c3aed;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s ease;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12), 0 10px 30px -8px rgba(124, 58, 237, 0.6);
}
.apx-card:hover .apx-open,
.apx-card:focus-visible .apx-open {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- card meta ---------- */
.apx-meta {
  padding: 1.5rem 1.6rem 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.apx-meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.apx-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(167, 139, 250, 0.75);
}
.apx-tag {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(238, 241, 246, 0.5);
  border: 1px solid rgba(195, 204, 217, 0.16);
  background: rgba(27, 41, 66, 0.45);
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  white-space: nowrap;
}
.apx-card h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #eef1f6;
  transition: color 0.3s ease;
}
.apx-card:hover h3 { color: #a78bfa; }
.apx-blurb {
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(238, 241, 246, 0.55);
}
.apx-visit {
  margin-top: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #a78bfa;
}
.apx-visit .apx-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}
.apx-card:hover .apx-visit .apx-arrow { transform: translateX(4px); }

/* ---------- bottom strip ---------- */
.apx-foot {
  margin-top: 3.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  border-top: 1px solid rgba(195, 204, 217, 0.1);
  padding-top: 1.75rem;
}
.apx-foot-note {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(238, 241, 246, 0.4);
}
.apx-foot-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(92deg, #7c3aed, #8b5cf6);
  padding: 0.8rem 1.6rem;
  border-radius: 0.75rem;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.18), 0 14px 34px -12px rgba(124, 58, 237, 0.65);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.apx-foot-cta:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.18), 0 18px 42px -12px rgba(124, 58, 237, 0.8);
}
.apx-foot-cta:focus-visible { outline: 2px solid #a78bfa; outline-offset: 3px; }
