/* ═══════════════════════════════════════════════════════════════
   RIVEL Features — Premium product landing page
   Showcases RIVEL OS capabilities across all tiers.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --rvf-bg: #000;
  --rvf-surface-1: rgba(255, 255, 255, 0.04);
  --rvf-surface-2: rgba(255, 255, 255, 0.06);
  --rvf-border: rgba(255, 255, 255, 0.08);
  --rvf-border-hover: rgba(255, 255, 255, 0.18);
  --rvf-text: #fff;
  --rvf-text-2: rgba(255, 255, 255, 0.75);
  --rvf-text-3: rgba(255, 255, 255, 0.55);
  --rvf-text-4: rgba(255, 255, 255, 0.35);
  --rvf-accent: #1c52ff;
  --rvf-accent-glow: rgba(28, 82, 255, 0.35);
}

/* ─── SECTION WRAPPER ─── */
.rv-features-section {
  position: relative;
  background: var(--rvf-bg);
  color: var(--rvf-text);
  font-family: Geist, 'Space Grotesk', 'Manrope', sans-serif;
  padding: 6rem 1.5rem 5rem;
  overflow: hidden;
  isolation: isolate;
}
.rv-features-section::before {
  content: '';
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 95vw);
  height: 900px;
  background: radial-gradient(circle at 50% 45%, rgba(28, 82, 255, 0.32) 0%, rgba(28, 82, 255, 0.08) 32%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.rv-features-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.rv-features-header {
  text-align: center;
  margin-bottom: 5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}
.rv-features-title {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--rvf-text);
  margin: 0.5rem 0 0;
  max-width: 22ch;
}
.rv-features-subtitle {
  font-size: 1.0625rem;
  color: var(--rvf-text-3);
  font-weight: 400;
  line-height: 1.55;
  max-width: 36rem;
  margin: 0;
}
.rv-features-hero-ctas {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ═══════════════════════════════════════════
   PILLARS GRID (4 bento cards)
   ═══════════════════════════════════════════ */
.rv-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 7rem;
}
.rv-pillar-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid var(--rvf-border);
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem 1.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  transition: transform 0.3s ease, border-color 0.25s ease, background 0.25s ease;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.rv-pillar-card:hover {
  border-color: var(--rvf-border-hover);
  transform: translateY(-4px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.02) 100%);
}
.rv-pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(201, 170, 255, 0.15), rgba(131, 154, 255, 0.1));
  border: 1px solid rgba(179, 226, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #b3e2ff;
}
.rv-pillar-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.4;
  fill: none;
}
.rv-pillar-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--rvf-text);
  margin: 0;
}
.rv-pillar-desc {
  font-size: 0.875rem;
  color: var(--rvf-text-3);
  line-height: 1.55;
  margin: 0;
}

/* ═══════════════════════════════════════════
   DEEP-DIVE FEATURE ROWS (alternating image + content)
   ═══════════════════════════════════════════ */
.rv-feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
}
.rv-feature-row + .rv-feature-row {
  border-top: 1px solid var(--rvf-border);
}
.rv-feature-row.is-reversed .rv-feature-row-content {
  order: 2;
}
.rv-feature-row.is-reversed .rv-feature-row-media {
  order: 1;
}

