/* The tonearm viewer (v54.191; locked rings and photo glow fix in v54.193). Only takes effect once arm-viewer.js has started (html.arm-viewer-on); without it every page is as before. */

/* The three lines, as tabs: large, and dark ink on the tan so they read clearly (the old label was 0.72rem gold on tan, about 3.2:1). */
.arm-viewer-on .arm-lines { display: flex; justify-content: center; gap: clamp(10px, 3vw, 40px); flex-wrap: wrap; margin: 0 auto 10px; }
.arm-viewer-on .arm-line {
  font-family: var(--font-sans); font-size: clamp(0.82rem, 1.3vw, 1rem); font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-soft); text-decoration: none; padding: 10px 6px 12px; border-bottom: 2px solid transparent; transition: color .25s, border-color .25s;
}
.arm-viewer-on .arm-line:hover { color: var(--ink); }
.arm-viewer-on .arm-line.active { color: var(--ink); border-bottom-color: var(--gold-deep); }
/* v55.28 (Josiah, 19 Nov): the selected line sits 4% larger, a line under the mouse lifts 2%; each grows from its own centre, so nothing moves */
.arm-viewer-on .arm-line { display: inline-block; transform: scale(1); transform-origin: center bottom; transition: color .25s, border-color .25s, transform .6s cubic-bezier(.25,.1,.25,1); }
.arm-viewer-on .arm-line:hover { transform: scale(1.02); }
.arm-viewer-on .arm-line.active { transform: scale(1.04); }
.arm-viewer-on .arm-line-arms { font-family: var(--font-serif); font-style: italic; font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 34px; letter-spacing: 0.02em; }

/* The arm arrows (v54.193, Josiah 17 Nov): two rings LOCKED in place left and right of the arm's name, whatever its length, so the
   page stays balanced from the Agile to the Enterprise MkV. Each ring holds an arrow in a soft warm white (#FFFFFF, Josiah's pick);
   on a computer the neighbouring arm's name sits small under its ring. No loop: the Zephyr has no left ring and the PU-8 no right
   one (an empty slot keeps everything in place). A slow sideways nudge three times when an arm opens says "press me, this way". */
