/* ========================================================================
   HOME PAGE COMPONENTS
   ========================================================================

   Styles specific to the homepage revamp with OS positioning.
   Includes dark sections, sticky scroll, pricing calculator, and more.

   ======================================================================== */

/* ===== MIDNIGHT NAVY DARK SECTIONS ===== */
.section-midnight {
  background-color: hsl(var(--color-midnight-navy));
  color: white;
}

.section-midnight h1,
.section-midnight h2,
.section-midnight h3,
.section-midnight h4,
.section-midnight h5,
.section-midnight h6 {
  color: white;
}

.section-midnight .text-muted-foreground {
  color: rgba(255, 255, 255, 0.75);
}

.section-midnight .gradient-text {
  background: linear-gradient(135deg, hsl(var(--color-deep-royal-blue)) 0%, hsl(var(--color-electric-cyan)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== MONOSPACE NUMBERS (OS AESTHETIC) ===== */
.mono-number {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1, 'zero' 1;
  letter-spacing: -0.02em;
}

/* ===== STICKY SCROLL SECTION ===== */
.sticky-scroll-container {
  position: relative;
}

.sticky-scroll-item {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.sticky-scroll-content {
  position: sticky;
  top: 120px;
  width: 100%;
  z-index: 1;
}

@media (max-width: 768px) {
  .sticky-scroll-content {
    position: relative;
    top: 0;
  }

  .sticky-scroll-item {
    min-height: auto;
    padding: 3rem 0;
  }
}

/* ===== PROBLEM CARDS WITH ICONS ===== */
.problem-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.problem-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px);
}

.problem-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  stroke: hsl(var(--color-the-closer));
  stroke-width: 1.5px;
  fill: none;
}

/* ===== PRICING CALCULATOR ===== */
.pricing-calculator {
  background: linear-gradient(135deg, rgba(0, 182, 216, 0.05) 0%, rgba(255, 103, 0, 0.05) 100%);
  border: 2px solid hsl(var(--color-border));
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.calculator-input-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.tier-select-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .tier-select-cards {
    grid-template-columns: 1fr;
  }
}

.tier-card {
  background: white;
  border: 2px solid hsl(var(--color-border));
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.tier-card:hover {
  border-color: hsl(var(--color-electric-cyan));
  box-shadow: 0 4px 12px rgba(0, 182, 216, 0.15);
  transform: translateY(-2px);
}

.tier-card.selected {
  border-color: hsl(var(--color-electric-cyan));
  background: hsl(var(--color-electric-cyan) / 0.05);
  box-shadow: 0 4px 16px rgba(0, 182, 216, 0.2);
}

.tier-card-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: hsl(var(--color-foreground));
  margin-bottom: 0.5rem;
}

.tier-card-description {
  font-size: 0.875rem;
  color: hsl(var(--color-muted-foreground));
  line-height: 1.4;
}

.calculator-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
  font-family: var(--font-mono);
  border: 2px solid hsl(var(--color-border));
  border-radius: 8px;
  background: white;
  transition: all 0.2s ease;
}

.calculator-input:focus {
  outline: none;
  border-color: hsl(var(--color-electric-cyan));
  box-shadow: 0 0 0 3px hsl(var(--color-electric-cyan) / 0.1);
}

.slider-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.calculator-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, hsl(var(--color-electric-cyan)) 0%, hsl(var(--color-electric-cyan)) 50%, hsl(var(--color-border)) 50%, hsl(var(--color-border)) 100%);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.calculator-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: hsl(var(--color-electric-cyan));
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 182, 216, 0.4);
  transition: all 0.2s ease;
}

.calculator-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 182, 216, 0.6);
}

.calculator-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: hsl(var(--color-electric-cyan));
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 182, 216, 0.4);
  transition: all 0.2s ease;
}

.calculator-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 182, 216, 0.6);
}

.slider-value-display {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
}

.calculator-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .calculator-results {
    grid-template-columns: 1fr;
  }
}

.calculator-result-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
}