.rv-feature-row-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.rv-feature-row-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--rvf-text-3);
  font-variant-numeric: tabular-nums;
  width: fit-content;
}
.rv-feature-row-eyebrow-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}
.rv-feature-row-title {
  font-size: clamp(1.75rem, 3.5vw, 2.375rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--rvf-text);
  margin: 0;
}
.rv-feature-row-desc {
  font-size: 1rem;
  color: var(--rvf-text-3);
  line-height: 1.6;
  margin: 0;
  max-width: 42ch;
}
.rv-feature-row-bullets {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.rv-feature-row-bullets li {
  font-size: 0.925rem;
  color: var(--rvf-text-2);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  line-height: 1.5;
}
.rv-feature-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 100%;
  background: linear-gradient(135deg, #c9aaff, #b3e2ff);
  color: #0a0a0a;
  font-size: 0.625rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
  line-height: 1;
  box-shadow: 0 0 12px -2px rgba(131, 154, 255, 0.4);
}

/* Media (image / mockup) */
.rv-feature-row-media {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(201, 170, 255, 0.08), rgba(131, 154, 255, 0.04));
  border: 1px solid var(--rvf-border);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  aspect-ratio: 16 / 11;
}
.rv-feature-row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rv-feature-row-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.25) 100%);
  pointer-events: none;
}
/* Ambient color glow behind the media */
.rv-feature-row-media-glow {
  position: absolute;
  inset: -40px;
  z-index: -1;
  background: radial-gradient(circle at 50% 50%, rgba(28, 82, 255, 0.15), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   FEATURE MATRIX (all-features grid)
   ═══════════════════════════════════════════ */
.rv-matrix-section {
  padding: 6rem 0 4rem;
  border-top: 1px solid var(--rvf-border);
}
.rv-matrix-header {
  text-align: center;
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}
.rv-matrix-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  color: var(--rvf-text);
  margin: 0;
  line-height: 1.1;
}
.rv-matrix-subtitle {
  font-size: 1rem;
  color: var(--rvf-text-3);
  font-weight: 400;
  max-width: 34rem;
  margin: 0;
  line-height: 1.55;
}
.rv-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rvf-border);
  border: 1px solid var(--rvf-border);
  border-radius: 1.5rem;
  overflow: hidden;
}
.rv-matrix-item {
  background: #0a0a0a;
  padding: 1.75rem 1.5rem 1.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  transition: background 0.2s ease;
}
.rv-matrix-item:hover {
  background: #0f0f0f;
}
.rv-matrix-icon {
  width: 34px;
  height: 34px;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rvf-text-2);
  margin-bottom: 0.25rem;
}
.rv-matrix-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}
.rv-matrix-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rvf-text);
  letter-spacing: -0.01em;
  margin: 0;
}
.rv-matrix-item-desc {
  font-size: 0.825rem;
  color: var(--rvf-text-3);
  line-height: 1.55;
  margin: 0;
}

/* ═══════════════════════════════════════════
   CTA BANNER (reuses design from pricing/blog)
   ═══════════════════════════════════════════ */
.rv-features-cta {
  position: relative;
  margin-top: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem 3.25rem;
  border-radius: 2rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(28, 82, 255, 0.04) 50%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(20px);
          backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 20px 60px -20px rgba(28, 82, 255, 0.25);
}
.rv-features-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(28, 82, 255, 0.15), transparent 60%);
  pointer-events: none;
}
.rv-features-cta::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -15%;
  width: 50%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(201, 170, 255, 0.08), transparent 60%);
  pointer-events: none;
}
.rv-features-cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex: 1;
}
.rv-features-cta-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 100vw;
  background: rgba(255, 255, 255, 0.08);
  color: var(--rvf-text-2);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.rv-features-cta-title {
  font-size: clamp(1.5rem, 2.75vw, 1.875rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--rvf-text);
  margin: 0;
  line-height: 1.15;
}
.rv-features-cta-desc {
  font-size: 0.95rem;
  color: var(--rvf-text-3);
  line-height: 1.55;
  margin: 0;
  max-width: 32rem;
}
.rv-features-cta-btns {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media screen and (max-width: 1023px) {
  .rv-pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rv-feature-row {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 0;
  }
  .rv-feature-row.is-reversed .rv-feature-row-content,
  .rv-feature-row.is-reversed .rv-feature-row-media {
    order: initial;
  }
  .rv-matrix-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rv-features-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 2.25rem;
  }
  .rv-features-cta-btns {
    width: 100%;
  }
  .rv-features-cta-btns .rv-cta {
    flex: 1;
    justify-content: center;
    min-width: 160px;
  }
}

@media screen and (max-width: 767px) {
  .rv-features-section {
    padding: 4.5rem 1rem 4rem;
  }
  .rv-features-header {
    margin-bottom: 3.5rem;
  }
  .rv-features-section::before {
    top: -150px;
    width: 600px;
    height: 600px;
  }
  .rv-pillars-grid {
    grid-template-columns: 1fr;
    margin-bottom: 4.5rem;
  }
  .rv-matrix-grid {
    grid-template-columns: 1fr;
  }
  .rv-matrix-section {
    padding: 4rem 0 3rem;
  }
  .rv-features-cta {
    padding: 1.75rem;
    border-radius: 1.5rem;
  }
}