.arm-viewer-on .arm-name-row { display: grid; grid-template-columns: minmax(64px, 1fr) auto minmax(64px, 1fr); align-items: center; column-gap: 16px; max-width: 980px; margin: 0 auto 22px; }
.arm-viewer-on .arm-name-row > h1, .arm-viewer-on .arm-name-row > .arm-title { margin: 0 !important; padding-left: 0.45em; }   /* room for the small "The" */
.arm-viewer-on .arm-switch-prev { justify-self: start; }
.arm-viewer-on .arm-switch-next { justify-self: end; }
.arm-viewer-on .arm-switch {
  position: relative; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: 54px; height: 54px; padding: 0; border-radius: 50%; text-decoration: none;
  background: #544B3F; border: 0; color: #FFFFFF;   /* v55.05 (Josiah, 18 Nov): solid dark brown disc, the same brown as the arm name under it; white chevron */
  transition: background-color .25s, transform .25s;
}
/* The ring itself, drawn separately so its soft shadow (which lets the light ring read on the tan) never blurs the name under it. */
.arm-viewer-on .arm-switch::before { content: none; }   /* v55.05: the white ring is gone; the brown disc needs no outline */
.arm-viewer-on .arm-switch-none::before { display: none; }
.arm-viewer-on .arm-switch-none { visibility: hidden; }
.arm-viewer-on .arm-switch .as-chev { display: block; height: 20px; width: auto; color: #FFFFFF; flex: none; }
.arm-viewer-on .arm-switch-prev .as-chev { margin-right: 3px; }
.arm-viewer-on .arm-switch-next .as-chev { margin-left: 3px; }
.arm-viewer-on .arm-switch:hover, .arm-viewer-on .arm-switch:focus-visible { background-color: #1F1A14; }
/* The neighbour's name, small under its ring, lined up with the ring's outer edge so it never runs off the page and a long name never pushes the ring (computers only). */
.arm-viewer-on .arm-switch .as-name {
  position: absolute; top: 100%; margin-top: 20px; white-space: nowrap;   /* v55.05 (Josiah, 18 Nov): a little more space under the disc (was 12px) */
  font-family: var(--font-sans); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; line-height: 1; color: var(--ink-soft);
}
.arm-viewer-on .arm-switch-prev .as-name { left: 0; }
.arm-viewer-on .arm-switch-next .as-name { right: 0; }
.arm-viewer-on .arm-switch-prev:not(.arm-switch-none) { animation: armNudgeLeft 1.8s ease-in-out 0.9s 3; }
.arm-viewer-on .arm-switch-next:not(.arm-switch-none) { animation: armNudgeRight 1.8s ease-in-out 0.9s 3; }
@keyframes armNudgeRight { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@keyframes armNudgeLeft { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-5px); } }
@media (prefers-reduced-motion: reduce) { .arm-viewer-on .arm-switch { animation: none !important; } }
/* The arm's name, about 15 percent larger (Josiah, 17 Nov); "The" and the mark are sized from it, so they grow with it. */
.arm-viewer-on .product-hero h1, .arm-viewer-overview #armStage .arm-title { font-size: clamp(4.2rem, 8vw, 7.36rem); }
.arm-viewer-on .arm-lines { margin-bottom: 26px; }
/* The overview's own heading: less empty space under the site header and above the line tabs (Josiah, 17 Nov). */
.arm-viewer-overview .page-head { padding-top: 140px; padding-bottom: 34px; }
/* The photo's soft glow (Josiah, 17 Nov): it used to be cut off by the bottom of the photo box, leaving a hard line above "3 of 6".
   Now it fades out fully inside the box. */
#armStage .product-hero-image { background: radial-gradient(closest-side at 50% 55%, rgba(255, 250, 240, 0.4) 0%, rgba(255, 250, 240, 0) 100%); }
@media (max-width: 900px) {
  /* Tablets and phones: smaller rings out toward the screen edges, arrows only. */
  .arm-viewer-on .arm-switch .as-name { display: none; }
  .arm-viewer-on .arm-name-row { grid-template-columns: 1fr auto 1fr; column-gap: 4px; margin-left: -12px; margin-right: -12px; max-width: none; }
  .arm-viewer-on .arm-switch { width: 36px; height: 36px; }
  .arm-viewer-on .arm-switch .as-chev { height: 15px; }
  .arm-viewer-on .arm-switch-prev .as-chev { margin-right: 2px; }
  .arm-viewer-on .arm-switch-next .as-chev { margin-left: 2px; }
}
@media (max-width: 600px) {
  .arm-viewer-on .product-hero h1, .arm-viewer-overview #armStage .arm-title { font-size: clamp(3.2rem, 16.4vw, 4.6rem); }
  /* The two longest names step down a little on phones so the round arrows keep clear space beside them. */
  .arm-viewer-on #armStage[data-arm="enterprise-mkv"] .product-hero h1, .arm-viewer-on #armStage[data-arm="illustrious-se"] .product-hero h1,
  .arm-viewer-overview #armStage[data-arm="enterprise-mkv"] .arm-title, .arm-viewer-overview #armStage[data-arm="illustrious-se"] .arm-title { font-size: clamp(2.9rem, 14.6vw, 4.2rem); }
  .arm-viewer-overview .page-head { padding-top: 100px; padding-bottom: 20px; }
  .arm-viewer-on .arm-lines { flex-wrap: nowrap; gap: 12px; }
  .arm-viewer-on .arm-line { font-size: 0.6rem; letter-spacing: 0.14em; padding: 8px 2px 10px; white-space: nowrap; }
  .arm-viewer-on .arm-line-arms { font-size: 0.98rem; margin-bottom: 24px; }
}
.arm-viewer-on .arm-position { font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-soft); margin: 18px 0 0; }