.calculator-result-card.competitor {
  border: 2px solid hsl(var(--color-destructive) / 0.3);
  background: hsl(var(--color-muted) / 0.3);
}

.calculator-result-card.competitor .calculator-price {
  color: hsl(var(--color-destructive));
}

.calculator-result-card.workskedge {
  border: 3px solid hsl(var(--color-electric-cyan));
  background: white;
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 182, 216, 0.15);
}

.savings-badge {
  position: absolute;
  top: -12px;
  right: 12px;
  background: hsl(var(--color-electric-cyan));
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(0, 182, 216, 0.4);
}

.calculator-price {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0.5rem 0;
}

.calculator-savings {
  background: hsl(var(--color-electric-cyan) / 0.1);
  border: 1px solid hsl(var(--color-electric-cyan) / 0.3);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  text-align: center;
  margin-top: 1.5rem;
}

.calculator-savings-amount {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: hsl(var(--color-electric-cyan));
  margin: 0.25rem 0;
}

/* ===== PRICING GRAPH ===== */
.pricing-graph {
  position: relative;
  width: 100%;
  height: 300px;
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pricing-graph-canvas {
  width: 100%;
  height: 100%;
}

.graph-legend {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.graph-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.graph-legend-line {
  width: 32px;
  height: 3px;
  border-radius: 2px;
}

.graph-legend-line.competitor {
  background: hsl(var(--color-destructive));
}

.graph-legend-line.workskedge {
  background: hsl(var(--color-electric-cyan));
}

/* ===== BUNDLE TIERS ===== */
.bundle-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.bundle-tier-card {
  background: white;
  border: 2px solid hsl(var(--color-border));
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.bundle-tier-card:hover {
  border-color: hsl(var(--color-electric-cyan));
  box-shadow: 0 8px 24px rgba(0, 182, 216, 0.15);
  transform: translateY(-4px);
}

.bundle-tier-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.bundle-tier-users {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  color: hsl(var(--color-muted-foreground));
  margin-bottom: 1rem;
}

.bundle-tier-tagline {
  font-size: 0.875rem;
  line-height: 1.6;
  color: hsl(var(--color-muted-foreground));
}

/* ===== SANDBOX COMPARISON ===== */
.sandbox-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 3rem 0;
}

@media (max-width: 768px) {
  .sandbox-comparison {
    grid-template-columns: 1fr;
  }
}

.sandbox-side {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.sandbox-side.empty {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.05) 100%);
  border: 2px solid hsl(var(--color-border));
}

.sandbox-side.populated {
  background: linear-gradient(135deg, rgba(0, 182, 216, 0.05) 0%, rgba(255, 103, 0, 0.05) 100%);
  border: 2px solid hsl(var(--color-electric-cyan) / 0.3);
}

.sandbox-side-label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.sandbox-side-content {
  padding: 4rem 2rem;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ===== FAQ SECTION (SEO OPTIMIZED) ===== */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid hsl(var(--color-border));
  padding-bottom: 2rem;
}

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

.faq-question {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: hsl(var(--color-foreground));
}

.faq-answer {
  font-size: 1rem;
  line-height: 1.7;
  color: hsl(var(--color-muted-foreground));
}

/* ===== TECHNICAL LINE ICONS ===== */
.tech-icon-wrapper {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.tech-icon {
  width: 48px;
  height: 48px;
  stroke: hsl(var(--color-electric-cyan));
  stroke-width: 1.5px;
  fill: none;
}

/* ===== PROCESS STEPS ===== */
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.process-step {
  text-align: center;
}

.process-step-number {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 700;
  color: hsl(var(--color-electric-cyan));
  margin-bottom: 0.5rem;
  line-height: 1;
}

.process-step-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.process-step-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 768px) {
  .pricing-calculator {
    padding: 1.5rem;
  }

  .calculator-price {
    font-size: 2rem;
  }

  .calculator-savings-amount {
    font-size: 1.5rem;
  }

  .pricing-graph {
    height: 250px;
    padding: 1rem;
  }

  .process-steps {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
