/* ==========================================================================
   Home Page Styles
   ========================================================================== */

/* Custom text selection highlight (matches product pages) */
::selection {
  background: #BBF7C8;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* --------------------------------------------------------------------------
   Background
   -------------------------------------------------------------------------- */
.background {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--background-surface-base);
  position: relative;
}

.background-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 380px;
  background-color: var(--background-surface-primary);
}

.hex-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Main Content
   -------------------------------------------------------------------------- */
.main-content {
  position: relative;
  z-index: var(--z-index-dropdown);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-64);
  max-width: 1000px;
  width: 100%;
  padding-top: var(--space-104);
  padding-left: var(--space-24);
  padding-right: var(--space-24);
  padding-bottom: var(--space-48);
}

/* --------------------------------------------------------------------------
   Page Heading
   -------------------------------------------------------------------------- */
.page-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
  text-align: center;
}

.page-title {
  font-size: 48px;
  font-weight: var(--font-weight-bold);
  line-height: 56px;
  letter-spacing: -1.92px;
  color: var(--text-default);
}

.page-subtitle {
  font-size: 18px;
  font-weight: var(--font-weight-normal);
  line-height: 24px;
  color: var(--text-caption);
  max-width: 548px;
}

/* --------------------------------------------------------------------------
   Product Cards
   -------------------------------------------------------------------------- */
.cards-container {
  display: flex;
  gap: var(--space-20);
  justify-content: center;
  width: 100%;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
  padding: var(--space-40) var(--space-24);
  width: 490px;
  max-width: 100%;
  background-color: var(--background-container-base);
  border: 0.5px solid var(--system-slate-500, #6A7789);
  border-radius: var(--radius-card);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.product-card:hover {
  border-color: var(--background-success-default);
}

.product-card:focus {
  outline: none;
}

.product-card:focus-visible {
  border-color: var(--background-success-default);
  outline: 2px solid var(--system-slate-900);
  outline-offset: 2px;
}

.card-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 156px;
  height: 109px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-card:hover .card-illustration,
.product-card:focus-visible .card-illustration {
  transform: translateY(-4px);
}

.card-illustration img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.25;
  color: var(--text-default);
  text-align: center;
}

.card-description {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-m);
  color: var(--text-primary);
  text-align: center;
  margin-top: calc(-1 * var(--space-8)); /* Reduce gap from title to 8px */
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .card-illustration {
    transition: none;
  }
  .product-card:hover .card-illustration,
  .product-card:focus-visible .card-illustration {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 var(--space-24);
  background: var(--background-surface-base);
  flex-shrink: 0;
}

.footer-text {
  font-size: 14px;
  font-weight: var(--font-weight-normal);
  line-height: 20px;
  color: var(--text-caption);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .cards-container {
    flex-direction: column;
    align-items: center;
  }

  .product-card {
    width: 100%;
    max-width: 490px;
  }
}

@media (max-width: 576px) {
  .page-title {
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -1px;
  }

  .page-subtitle {
    font-size: var(--font-size-md);
  }

  .main-content {
    padding-top: var(--space-64);
    gap: var(--space-48);
  }

  .product-card {
    padding: var(--space-32) var(--space-24);
  }

  .card-illustration {
    width: 140px;
    height: 98px;
  }
}
