/* Explore section test: a list of features beside a live 3D model.
   Wide screens: text on the left, model on the right.
   Narrow screens: model on top, features as short buttons, the chosen one's text below. */

html, body { margin: 0; background: #f5f5f7; }
body {
  font-family: "SF Pro Display", "Inter", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  color: #1d1d1f;
  -webkit-font-smoothing: antialiased;
}

.page { min-height: 100vh; display: flex; align-items: center; }

.explore {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 40px;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 56px;
  align-items: center;
}

.eyebrow { margin: 0 0 10px; font-size: 15px; font-weight: 600; color: #6e6e73; }
.explore h2 { margin: 0 0 30px; font-size: clamp(34px, 3.6vw, 52px); font-weight: 600; letter-spacing: -0.028em; line-height: 1.05; }

/* The feature list. Each feature is a button; the chosen one opens to show its text. */
.features { display: flex; flex-direction: column; border-top: 1px solid #d2d2d7; }
.feature {
  display: block; width: 100%; padding: 16px 0 16px 18px; margin: 0;
  border: 0; border-bottom: 1px solid #d2d2d7; border-left: 3px solid transparent;
  background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s;
}
.feature:hover { background: rgba(0, 0, 0, 0.025); }
.feature:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }
.feature.active { border-left-color: #1d1d1f; }
.feature-name { display: block; font-size: 20px; font-weight: 600; letter-spacing: -0.012em; color: #86868b; transition: color 0.3s; }
.feature.active .feature-name, .feature:hover .feature-name { color: #1d1d1f; }
/* Opens and closes smoothly without knowing the text's height. */
.feature-text { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s cubic-bezier(0.3, 0, 0.2, 1); }
.feature.active .feature-text { grid-template-rows: 1fr; }
.feature-text > span { overflow: hidden; font-size: 16px; line-height: 1.45; color: #5d5e64; }
.feature-text > span::before { content: ""; display: block; height: 6px; }

.detail { display: none; }

/* The stage. */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 28px;
  container-type: size;
  background: #dfe2e8;
  touch-action: pan-y;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#backdrop-dark { opacity: 0; }
#scene { cursor: grab; }
#scene.dragging { cursor: grabbing; }
.status { position: absolute; left: 0; right: 0; top: 46%; margin: 0; text-align: center; font-size: 15px; color: #6e6e73; }

/* If the device cannot draw 3D, the stage shows the product photo. */
.stage.no3d { background: #fff url("/tools/product-video-assets/phone-front.jpg") center / contain no-repeat; }
.stage.no3d canvas, .stage.no3d .lines { display: none; }

/* Labels on the pulled-apart view. Their width must match the script (0.22 of the stage). */
.lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lines line { stroke: #1d1d1f; stroke-width: 1; opacity: 0; }
.lines circle { fill: #1d1d1f; opacity: 0; }
.label { position: absolute; width: 22cqw; opacity: 0; color: #1d1d1f; pointer-events: none; will-change: opacity, transform; }
.label strong { display: block; font-size: 2.15cqw; font-weight: 600; letter-spacing: -0.012em; line-height: 1.12; }
.label span { display: block; margin-top: 0.4cqw; font-size: 1.5cqw; line-height: 1.3; color: #5d5e64; }

/* Narrow screens: model first, features as buttons that wrap, text below them. */
@media (max-width: 860px) {
  .page { align-items: flex-start; }
  .explore { grid-template-columns: 1fr; gap: 22px; padding: 28px 18px 40px; }
  .explore h2 { margin-bottom: 18px; }
  .explore-stage { order: -1; }
  .stage { aspect-ratio: 1 / 1; border-radius: 22px; }
  .features { flex-direction: row; flex-wrap: wrap; gap: 8px; border-top: 0; }
  .feature {
    width: auto; padding: 10px 16px; border: 1px solid #c7c7cc; border-radius: 99px; background: #fff;
  }
  .feature.active { border-color: #1d1d1f; background: #1d1d1f; }
  .feature-name { font-size: 15px; color: #1d1d1f; }
  .feature.active .feature-name, .feature.active:hover .feature-name { color: #fff; }
  .feature-text { display: none; }
  .detail { display: block; margin: 18px 0 0; min-height: 4.4em; font-size: 16px; line-height: 1.45; color: #5d5e64; }
  .label, .lines { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .feature, .feature-name, .feature-text { transition: none; }
}
