/********************
 * Product Hero Base
 ********************/
.product-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  height: 520px;
  background-image: url("../images/hero-desktop.png");
  background-size: cover;
  background-position: center 50% 80%;
  background-repeat: no-repeat;
  padding-top: 40px;
  padding-bottom: 160px;
}

/********************
 * Brand tokens for buttons
 ********************/
:root {
  --blue-200: var(--palette-gray-6);
  --blue-300: var(--palette-gray-5);
  --blue-400: var(--palette-gray-4);
  --blue-500: var(--palette-black);
  --blue-950: var(--palette-black);
  /* Default */
}

/********************
 * Image Container
 ********************/
.product-hero .hero-img-container {
  display: none;
}

/********************
 * Content Container
 ********************/
.product-hero .content-wrapper {
  position: relative;
  z-index: 5;
  height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  padding-bottom: 64px;
}

.product-hero .content-container {
  padding: 80px 24px 48px;
  max-width: 980px;
  margin: 0 auto;
}

/********************
 * Typography
 ********************/
.product-hero .logo-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}

.product-hero .logo-heading .logo {
  display: none;
}

.product-hero .heading {
  font-size: calc(32px + (44 - 32) * ((100vw - 320px) / 680));
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  color: var(--palette-white);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.product-hero .subheading {
  font-size: calc(14px + (17 - 14) * ((100vw - 320px) / 680));
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 4px 0 0;
  text-transform: uppercase;
  color: var(--palette-white);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.product-hero .tagline {
  font-size: calc(20px + (26 - 20) * ((100vw - 320px) / 680));
  font-weight: 400;
  margin: 10px 0 24px;
  color: var(--palette-white);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/********************
 * Buttons (Unified)
 * - No legacy .btn-primary / .btn-outline overrides
 * - .btn is kept only as a hook for existing JS
 ********************/
.product-hero .btn-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Base button */
.product-hero .button,
.product-hero .btn {
  all: unset;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 3rem;
  /* consistent height */
  padding: 0 2rem;
  border-radius: 9999px;
  /* pill */
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: background-color 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

/* Ripple/hover layers (safe even if spans are absent) */
.product-hero .button-inner,
.product-hero .button-inner-hover,
.product-hero .button-inner-static {
  pointer-events: none;
  display: block;
}

.product-hero .button-inner {
  position: relative;
}

.product-hero .button-inner-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transform: translateY(70%);
}

.product-hero .button-bg {
  overflow: hidden;
  border-radius: inherit;
  position: absolute;
  inset: 0;
}

.product-hero .button-bg-layers {
  position: absolute;
  left: 50%;
  transform: translate(-50%);
  top: -60%;
  aspect-ratio: 1/1;
  width: max(200%, 10rem);
}

.product-hero .button-bg-layer {
  border-radius: 9999px;
  position: absolute;
  inset: 0;
  transform: scale(0);
}

.product-hero .-purple {
  background-color: var(--blue-300);
}

.product-hero .-turquoise {
  background-color: var(--blue-400);
}

.product-hero .-yellow {
  background-color: var(--blue-200);
}

/* Primary - Solid Blue */
.product-hero .button--primary {
  background: #3B82F6;
  color: #FFFFFF;
  border: none;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.product-hero .button--primary:hover {
  background: #2563EB;
  opacity: 0.95;
}

.product-hero .button--primary:active {
  background: #1D4ED8;
  opacity: 1;
}

.product-hero .button--primary .button-bg {
  background: #3B82F6;
}

/* Secondary - Outlined Blue with Apple hover */
.product-hero .button--secondary {
  background: #FFFFFF;
  color: #1E293B;
  border: 2px solid #2563EB;
  transition: all 0.2s ease;
}

.product-hero .button--secondary:hover {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}

.product-hero .button--secondary:active {
  background: #1D4ED8;
  color: #FFFFFF;
}

/* Simple Apple-style hover - no complex animations */
@media (max-width: 767px) {
  .product-hero {
    background-image: none !important;
    background-size: auto;
    background-position: initial;
    height: 500px;
  }

  .product-hero .hero-img-container {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 500px;
    z-index: 1;
  }

  /* Show only the mobile image (per your existing setup) */
  .product-hero .hero-img-mobile {
    display: none !important;
  }

  .product-hero .hero-img-desktop {
    display: block !important;
  }

  .product-hero .hero-img-desktop img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
  }

  .product-hero .button,
  .product-hero .btn {
    min-width: 120px;
    font-size: .95rem;
    padding: 0 1.5rem;
  }
}

/********************
 * Desktop Styles (≥768px)
 ********************/
@media (min-width: 768px) {
  .product-hero {
    height: 500px;
    display: flex;
    flex-direction: column;
  }

  .product-hero .content-wrapper {
    height: 500px;
    order: 1;
  }

  .product-hero .content-container {
    padding: 60px 40px 40px;
  }

  .product-hero .heading {
    font-size: 44px;
    color: var(--palette-white);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }

  .product-hero .tagline {
    color: var(--palette-white);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }

  .product-hero .tagline {
    font-size: 26px;
    margin: 12px auto 28px;
    max-width: 600px;
  }

  .product-hero .button,
  .product-hero .btn {
    min-width: 140px;
    font-size: 17px;
    padding: 0 20px;
  }

  /* On desktop, hide both inline image containers and use CSS background */
  .product-hero .hero-img-desktop,
  .product-hero .hero-img-mobile {
    display: none !important;
  }

  .product-hero .hero-img-container {
    display: none !important;
  }
}