/* Mobile enhancements for the homepage; desktop showcases retain their layout. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.feature-summary,
.featured-controls[hidden] {
  display: none;
}

.featured-products,
.featured-slide {
  scroll-margin-top: 76px;
}

.featured-viewport {
  position: relative;
}

.equipcheck-details {
  grid-area: points;
}

.elite-details {
  grid-column: 1 / -1;
}

.feature-details > summary,
.all-products > summary {
  width: fit-content;
  min-height: 44px;
  padding: 10px 0;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.feature-details > summary::marker,
.all-products > summary::marker {
  color: var(--accent-hover);
}

.elite-details > summary::marker {
  color: #ff6268;
}

.all-products {
  margin-top: 24px;
  border-top: 1px solid var(--divider);
  padding-top: 12px;
}

.all-products .products {
  margin-top: 20px;
}

:where(a, button, summary):focus-visible {
  outline: 3px solid var(--accent-hover);
  outline-offset: 4px;
}

@media (min-width: 769px) {
  .featured-ready .feature-details {
    display: block;
  }

  .featured-ready .feature-details > summary {
    display: none;
  }

  .elite-mobile-workflow,
  .elite-mobile-links {
    display: none;
  }

  .primary-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  section {
    padding: 32px 0;
  }

  .section-title {
    font-size: 28px;
    line-height: 1.15;
  }

  .featured-controls {
    padding-top: 0;
    padding-bottom: 32px;
  }

  .featured-selector {
    position: relative;
    isolation: isolate;
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--surface-2);
  }

  .featured-selector::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 4px auto 4px 4px;
    width: calc((100% - 12px) / 2);
    border-radius: 8px;
    background: var(--bg);
    box-shadow: inset 0 -2px var(--tab-accent, var(--accent-hover));
    transform: translateX(var(--tab-offset, 0px));
    pointer-events: none;
  }

  .featured-selector button {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  .featured-selector button[aria-pressed="true"] {
    color: var(--text);
  }

  .featured-ready .featured-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overflow-anchor: none;
  }

  .featured-ready .featured-viewport::-webkit-scrollbar {
    display: none;
  }

  .featured-ready .featured-viewport.is-animating {
    scroll-snap-type: none;
  }

  .featured-ready .featured-track {
    display: flex;
    align-items: flex-start;
  }

  .featured-ready .featured-slide {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .featured-slide {
    border: 0;
    padding: 24px 0 32px;
  }

  .equipcheck-layout,
  .elite-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .feature-description {
    display: none;
  }

  .feature-summary {
    display: block;
    font-size: 16px;
    font-weight: 400;
  }

  .featured-slide .section-title {
    max-width: none;
    font-size: clamp(24px, 6vw, 32px);
    line-height: 1.15;
  }

  .equipcheck-kicker,
  .elite-kicker {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .equipcheck-intro .btn,
  .elite-actions {
    margin-top: 18px;
  }

  .featured-slide .btn {
    min-height: 44px;
    white-space: normal;
    text-align: center;
  }

  .equipcheck-preview {
    width: auto;
    max-width: 100%;
    align-self: center;
  }

  .equipcheck-preview img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 200px;
    border-radius: 14px;
    object-fit: contain;
    box-shadow: none;
  }

  .equipcheck-preview figcaption {
    display: none;
  }

  .elite-brand-panel {
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .elite-logo {
    width: min(100%, 240px);
    margin: 0 auto;
  }

  .feature-details {
    width: 100%;
    border-top: 1px solid var(--divider);
    padding-top: 4px;
  }

  .equipcheck-points,
  .elite-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .equipcheck-point,
  .elite-feature {
    padding: 16px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .equipcheck-point + .equipcheck-point,
  .elite-feature + .elite-feature {
    border-top: 1px solid var(--divider);
  }

  .feature-details p,
  .elite-workflow b,
  .elite-brand-link {
    font-size: 16px;
    font-weight: 400;
  }

  .elite-mobile-workflow .elite-panel-title {
    margin: 12px 0;
    text-align: left;
    font-weight: 700;
  }

  .elite-workflow {
    gap: 10px;
    margin-bottom: 12px;
  }

  .elite-workflow li {
    padding-top: 0;
    border: 0;
  }

  .elite-mobile-links a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  .stats {
    gap: 0;
  }

  .stat {
    padding: 14px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .stat + .stat {
    border-top: 1px solid var(--divider);
  }

  .stat b {
    margin-bottom: 2px;
    font-size: 18px;
  }

  .products {
    margin-top: 24px;
  }

  .card {
    min-height: 0;
    padding: 16px;
    border-color: rgba(30, 41, 54, 0.6);
  }

  .card .shot {
    height: 140px;
    aspect-ratio: auto;
    border: 0;
    background: transparent;
  }

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

  .card .elite-shot,
  .card .shot--packagemanager {
    padding: 16px;
  }

  .card .actions {
    margin-top: 4px;
  }

  .card .btn {
    min-height: 44px;
  }

  .pill-list {
    gap: 0;
  }

  .pill {
    padding: 16px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .pill + .pill {
    border-top: 1px solid var(--divider);
  }

  .sidebox {
    border-color: transparent;
  }

  .ai .ai-callout {
    padding: 0;
    border: 0;
    background: transparent;
  }
}
