/**
 * vs-opal.css — PravaApp vs Opal comparison page
 * Dark theme with challenger purple color scheme
 */

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --vs-primary: #6B00FF;
  --vs-secondary: #9b40ff;
  --vs-negative: #ff4444;
  --vs-negative-bg: rgba(255, 68, 68, 0.08);
  --vs-negative-border: rgba(255, 68, 68, 0.25);
  --vs-positive: #4ade80;
  --vs-positive-bg: rgba(74, 222, 128, 0.08);
  --vs-positive-border: rgba(74, 222, 128, 0.25);
  --vs-neutral: #888;
  --vs-neutral-bg: rgba(136, 136, 136, 0.08);
  --vs-neutral-border: rgba(136, 136, 136, 0.2);
  --vs-dark: #0a0a1a;
  --vs-dark-mid: #0f0f22;
  --vs-card-bg: rgba(255, 255, 255, 0.04);
  --vs-card-border: rgba(255, 255, 255, 0.08);
  --vs-text: #e0e0e0;
  --vs-text-muted: rgba(224, 224, 224, 0.6);
  --vs-glow: 0 0 40px rgba(107, 0, 255, 0.3);
}

/* ============================================================
   BASE
   ============================================================ */
body.page-vs-opal {
  background-color: var(--vs-dark);
  color: var(--vs-text);
  font-family: 'Instrument Sans', 'Lexend', Arial, sans-serif;
}

/* Subtle noise grain overlay for glass depth — brand-standard texture */
body.page-vs-opal::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: overlay;
}

body.page-vs-opal a {
  color: var(--vs-secondary);
  text-decoration: none;
}

body.page-vs-opal a:hover {
  color: #fff;
}

/* Ensure button links always have white text — override generic anchor color */
body.page-vs-opal a.button {
  color: #fff;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.vs-hero {
  background: linear-gradient(160deg, #0a0014 0%, #12003a 40%, #1a0050 70%, #0a0a1a 100%);
  color: #fff;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Animated conic background — brand-standard ambient motion */
.vs-hero::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #0a0014,
    #12003a,
    #6B00FF,
    #12003a,
    #0a0014
  );
  animation: vs-rotate 120s linear infinite;
  z-index: 0;
  opacity: 0.35;
}