/* The photo arrows: no longer at the sides; a small row between the main photo and the thumbnails. */
.arm-viewer-on .ac-photo-nav { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 22px auto 0; }
.arm-viewer-on .ac-photo-nav .ac-arrow { position: static; transform: none; font-size: 2.1rem; padding: 2px 10px; }
.arm-viewer-on .ac-count { font-size: 0.72rem; letter-spacing: 0.2em; color: var(--ink-soft); min-width: 4.5em; text-align: center; }
.arm-viewer-on .ac-photo-nav + .ac-thumbs { margin-top: 16px; }

/* Sliding in from the side the visitor moved towards. */
/* v55.14 (Josiah, 18 Nov): a direct cross-fade between arms, never through the tan. The old arm is laid over the new one as a ghost
   showing only its picture and words, and dissolves; the new picture and words dissolve in underneath. Tabs and arrows stay put. */
@keyframes armFadeIn { from { opacity: 0; } to { opacity: 1; } }
.arm-ghost { z-index: 3; pointer-events: none; background: transparent !important; transition: opacity .75s ease; visibility: hidden; }
.arm-ghost .arm-xf, .arm-ghost .arm-xf * { visibility: visible; }
.arm-ghost .arm-xf { animation: none !important; }
.arm-viewer-on #armStage.arm-xf-in :is(.product-hero-eyebrow, .product-hero h1, .product-hero .arm-title, .product-hero .tagline, #acMain, .arm-switch .as-name, #acThumbs, .ac-count, .arm-position) { animation: armFadeIn .75s ease both; }
@media (prefers-reduced-motion: reduce) { .arm-ghost { display: none; } .arm-viewer-on #armStage.arm-xf-in * { animation: none !important; } }

/* The overview page: the six-arm list gives way to the viewer, below the page's own introduction. */
.arm-viewer-overview .arm-tier, .arm-viewer-overview article.arm { display: none; }
.arm-viewer-overview #armStage .product-hero { padding-top: 30px; }
.arm-viewer-overview #armStage .arm-title { font-family: var(--font-serif); font-weight: 300; line-height: 0.96; color: var(--ink); margin: 0 0 22px; }
.arm-viewer-overview #armStage .arm-title em { font-style: italic; color: var(--gold-deep); }

/* Model marks (Josiah, 17 Nov): Mk5, SE, Ti and MkV small, in the top right corner of the arm's name, the way "The" sits on the Conductor SE page. */
.product-hero h1 .arm-mark, #armStage .arm-title .arm-mark {
  display: inline-block; vertical-align: top; font-size: 0.3em; line-height: 1; margin: 0.42em 0 0 0.08em;
  font-family: var(--font-serif); font-style: normal; font-weight: 400; letter-spacing: 0.02em; color: var(--ink);
}
.product-hero h1 .arm-name-nb, #armStage .arm-title .arm-name-nb { white-space: nowrap; }
/* "The", small in the top left corner of the arm's name, as on the Conductor SE page (Josiah, 17 Nov). */
.product-hero h1 .arm-name-nb, #armStage .arm-title .arm-name-nb { position: relative; display: inline-block; }
.product-hero h1 .arm-the, #armStage .arm-title .arm-the {
  position: absolute; top: 0.1em; left: auto; right: 100%; margin-right: -0.2em;   /* tucked close to the first letter without touching it (Josiah, 17 Nov) */ font-family: var(--font-serif); font-style: italic; font-weight: 300;
  font-size: 0.32em; line-height: 1; color: var(--ink); white-space: nowrap;
}
/* v55.13: the stage keeps the page's tan behind it, so while an arm fades out and the next fades in the page stays light, never dark */
.arm-viewer-on #armStage { background: var(--tan, #DDD2BB); }
