/* 3D product tour (#tour) and the reach figure (#reach). Scoped to .tour, .reach and their children.
   Calibration sheet: paper, graph grid, ink, mono labels, the finish colour as the only accent. */
.tour { --t-ink: #14181C; --t-ink2: #47505A; --t-ink3: #69737C; --t-rule: #CBD1D6;
  background-color: var(--sheet, #F3F2EE); background-image: linear-gradient(var(--graph) 1px, transparent 1px), linear-gradient(90deg, var(--graph) 1px, transparent 1px); background-size: 24px 24px;
  border-bottom: 1px solid var(--t-rule); padding: 3.5rem 0 4rem; }
.tour-head { max-width: 46rem; margin-bottom: 1.5rem; }
.tour-head h2 { margin-bottom: .75rem; }
.tour-head .lead { margin: 0; font-size: 1.12rem; }
.tour-run { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); }

/* the stage: sticky on top (phones) or beside the steps (wide screens) */
.tour-stage { position: sticky; top: var(--head-h); z-index: 2; height: min(50svh, 34rem); min-height: 260px; display: flex; flex-direction: column;
  margin: 0 -1rem; padding: .5rem 1rem 0; background-color: var(--sheet, #F3F2EE);
  background-image: linear-gradient(var(--graph) 1px, transparent 1px), linear-gradient(90deg, var(--graph) 1px, transparent 1px); background-size: 24px 24px;
  border-bottom: 1px solid var(--t-rule); box-shadow: 0 12px 18px -16px rgba(20,24,28,.35); }
@supports not (height: 1svh) { .tour-stage { height: min(50vh, 34rem); } }
.tour-sheet { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.tour-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; pointer-events: none; }
.tour-stills { position: absolute; inset: 0; z-index: 0; }
.tour-still { position: absolute; inset: 6% 8%; width: 84%; height: 88%; object-fit: contain; opacity: 0; transition: opacity .35s ease; }
.tour-still.on { opacity: 1; }
.tour-still-svg { display: flex; align-items: center; justify-content: center; }
.tour-still-svg svg { width: 100%; height: 100%; max-height: 100%; }
.live3d .tour-stills { display: none; }
.tour-reg { position: absolute; width: 18px; height: 18px; border: 0 solid var(--t-ink3, #69737C); z-index: 3; pointer-events: none; }
.tour-reg.g1 { top: 10px; left: 10px; border-top-width: 1.5px; border-left-width: 1.5px; }
.tour-reg.g2 { top: 10px; right: 10px; border-top-width: 1.5px; border-right-width: 1.5px; }
.tour-reg.g3 { bottom: 10px; left: 10px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.tour-reg.g4 { bottom: 10px; right: 10px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

/* labels in the picture, placed by tour.js on 3D anchor points */
.tour-tags { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.tour-tag { position: absolute; left: 0; top: 0; opacity: 0; white-space: nowrap; font: 600 .66rem/1 var(--mono); letter-spacing: .07em; text-transform: uppercase;
  color: var(--t-ink); background: var(--sheet, #F3F2EE); border: 1px solid var(--t-ink); border-radius: 2px; padding: .34rem .45rem .3rem; will-change: transform, opacity; }
.tour-tag::after { content: ""; position: absolute; left: var(--lx, 10px); top: 100%; width: 1px; height: var(--lead, 14px); background: var(--t-ink); }
.tour-tag::before { content: ""; position: absolute; left: calc(var(--lx, 10px) - 3px); top: calc(100% + var(--lead, 14px) - 3px); width: 7px; height: 7px; border-radius: 50%; background: var(--t-ink); box-shadow: 0 0 0 2px var(--sheet, #F3F2EE); }
.tour-tag.tag-ink { background: var(--t-ink); color: #F3F2EE; }
.tour-tag.tag-fin { box-shadow: inset 5px 0 0 var(--fin); padding-left: .75rem; }
.tour-tag.below::after { top: auto; bottom: 100%; }
.tour-tag.below::before { top: auto; bottom: calc(100% + var(--lead, 14px) - 3px); }
.tour-tag.flat::after, .tour-tag.flat::before { display: none; }
.tour-ill { position: absolute; top: 12px; left: 36px; z-index: 5; font: 700 .64rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--t-ink);
  border: 1px solid var(--t-ink); border-radius: 2px; padding: .3rem .42rem; background: var(--sheet, #F3F2EE); }
.tour-rail { position: absolute; top: 10px; right: 34px; z-index: 5; list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; font: 500 .64rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--t-ink3); }
.tour-rail li { display: flex; border-bottom: 2px solid transparent; }
.tour-rail a { display: flex; align-items: center; gap: .35rem; padding: .45rem .4rem; min-height: 30px; min-width: 28px; justify-content: center; color: inherit; text-decoration: none; cursor: pointer; border-radius: 3px; }
.tour-rail a:hover { color: var(--t-ink); background: rgba(255,255,255,.7); }
.tour-rail a:focus-visible { outline: 2px solid var(--t-ink); outline-offset: 1px; }
.tour-rail li span { display: none; }
.tour-rail li.on { color: var(--t-ink); border-bottom-color: var(--fin); font-weight: 700; }
.tour-rail li.on span { display: inline; }
@media (max-width: 480px) { .tour-rail { right: 22px; gap: 0; } .tour-rail a { padding: .45rem .26rem; min-width: 24px; } .tour-rail li.on span { display: none; } }
.tour-go3d { position: absolute; z-index: 6; left: 50%; bottom: 14%; transform: translateX(-50%); background: var(--sheet, #F3F2EE); }
.tour-caps { flex: none; min-height: 2.6rem; padding: .45rem 0 .55rem; }
.tour-cap { display: none; margin: 0; font: 400 .7rem/1.45 var(--mono); color: var(--t-ink3); }
.tour-cap.on { display: block; }
.tour-cap .cap-3d { display: none; }
.live3d .tour-cap .cap-3d { display: inline; }
.live3d .tour-cap .cap-still { display: none; }
.tour-cap b { color: var(--t-ink); font-weight: 700; margin-right: .35rem; }

/* step cards */
.tour-steps { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.tour-step { min-height: 60svh; display: flex; align-items: center; padding: 1.25rem 0; }
.tour-step:last-child { min-height: 70svh; }
@supports not (height: 1svh) { .tour-step { min-height: 60vh; } }
.tour-card { width: 100%; max-width: 30rem; background: #fff; border: 1px solid var(--t-rule); border-top: 2px solid var(--t-ink); border-radius: 0 0 4px 4px; padding: 1.1rem 1.2rem 1.15rem; box-shadow: 0 18px 30px -26px rgba(20,24,28,.6); transition: opacity .35s ease; }
.tour-card h3 { margin: .1rem 0 .55rem; font-size: 1.35rem; line-height: 1.15; font-weight: 760; font-stretch: 108%; letter-spacing: -.01em; }
.tour-card p { font-size: 1.02rem; line-height: 1.55; color: var(--t-ink2); margin: 0 0 .7rem; }
.tour-card p:last-child { margin-bottom: 0; }
.tour-k { display: flex; align-items: center; gap: .6rem; margin: 0 0 .5rem !important; font: 500 .7rem/1 var(--mono) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--t-ink3) !important; }
.tour-k b { color: var(--t-ink); font-weight: 700; padding: .2rem .38rem; border: 1px solid currentColor; border-radius: 2px; }
.tour-fine { font: 400 .86rem/1.45 var(--sans) !important; color: var(--t-ink3) !important; }
.tour-fins { margin: .85rem 0 0; }
.tour-fins .fin { min-height: 40px; font-size: .86rem; padding: .35rem .75rem .35rem .4rem; }
.tour-fins .fin i { width: 22px; height: 22px; }

/* the 20 cm / 40 cm switch (tour step and the Specs figure) */
.reach-toggle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; margin: .9rem 0 .2rem; border: 1px solid var(--t-ink, #14181C); border-radius: 4px; overflow: hidden; }
.reach-toggle button { appearance: none; -webkit-appearance: none; border: 0; margin: 0; background: #fff; color: var(--t-ink, #14181C); text-align: left; padding: .6rem .7rem; min-height: 48px; cursor: pointer; display: flex; flex-direction: column; gap: .25rem; }
.reach-toggle button + button { border-left: 1px solid var(--t-ink, #14181C); }
.reach-toggle b { font: 700 .98rem/1.1 var(--sans); }
.reach-toggle span { font: 400 .72rem/1.3 var(--mono); color: var(--t-ink3, #69737C); }
.reach-toggle button[aria-pressed="true"] { background: var(--t-ink, #14181C); color: #F3F2EE; }
.reach-toggle button[aria-pressed="true"] span { color: #C9CFD4; }
.reach-toggle button[data-reach-set="40"][aria-pressed="true"] { box-shadow: inset 0 -4px 0 var(--fin); }
.reach-toggle button:focus-visible { outline: 3px solid var(--fin); outline-offset: -3px; }

.tour-end { display: grid; gap: 1rem 2.5rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 2px solid var(--t-ink); }
.tour-end h3 { margin: 0 0 .4rem; font-size: 1.45rem; }
.tour-end p { margin: 0; color: var(--t-ink2); }
@media (min-width: 860px) { .tour-end { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; } }

/* wide screens: steps on the left, the stage sticks on the right, under the fixed buy bar */
@media (min-width: 980px) {
  .tour { padding-top: 4.5rem; }
  .tour-run { grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); column-gap: 3rem; }
  .tour-stage { grid-column: 2; grid-row: 1; top: calc(var(--head-h) + 1.25rem); height: calc(100vh - var(--head-h) - 6.5rem); max-height: 52rem; min-height: 30rem; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
  .tour-sheet { border: 1px solid var(--t-rule); border-radius: 4px; background-color: rgba(255,255,255,.35); }
  .tour-steps { grid-column: 1; grid-row: 1; }
  .tour-step { min-height: 92vh; }
  .tour-step:first-child { min-height: 70vh; align-items: flex-start; padding-top: 18vh; }
  .tour-step:not(.on) .tour-card { opacity: .5; }
  .tour-cap { font-size: .72rem; }
  .tour-tag { font-size: .7rem; }
}

/* reach figure, Specs page */
.reach { --t-ink: #14181C; --t-ink2: #47505A; --t-ink3: #69737C; --t-rule: #CBD1D6; background: var(--sheet, #F3F2EE); }
.reach-grid { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .reach-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3rem; align-items: center; } }
.reach-copy p { color: var(--t-ink2); }
.reach-fig { margin: 0; }
.reach-sheet { position: relative; aspect-ratio: 4 / 3.4; overflow: hidden; border: 1px solid var(--t-rule); border-radius: 4px;
  background-color: #fff; background-image: linear-gradient(var(--graph) 1px, transparent 1px), linear-gradient(90deg, var(--graph) 1px, transparent 1px); background-size: 20px 20px; }
.reach-sheet .tour-ill { left: 36px; }
.reach-fig figcaption { font: 400 .72rem/1.45 var(--mono); color: var(--t-ink3); margin-top: .55rem; }

@media (prefers-reduced-motion: reduce) { .tour-still, .tour-card { transition: none; } }
/* drag to look around (LookAround in tour.js) */
.look-host { touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.look-host.looking, .look-host.sliding { cursor: grabbing; }
.look-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 5; pointer-events: none; font: 500 .64rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--t-ink3, #69737C); background: rgba(255,255,255,.78); padding: .35rem .55rem; border-radius: 999px; white-space: nowrap; transition: opacity .6s; }
.look-hint { animation: lookhint 7s ease forwards; }
.look-hint.used { opacity: 0; animation: none; }
@keyframes lookhint { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .look-hint { animation: none; } }
/* the phone inset on the reach figure (ReachPhone in tour.js): a plain phone, landscape, no brand */
.rphone { position: absolute; z-index: 5; bottom: 14px; right: 14px; width: min(44%, 320px); aspect-ratio: 2.06 / 1; padding: 5px 9px; box-sizing: border-box;
  background: #15191d; border-radius: 16px; box-shadow: 0 0 0 1px #3a4047 inset, 0 14px 30px -12px rgba(10,12,14,.55); transition: opacity .35s ease; pointer-events: none; }
.rphone canvas { display: block; width: 100%; height: 100%; border-radius: 10px; }
.rphone-cam { position: absolute; left: 3px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #05070a; box-shadow: 0 0 0 1px #2a3036; }
@media (max-width: 560px) { .rphone { width: 54%; bottom: 8px; right: 8px; padding: 4px 7px; border-radius: 12px; } .rphone canvas { border-radius: 7px; } }
.rphone.rphone-flow { position: relative; bottom: auto; right: auto; width: min(84%, 330px); margin: 8px auto 4px; flex: none; }
.tour-stage .rphone.rphone-flow { width: min(64%, 250px); margin: 4px auto 0; padding: 3px 6px; border-radius: 10px; }
.look-host .rphone ~ .look-hint, .look-host:has(.rphone[style*="visible"]) .look-hint { left: 14px; transform: none; }
