/* ═══════════════════════════════════════════════════
   Akiva Solutions — Products Page Styles
   Extends style.css without modifying it
   ═══════════════════════════════════════════════════ */

/* ─── Override fade-up for products page ─────────── */
/* style.css sets .fade-up { opacity:0; transform:translateY(24px) }
   The homepage JS observer adds .visible on scroll, but doesn't
   reliably pick up products page elements. Nuclear override: */
.product-card.fade-up,
.product-card--featured.fade-up,
.bytes-card.fade-up,
.cta-card.fade-up,
.products-section .section-header.fade-up,
.products-section .section-header,
.tools-grid .product-card {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: none !important;
}

/* ─── Nav Active State ───────────────────────────── */
.nav-active {
  color: var(--white) !important;
}

/* ─── Products Hero ──────────────────────────────── */
.products-hero {
  position: relative;
  padding: 160px 0 100px;
  overflow: hidden;
  text-align: center;
}

/* ─── Section Spacing ────────────────────────────── */
.products-section {
  padding: 100px 0;
}

.products-section--alt {
  background: var(--bg-elevated);
}

/* ─── Open Source Grid ───────────────────────────── */
.oss-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.oss-grid .product-card--featured {
  grid-column: 1 / -1;
}

/* ─── Product Cards ──────────────────────────────── */
.product-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  transition: all var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
}

.product-card:hover,
.product-card:focus-visible {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

/* Featured card (Tightwad) */
.product-card--featured {
  border-color: var(--border-accent);
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.07) 0%, var(--bg-card) 60%);
  padding: 44px 40px;
}

.product-card--featured:hover {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 20px 64px rgba(99, 102, 241, 0.18);
}

/* Flagship ribbon */
.product-ribbon {
  position: absolute;
  top: -11px;
  left: 32px;
  padding: 4px 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Product icon */
.product-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 14px;
  margin-bottom: 18px;
  flex-shrink: 0;
}

.product-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent-light);
}

.product-icon--featured {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-glow-md), var(--accent-glow));
  border-color: rgba(99, 102, 241, 0.25);
  border-radius: 16px;
}

.product-icon--featured svg {
  width: 28px;
  height: 28px;
}

/* Typography */
.product-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.product-card--featured h3 {
  font-size: 1.75rem;
}

.product-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--accent-glow);
  padding: 3px 10px;
  border-radius: 4px;
  margin-top: 4px;
}

.product-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 14px 0 28px;
}

.product-card--featured .product-desc {
  font-size: 1.05rem;
  max-width: 680px;
}

/* Feature tags */
.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.product-feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.feature-dot {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Action links */
.product-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  flex-wrap: wrap;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 9px;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  line-height: 1;
}

.product-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.product-link--primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 16px var(--accent-glow-md);
}

.product-link--primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow-lg);
  color: white;
}

.product-link--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-hover);
}

.product-link--ghost:hover {
  color: var(--white);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ─── Bytes Network Grid ─────────────────────────── */
.bytes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bytes-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: all var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.bytes-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
}

.bytes-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bytes-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bytes-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
}

.bytes-domain {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

.bytes-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.bytes-visit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-light);
  transition: color var(--duration) var(--ease);
  margin-top: 4px;
}

.bytes-card:hover .bytes-visit {
  color: var(--white);
}

.bytes-note {
  text-align: center;
  margin-top: 32px;
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bytes-note svg {
  width: 14px;
  height: 14px;
  color: var(--accent-light);
  opacity: 0.5;
  flex-shrink: 0;
}

/* ─── Tools Section ──────────────────────────────── */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 780px;
  margin: 0 auto;
}

/* ─── CTA Section ────────────────────────────────── */
.products-cta {
  padding: 100px 0;
}

.cta-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0.04) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, var(--accent-glow-md) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.cta-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  position: relative;
}

.cta-card > p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 36px;
  line-height: 1.7;
  position: relative;
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* ─── Responsive ─────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
  .bytes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .products-hero {
    padding: 120px 0 80px;
  }

  .products-section {
    padding: 80px 0;
  }

  .products-cta {
    padding: 80px 0;
  }

  .oss-grid {
    grid-template-columns: 1fr;
  }

  .oss-grid .product-card--featured {
    grid-column: 1;
  }

  .product-card--featured {
    padding: 32px 24px;
  }

  .product-card--featured h3 {
    font-size: 1.4rem;
  }

  .bytes-grid {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .cta-card {
    padding: 44px 28px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .product-card {
    padding: 26px 22px;
  }

  .product-actions {
    gap: 10px;
  }

  .product-link {
    font-size: 0.82rem;
    padding: 8px 14px;
  }
}
