/* =========================================================
   Features page – Precision Craft design enhancements
   ========================================================= */

/* === HERO ===================================================== */

.page-header-dark {
  position: relative;
  padding: 180px 0 88px;
  background: var(--navy-950);
  overflow: hidden;
  isolation: isolate;
}

/* Animated blueprint grid */
.page-header-dark::before {
  content: '';
  position: absolute;
  inset: -5% -5% -5% -5%;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.055) 1px, transparent 1px);
  background-size: 52px 52px;
  animation: bpGrid 30s linear infinite;
  z-index: 0;
}

/* Radial glow from top-center + dark vignette at bottom */
.page-header-dark::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 50% -5%, rgba(0, 212, 255, 0.18) 0%, transparent 70%),
    linear-gradient(to bottom, transparent 50%, rgba(11, 35, 58, 0.6) 100%);
  pointer-events: none;
  z-index: 0;
}

@keyframes bpGrid {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(52px, 52px); }
}

.page-header-dark .container {
  position: relative;
  z-index: 1;
}

.page-header-dark .section-eyebrow {
  color: var(--cyan-400) !important;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.page-header-dark h1 {
  font-weight: 800;
  letter-spacing: -0.027em;
  line-height: 1.08;
  color: #ffffff;
}

.page-header-dark h1 span,
.page-header-dark h1 em {
  color: var(--cyan-400);
  font-style: normal;
}

.page-header-dark p {
  font-size: 1.175rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.68);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* === FEATURE HUB =============================================== */

.feat-hub {
  background: #f7f9fc;
  padding: 5.5rem 0 6rem;
}

.feat-hub-intro h2 {
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--navy-900);
}

.feat-hub-intro p {
  color: var(--slate-500);
  font-size: 1.0625rem;
}

.feat-hub-grid {
  gap: 1.125rem;
}

/* Card base */
.feat-hub-card {
  background: white;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  transition:
    transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease;
  position: relative;
}

/* Top accent bar (hidden until hover) */
.feat-hub-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--cyan-500));
  border-radius: 16px 16px 0 0;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.feat-hub-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.1), 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: color-mix(in srgb, var(--card-accent, var(--cyan-500)) 35%, transparent);
}

.feat-hub-card:hover::before {
  opacity: 1;
}

/* Icon */
.feat-hub-icon {
  transition: transform 0.22s ease;
}

.feat-hub-card:hover .feat-hub-icon {
  transform: scale(1.1);
}

/* CTA arrow nudge on hover */
.feat-hub-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.18s ease;
}

.feat-hub-card:hover .feat-hub-cta {
  gap: 0.55rem;
}

/* Pro card tint */
.feat-hub-card--pro {
  background: linear-gradient(145deg, #f5f3ff 0%, white 55%);
  border-color: rgba(109, 40, 217, 0.18);
}

.feat-hub-card--pro:hover {
  border-color: rgba(109, 40, 217, 0.3);
}

/* === STAGGER ANIMATION ======================================== */

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.feat-hub-card {
  animation: cardReveal 0.42s ease both;
}

.feat-hub-card:nth-child(1) { animation-delay: 0.00s; }
.feat-hub-card:nth-child(2) { animation-delay: 0.06s; }
.feat-hub-card:nth-child(3) { animation-delay: 0.12s; }
.feat-hub-card:nth-child(4) { animation-delay: 0.18s; }
.feat-hub-card:nth-child(5) { animation-delay: 0.24s; }
.feat-hub-card:nth-child(6) { animation-delay: 0.30s; }
.feat-hub-card:nth-child(7) { animation-delay: 0.36s; }
.feat-hub-card:nth-child(8) { animation-delay: 0.42s; }

/* === SECONDARY FEATURES ======================================= */

.feat-hub-secondary {
  background: white;
  padding: 5rem 0 5.5rem;
  border-top: 1px solid var(--slate-100);
}

.feat-hub-secondary-grid {
  gap: 0.875rem;
}

.feat-hub-secondary-item {
  background: var(--slate-50);
  border-radius: 12px;
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--slate-100);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.feat-hub-secondary-item:hover {
  background: white;
  border-color: var(--slate-200);
  transform: translateY(-2px);
}

.feat-hub-secondary-icon {
  background: var(--navy-950);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan-400);
}

.feat-hub-secondary-icon svg {
  width: 18px;
  height: 18px;
}

.feat-hub-secondary-item h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.2rem;
  letter-spacing: -0.01em;
}

.feat-hub-secondary-item p {
  font-size: 0.875rem;
  color: var(--slate-500);
  margin: 0;
  line-height: 1.5;
  max-width: none;
}

/* === REDUCED MOTION =========================================== */

@media (prefers-reduced-motion: reduce) {
  .feat-hub-card,
  .page-header-dark::before {
    animation: none;
  }
  .feat-hub-card {
    opacity: 1;
    transform: none;
  }
}
