/* ═══════════════════════════════════════════════════════════════
   COMPONENTS.CSS - Reusable UI Components
   PMVW Landing Page - Phase 2
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   SKIP LINK (Accessibility)
   ───────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--blue-primary);
  color: var(--white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: var(--font-semibold);
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: 1;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue-primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--white);
  color: var(--blue-primary);
  border: 2px solid var(--blue-primary);
}

.btn-secondary:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

.btn-with-icons {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.btn-with-icons svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Button Group */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

/* ─────────────────────────────────────────
   SECTION INTRO
   ───────────────────────────────────────── */
.section-intro {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--text-secondary);
  text-align: center;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
  max-width: 600px;
}

/* ─────────────────────────────────────────
   SECTION HEADING
   ───────────────────────────────────────── */
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, var(--text-3xl));
  font-weight: var(--font-semibold);
  text-align: center;
  margin-bottom: var(--space-10);
  color: var(--text-primary);
  position: relative;
}

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--blue-primary);
  margin: var(--space-4) auto 0;
  border-radius: var(--radius-full);
}

.section-heading--no-underline::after {
  display: none;
}

/* ─────────────────────────────────────────
   FEATURES LOGO
   ───────────────────────────────────────── */
.features-logo {
  margin-bottom: var(--space-2);
}

.features-logo__image {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* ─────────────────────────────────────────
   FEATURE CARDS
   ───────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: 100%;
  max-width: 100%;
}

/* 7-card variant: 3x3 grid with last card centered */
.features-grid--7 {
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.features-grid--7 .feature-card:last-child {
  grid-column: 2;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-5) var(--space-6);
  background: var(--tv-ui-card);
  border: none;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.feature-card:hover {
  background: var(--tv-ui-card-hover);
}

.feature-icon {
  width: 36px;
  height: 36px;
  margin-bottom: var(--space-2);
  color: var(--blue-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
  color: var(--tv-ui-text-primary);
}

.feature-description {
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--tv-ui-text-secondary);
}

/* Compact features section overrides */
.section[data-section="features"] .section-intro {
  font-size: var(--text-sm);
  margin-top: 0;
  margin-bottom: var(--space-6);
  color: var(--tv-ui-text-secondary);
}

.section[data-section="features"] .section-heading {
  margin-bottom: var(--space-3);
  color: var(--tv-ui-text-primary);
}

.section[data-section="features"] .section-heading::after {
  margin-top: var(--space-2);
  width: 48px;
  height: 3px;
}

/* TV UI Background for Features */
.section[data-section="features"] {
  background: var(--tv-ui-bg);
  padding-top: var(--space-6);
  gap: 0;
}

/* ─────────────────────────────────────────
   USE CASES GRID (2x2 Tiles)
   ───────────────────────────────────────── */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

/* Section needs relative positioning for absolute grid */
.section[data-section="use-cases"] {
  position: relative;
  padding: 0;
  height: calc(100% + 3px);
  min-height: auto;
}

.section[data-section="use-cases"] .section-heading {
  display: none; /* Hide heading, tiles speak for themselves */
}

.use-case-tile {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  height: 100%;
}

.use-case-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, var(--dark-gray) 0%, var(--black) 100%);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  overflow: hidden;
}

.use-case-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.use-case-caption {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  padding: var(--space-2);
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
  color: var(--white);
}

/* Top row: caption at top of tile */
.use-case-tile--top .use-case-caption {
  top: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
}

/* Bottom row: caption at bottom of tile */
.use-case-tile--bottom .use-case-caption {
  bottom: 0;
  top: auto;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.use-case-caption h4 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--white);
  margin-bottom: 0;
}

.use-case-caption p {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* ─────────────────────────────────────────
   SCREENSHOT CONTAINER (legacy)
   ───────────────────────────────────────── */
.screenshot-container {
  margin-bottom: var(--space-10);
}

.screenshot-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--soft-gray) 0%, var(--medium-gray) 100%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.screenshot-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
}

.screenshot-caption {
  margin-top: var(--space-4);
  text-align: center;
}

.screenshot-caption h4 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.screenshot-caption p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ─────────────────────────────────────────
   STEPS (How It Works)
   ───────────────────────────────────────── */
.steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  width: 100%;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  text-align: left;
}

.step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-primary);
  color: var(--white);
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
}

.step-content h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.step-content p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ─────────────────────────────────────────
   TECH SPECS LIST
   ───────────────────────────────────────── */
.tech-specs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.tech-specs-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.tech-specs-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--blue-primary);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────
   PRICE CARD
   ───────────────────────────────────────── */
.price-card {
  background: var(--white);
  border: 1px solid var(--medium-gray);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  text-align: center;
  box-shadow: var(--shadow-md);
  max-width: 320px;
  margin: 0 auto;
}

.price-amount {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  color: var(--blue-primary);
  margin-bottom: var(--space-2);
}

.price-period {
  font-size: var(--text-base);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.price-trial {
  display: inline-block;
  background: var(--green-success);
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}

.price-value {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-style: italic;
  margin-top: var(--space-6);
}

/* ─────────────────────────────────────────
   TESTIMONIAL CARDS
   ───────────────────────────────────────── */
.testimonials-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  width: 100%;
}

.testimonial-card {
  padding: var(--space-5);
  background: var(--off-white);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--blue-primary);
  text-align: left;
}

.testimonial-quote {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  font-style: italic;
  color: var(--text-primary);
  margin: 0 0 var(--space-3) 0;
}

.testimonial-attribution {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-style: normal;
  display: block;
  text-align: right;
}

/* ─────────────────────────────────────────
   STAR RATING
   ───────────────────────────────────────── */
.rating-display {
  text-align: center;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

.rating-star {
  width: 28px;
  height: 28px;
  color: var(--gold-star);
}

.rating-star svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.rating-text {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.rating-source {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ─────────────────────────────────────────
   FAQ
   ───────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  width: 100%;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid var(--medium-gray);
  padding-bottom: var(--space-4);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--blue-primary);
  margin-bottom: var(--space-2);
}

.faq-answer {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ─────────────────────────────────────────
   REQUIREMENTS LIST
   ───────────────────────────────────────── */
.requirements-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
}

.requirements-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.requirements-list .check-icon {
  width: 16px;
  height: 16px;
  color: var(--green-success);
  flex-shrink: 0;
}

.requirements-list .check-icon svg {
  width: 100%;
  height: 100%;
}

.coming-soon {
  font-size: var(--text-xs);
  color: var(--orange-accent);
  font-style: italic;
  margin-left: var(--space-1);
}

/* ─────────────────────────────────────────
   DIVIDER
   ───────────────────────────────────────── */
.divider {
  width: 60%;
  height: 1px;
  background: var(--medium-gray);
  margin: var(--space-8) auto;
}