@keyframes vs-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vs-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(107, 0, 255, 0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.vs-hero .container {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.vs-hero__badge {
  display: inline-block;
  background: rgba(107, 0, 255, 0.2);
  border: 1px solid rgba(107, 0, 255, 0.5);
  color: var(--vs-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  animation: vs-badge-glow 3s ease-in-out infinite;
}

@keyframes vs-badge-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(107, 0, 255, 0.15); }
  50% { box-shadow: 0 0 20px rgba(107, 0, 255, 0.35), 0 0 4px rgba(155, 64, 255, 0.2); }
}

.vs-hero__title {
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 20px rgba(107, 0, 255, 0.3);
}

.vs-hero__subtitle {
  color: rgba(255, 255, 255, 0.75);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   COMPARISON SECTION
   ============================================================ */
.vs-comparison {
  background: var(--vs-dark);
}

.vs-comparison .h2-heading {
  text-align: center;
  margin-bottom: 2.5rem;
  color: #fff;
}

/* ============================================================
   COMPARISON TABLE
   ============================================================ */
.vs-table {
  background: var(--vs-card-bg);
  border: 1px solid var(--vs-card-border);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.vs-table__row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid var(--vs-card-border);
  transition: background 0.2s ease;
}

.vs-table__row:last-child {
  border-bottom: none;
}

.vs-table__row:not(.vs-table__header):hover {
  background: rgba(255, 255, 255, 0.03);
}

.vs-table__header {
  background: rgba(0, 0, 0, 0.3);
}

.vs-table__cell {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  border-right: 1px solid var(--vs-card-border);
}

.vs-table__cell:last-child {
  border-right: none;
}

/* Label column */
.vs-table__cell--label {
  font-weight: 600;
  color: var(--vs-text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Opal column header */
.vs-table__cell--opal.vs-table__header,
.vs-table__header .vs-table__cell--opal {
  background: rgba(255, 68, 68, 0.06);
  font-weight: 700;
  color: rgba(255, 150, 150, 0.9);
  justify-content: center;
  font-size: 1rem;
}

/* PravaApp column header */
.vs-table__header .vs-table__cell--prava {
  background: rgba(107, 0, 255, 0.1);
  font-weight: 700;
  color: #fff;
  justify-content: center;
  font-size: 1rem;
}

.vs-table__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.vs-table__brand-name {
  font-size: 1rem;
  font-weight: 700;
}

/* State modifiers */
.vs-table__cell--negative {
  background: var(--vs-negative-bg);
  color: rgba(255, 150, 150, 0.9);
  border-left: 3px solid var(--vs-negative-border);
}

.vs-table__cell--positive {
  background: var(--vs-positive-bg);
  color: rgba(180, 255, 210, 0.95);
  border-left: 3px solid var(--vs-positive-border);
}

.vs-table__cell--neutral {
  background: var(--vs-neutral-bg);
  color: rgba(200, 200, 200, 0.8);
  border-left: 3px solid var(--vs-neutral-border);
}

/* Highlight row — Philosophy */
.vs-table__row--highlight {
  background: rgba(107, 0, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(107, 0, 255, 0.2);
}

.vs-table__row--highlight .vs-table__cell--label {
  color: rgba(200, 180, 255, 0.9);
}

/* ============================================================
   WHY BLOCKING FAILS
   ============================================================ */
.vs-why-blocking-fails {
  background: var(--vs-dark-mid);
}

.vs-why-blocking-fails .h2-heading {
  text-align: center;
  margin-bottom: 2.5rem;
  color: #fff;
}

.vs-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.vs-card {
  background: var(--vs-card-bg);
  border: 1px solid var(--vs-card-border);
  border-radius: 16px;
  padding: 32px 28px;
  backdrop-filter: blur(8px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vs-card:hover {
  transform: translateY(-4px);
}

.vs-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.vs-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.vs-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--vs-text-muted);
}

.vs-card--negative {
  border-color: var(--vs-negative-border);
  box-shadow: 0 0 24px rgba(255, 68, 68, 0.08);
}

.vs-card--negative:hover {
  box-shadow: 0 8px 32px rgba(255, 68, 68, 0.15);
}

.vs-card--positive {
  border-color: var(--vs-positive-border);
  box-shadow: 0 0 24px rgba(74, 222, 128, 0.08);
}

.vs-card--positive:hover {
  box-shadow: 0 8px 32px rgba(74, 222, 128, 0.15);
}

.vs-card--insight {
  border-color: rgba(107, 0, 255, 0.35);
  box-shadow: 0 0 24px rgba(107, 0, 255, 0.1);
  background: rgba(107, 0, 255, 0.06);
}

.vs-card--insight:hover {
  box-shadow: 0 8px 32px rgba(107, 0, 255, 0.2);
}

/* ============================================================
   PROOF / METRICS
   ============================================================ */
.vs-proof {
  background: var(--vs-dark);
  text-align: center;
}

.vs-proof .h2-heading {
  color: #fff;
  margin-bottom: 0.75rem;
}

.vs-proof .subheading {
  color: var(--vs-text-muted);
  margin-bottom: 3rem;
}

.vs-metrics {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.vs-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 180px;
}

.vs-metric__value-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.vs-metric__value {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--vs-secondary);
  line-height: 1;
  text-shadow: 0 0 30px rgba(155, 64, 255, 0.5);
  font-variant-numeric: tabular-nums;
}

.vs-metric__unit {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--vs-text-muted);
}

.vs-metric__label {
  font-size: 0.9rem;
  color: var(--vs-text-muted);
  text-align: center;
  max-width: 160px;
  line-height: 1.4;
}

/* Device wizard styles are now in /css/device-wizard.css (shared module) */

/* ============================================================
   FINAL CTA
   ============================================================ */
.vs-final-cta {
  background: linear-gradient(135deg, #0a0014 0%, #16003d 50%, #0a0a1a 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.vs-final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(107, 0, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.vs-final-cta .container {
  position: relative;
  z-index: 2;
}

.vs-final-cta .h2-heading {
  color: #fff;
  margin-bottom: 0.5rem;
}

.button--large {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.vs-footer {
  background: rgba(0, 0, 0, 0.5);
  border-top: 1px solid var(--vs-card-border);
  padding: 40px 0;
  text-align: center;
}

.vs-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.vs-footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--vs-text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.vs-footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.vs-footer__links a {
  color: var(--vs-text-muted);
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.vs-footer__links a:hover {
  color: #fff;
}

.vs-footer__copy {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(200, 200, 200, 0.35);
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media screen and (max-width: 991px) {
  .vs-cards {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
  }

  .vs-metrics {
    gap: 32px;
  }

}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media screen and (max-width: 767px) {
  .vs-hero {
    padding: 100px 0 60px;
    min-height: auto;
  }

  /* Table: stack into single-column cards */
  .vs-table__row {
    grid-template-columns: 1fr;
    border-bottom: 2px solid var(--vs-card-border);
  }

  .vs-table__header {
    display: none;
  }

  .vs-table__cell {
    border-right: none;
    border-bottom: 1px solid var(--vs-card-border);
    padding: 14px 16px;
  }

  .vs-table__cell:last-child {
    border-bottom: none;
  }

  .vs-table__cell--label {
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.75rem;
  }

  /* Add column labels on mobile via pseudo-elements */
  .vs-table__cell--opal::before {
    content: 'Opal: ';
    font-weight: 700;
    color: rgba(255, 150, 150, 0.8);
    margin-right: 4px;
    flex-shrink: 0;
  }

  .vs-table__cell--prava::before {
    content: 'PravaApp: ';
    font-weight: 700;
    color: rgba(180, 255, 210, 0.9);
    margin-right: 4px;
    flex-shrink: 0;
  }

  .vs-table__cell--opal,
  .vs-table__cell--prava {
    border-left: none;
    padding-left: 16px;
  }

  .vs-table__cell--negative {
    border-left: 3px solid var(--vs-negative-border);
  }

  .vs-table__cell--positive {
    border-left: 3px solid var(--vs-positive-border);
  }

  .vs-table__cell--neutral {
    border-left: 3px solid var(--vs-neutral-border);
  }

  /* Metrics */
  .vs-metrics {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .vs-metric__value {
    font-size: 2.75rem;
  }


  /* Footer links */
  .vs-footer__links {
    gap: 16px;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .vs-card {
    transition: none;
  }

  .vs-card:hover {
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
