/* Boditrax website - Product pages and home page product cards
 * "Explore the B3 Scout / B4 Beacon" (/products/b3-scout, /products/b4-beacon): a photograph with + points and a
 * numbered list of features. Without JavaScript each list item is a <details> that opens in place; boditrax.js
 * (initialiseFeatureExplorers) shows the + points and opens the feature in a pop-up panel (<dialog>) instead.
 * Also the neutral frame of the home page "Two assessment systems" cards.
 * Colours come from theme/colours.css (--stone, --stone-deep, --studio). Logical properties, so the panel and list
 * mirror in right-to-left languages; the + points stay where they are on the photograph. */

/* ---- Section ---------------------------------------------------------------------------------- */
.btx-explorer {
  background: var(--stone);
  color: var(--foreground);
  padding-block: 5rem;
}
@media (width >= 48rem) { .btx-explorer { padding-block: 7rem; } }
.btx-explorer__eyebrow,
.btx-explorer__intro-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.btx-explorer__intro-eyebrow { color: var(--brand-green); }
.btx-explorer__heading {
  margin-top: 1rem;
  color: var(--foreground);
  font-size: 2.25rem;
  line-height: 1.1;
  font-weight: 300;
  letter-spacing: -0.025em;
}
@media (width >= 48rem) { .btx-explorer__heading { font-size: 3rem; } }
.btx-explorer__sub {
  margin-top: 1rem;
  max-width: 36rem;
  font-size: 15px;
  line-height: 1.625;
  color: var(--muted-foreground);
}
.btx-explorer__layout {
  display: grid;
  align-items: center;
  gap: 3.5rem;
  margin-top: 3.5rem;
}
@media (width >= 64rem) {
  .btx-explorer__layout { grid-template-columns: minmax(0, 560px) 1fr; gap: 5rem; }
}

/* ---- Photograph and + points ------------------------------------------------------------------- */
.btx-explorer__figure {
  position: relative;
  width: 100%;
  max-width: 390px;
  margin-inline: auto;
}
@media (width >= 64rem) { .btx-explorer__figure { max-width: 560px; } }
.btx-explorer__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 2px);
}
.btx-explorer__point {
  position: absolute;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: var(--background);
  box-shadow: 0 0 0 7px color-mix(in oklab, var(--foreground) 38%, transparent),
    0 4px 12px -4px color-mix(in oklab, var(--foreground) 35%, transparent);
  transform: translate(-50%, -50%);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}
@media (width >= 48rem) { .btx-explorer__point { width: 32px; height: 32px; } }
.btx-explorer__point[hidden] { display: none; }
.btx-explorer__point::before,
.btx-explorer__point::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  background: var(--brand-green);
  transform: translate(-50%, -50%);
}
.btx-explorer__point::after { transform: translate(-50%, -50%) rotate(90deg); }
.btx-explorer__point:hover,
.btx-explorer__point.is-active {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 0 0 9px color-mix(in oklab, var(--foreground) 48%, transparent),
    0 6px 16px -4px color-mix(in oklab, var(--foreground) 40%, transparent);
}
.btx-explorer__point:focus-visible { outline: 3px solid var(--brand-green); outline-offset: 4px; }

/* ---- Introduction and numbered list ------------------------------------------------------------ */
.btx-explorer__intro-heading {
  margin-top: 1rem;
  font-size: 1.875rem;
  line-height: 1.2;
  font-weight: 300;
  letter-spacing: -0.025em;
}
@media (width >= 48rem) { .btx-explorer__intro-heading { font-size: 2.25rem; } }
.btx-explorer__intro-body {
  margin-top: 1.25rem;
  max-width: 32rem;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted-foreground);
}
.btx-explorer__list {
  margin-top: 2.5rem;
  border-block: 1px solid var(--stone-deep);
  list-style: none;
  padding: 0;
}
.btx-explorer__list > li + li { border-top: 1px solid var(--stone-deep); }
.btx-explorer__summary {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 52px;
  padding-block: 1rem;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}
.btx-explorer__summary::-webkit-details-marker { display: none; }
.btx-explorer__summary:hover { color: var(--brand-green); }
.btx-explorer__summary:focus-visible { outline: 2px solid var(--brand-green); outline-offset: 2px; }
.btx-explorer__number {
  width: 1.5rem;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
}
.btx-explorer__label { flex: 1; font-size: 1rem; font-weight: 500; }
.btx-explorer__plus {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1;
  color: var(--brand-green);
  transition: transform 0.2s ease;
}
.btx-explorer__item[open] .btx-explorer__plus { transform: rotate(45deg); }
.btx-explorer__detail { padding-block-end: 1.25rem; padding-inline-start: 2.75rem; }
.btx-explorer__detail-title { font-size: 1.125rem; font-weight: 400; }
.btx-explorer__detail p,
.btx-explorer__panel-body p {
  margin-top: 0.75rem;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted-foreground);
}
.btx-explorer__hint { margin-top: 1.25rem; font-size: 0.875rem; color: var(--muted-foreground); }

/* ---- Pop-up panel (with JavaScript) ------------------------------------------------------------- */
.btx-explorer__dialog {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  max-height: none;
}
.btx-explorer__dialog::backdrop { background: color-mix(in oklab, var(--foreground) 22%, transparent); }
.btx-explorer__panel {
  position: fixed;
  inset-inline-end: 2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  max-width: calc(100vw - 4rem);
  max-height: 85vh;
  overflow: auto;
  padding: 2rem;
  border-radius: calc(var(--radius) + 4px);
  background: var(--background);
  color: var(--foreground);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 25%);
}
@media (width >= 48rem) { .btx-explorer__panel { padding: 2.5rem; } }
@media (width <= 700px) {
  .btx-explorer__panel {
    inset-inline: 0;
    top: auto;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: none;
    max-height: 87dvh;
    border-end-start-radius: 0;
    border-end-end-radius: 0;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .btx-explorer__dialog[open] .btx-explorer__panel { animation: btx-explorer-in 0.28s ease; }
}
@media (prefers-reduced-motion: reduce) {
  .btx-explorer__point, .btx-explorer__plus, .btx-explorer__summary { transition: none; }
}
@keyframes btx-explorer-in { from { opacity: 0; } to { opacity: 1; } }
.btx-explorer__panel-top { display: flex; align-items: center; justify-content: space-between; }
.btx-explorer__count {
  direction: ltr; /* "02 / 05" in every language */
  unicode-bidi: isolate;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2em;
  color: var(--muted-foreground);
}
.btx-explorer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-inline-end: -0.5rem;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.btx-explorer__close:hover { background: var(--muted); }
.btx-explorer__close:focus-visible,
.btx-explorer__next:focus-visible { outline: 2px solid var(--brand-green); outline-offset: 2px; }
.btx-explorer__panel-title {
  margin-top: 1rem;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 300;
  letter-spacing: -0.025em;
}
@media (width >= 48rem) { .btx-explorer__panel-title { font-size: 1.875rem; } }
.btx-explorer__panel-body p { margin-top: 1.25rem; }
.btx-explorer__next {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin-top: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-green);
  cursor: pointer;
}
.btx-explorer__arrow:dir(rtl) { transform: scaleX(-1); }

/* ---- Home page: "Two assessment systems" cards -------------------------------------------------- */
.btx-product-card__frame {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--muted);
}
@media (width >= 48rem) { .btx-product-card__frame { padding: 1rem; } }
.btx-product-card__photo {
  aspect-ratio: 3 / 4;
  width: 100%;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  background: var(--studio);
}
