/* ar.css: "See the G1 in your own space" (features/ar.js). Uses the page tokens (--deep, --panel, --ink, --soft, --dim, --teal, --line).
   Shared by index.html (section#ar-g1) and robots/g1.html (the dialog opened from the hero). */

/* ---------- the stage and the viewer (both pages) ---------- */
.ar-stage { position: relative; isolation: isolate; border-radius: 24px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(ellipse 62% 55% at 50% 64%, #0A4664 0%, #032A40 52%, #011B2B 100%); min-height: 320px; }
.ar-stage::before { content: ""; position: absolute; inset: auto 12% 9% 12%; height: 26%; z-index: -1; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(74, 213, 253, .16), transparent 70%); }
html[data-theme="light"] .ar-stage { background: radial-gradient(ellipse 62% 55% at 50% 64%, #CFE8F2 0%, #E9F3F7 55%, #F8FBFC 100%); }
html[data-theme="light"] .ar-stage::before { background: radial-gradient(ellipse at center, rgba(0, 131, 155, .12), transparent 70%); }
model-viewer.ar-mv { display: block; position: absolute; inset: 0; width: 100%; height: 100%; background: transparent; --poster-color: transparent; --progress-bar-height: 0px; outline: none;
  direction: ltr; }   /* model-viewer places hotspots from the left: in an RTL page they would land off the model */
model-viewer.ar-mv:not(:defined) > * { display: none !important; }
.ar-stage .ar-wait { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; color: var(--dim); font-family: var(--display); font-size: 14.5px; pointer-events: none; transition: opacity .5s; }
.ar-stage .ar-wait svg { width: 46px; height: 46px; color: var(--teal); opacity: .8; }
.ar-box.loaded .ar-wait { opacity: 0; }
.ar-box.broken .ar-wait svg { display: none; }
.ar-progress { position: absolute; inset: auto 0 0 0; height: 3px; background: transparent; pointer-events: none; }
.ar-progress i { display: block; height: 100%; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .3s, opacity .6s .3s; }
html[dir="rtl"] .ar-progress i { transform-origin: right; }
.ar-box.loaded .ar-progress i { opacity: 0; }

/* the numbered points on the model */
.ar-hs { --s: 30px; width: var(--s); height: var(--s); padding: 0; border-radius: 50%; border: 1.5px solid #fff; background: rgba(0, 36, 58, .78); color: #fff; cursor: pointer;
  font: 900 italic 14px/1 "Lato", sans-serif; display: grid; place-items: center; box-shadow: 0 0 0 4px rgba(74, 213, 253, .22), 0 6px 16px rgba(0, 0, 0, .35);
  transition: opacity .3s, transform .3s var(--ease), background .25s, box-shadow .25s; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.ar-hs:not([data-visible]) { opacity: 0; pointer-events: none; }
.ar-hs:hover, .ar-hs.on { background: var(--teal); color: #00243A; border-color: var(--teal); box-shadow: 0 0 0 6px rgba(74, 213, 253, .28), 0 6px 16px rgba(0, 0, 0, .35); transform: scale(1.1); }
html[data-theme="light"] .ar-hs:hover, html[data-theme="light"] .ar-hs.on { color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .ar-box.loaded .ar-hs[data-visible]:not(.on) { animation: arPulse 2.8s var(--ease) infinite; }
  @keyframes arPulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(74, 213, 253, .22), 0 6px 16px rgba(0, 0, 0, .35); } 50% { box-shadow: 0 0 0 9px rgba(74, 213, 253, .06), 0 6px 16px rgba(0, 0, 0, .35); } }
}

/* chips on the stage: the size, a hint, the "full view" button */
.ar-tag { position: absolute; z-index: 2; top: 16px; inset-inline-start: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  background: rgba(0, 19, 31, .55); border: 1px solid rgba(255, 255, 255, .14); color: #fff; font-family: var(--display); font-size: 13.5px; font-weight: 700; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ar-tag b { font-family: "Lato", sans-serif; font-weight: 900; font-style: italic; color: var(--teal); font-size: 15px; }
html[data-theme="light"] .ar-tag { background: rgba(255, 255, 255, .78); border-color: var(--line-2); color: var(--ink); }
.ar-hint { position: absolute; z-index: 2; bottom: 16px; inset-inline-start: 16px; color: var(--dim); font-family: var(--display); font-size: 13px; display: inline-flex; gap: 8px; align-items: center; pointer-events: none; }
.ar-hint svg { width: 18px; height: 18px; }
.ar-reset { position: absolute; z-index: 2; top: 16px; inset-inline-end: 16px; font-family: var(--display); font-weight: 700; font-size: 13.5px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(0, 19, 31, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html[data-theme="light"] .ar-reset { background: rgba(255, 255, 255, .85); color: var(--ink); border-color: var(--line-2); }
/* "See it in your space": model-viewer shows this slotted button only where AR can start */
.ar-launch { position: absolute; z-index: 3; bottom: 18px; left: 50%; transform: translateX(-50%); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.ar-launch:hover { transform: translateX(-50%) translateY(-1px); }
.ar-box.is-phone .ar-hint { display: none; }
.ar-box.is-phone .ar-launch ~ .ar-hint { display: none; }

/* ---------- the copy and the points list ---------- */
.ar-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); counter-reset: none; }
.ar-points li { border-bottom: 1px solid var(--line); }
.ar-points button { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 4px; border-radius: 10px; transition: background .25s; }
.ar-points button:hover { background: rgba(74, 213, 253, .05); }
.ar-points button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ar-points .n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--teal); color: var(--teal); font: 900 italic 14px/1 "Lato", sans-serif; margin-top: 2px; transition: background .25s, color .25s; }
.ar-points button[aria-pressed="true"] .n { background: var(--teal); color: #00243A; }
html[data-theme="light"] .ar-points button[aria-pressed="true"] .n { color: #fff; }
.ar-points b { display: block; font-family: var(--display); font-weight: 800; font-size: 17px; color: var(--ink); }
.ar-points .d { display: block; color: var(--soft); font-size: 15.5px; line-height: 1.65; margin-top: 2px; }
.ar-qr { display: none; align-items: center; gap: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.ar-box.is-desk .ar-qr { display: flex; }
.ar-qr-code { flex: none; width: 112px; height: 112px; border-radius: 10px; overflow: hidden; background: #fff; }
.ar-qr-code svg { display: block; width: 100%; height: 100%; }
.ar-qr b { display: block; font-family: var(--display); font-weight: 800; font-size: 16px; }
.ar-qr p { color: var(--soft); font-size: 14.5px; line-height: 1.6; margin-top: 4px; }
.ar-note { color: var(--dim); font-size: 14px; line-height: 1.7; }
.ar-alert { color: var(--ink); font-size: 14.5px; line-height: 1.6; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(74, 213, 253, .35); background: rgba(74, 213, 253, .07); }
.ar-credit { color: var(--dim); font-size: 12.5px; line-height: 1.6; }   /* no extra fading: small text needs the full 4.5:1 (6 Nov 2026) */
.ar-credit a { color: inherit; text-underline-offset: 3px; }

/* ---------- index.html: section#ar-g1, the showroom of every robot (14 Nov 2026) ---------- */
section.ar-g1 { background: var(--deep); }
.ar-g1 .head { margin-bottom: 0; max-width: 780px; }
/* the cards sit beside the stage, so a click changes the robot right next to it */
.ar-g1 .ar-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-areas: "stage pick" "stage info" "stage go"; grid-template-rows: auto auto 1fr;
  column-gap: clamp(28px, 4vw, 60px); row-gap: 26px; align-items: start; margin-top: clamp(26px, 3vw, 40px); }
.ar-g1 .ar-stage { grid-area: stage; height: clamp(540px, 80vh, 760px); position: sticky; top: 96px; }
.ar-g1 .ar-pickbar { grid-area: pick; }
.ar-g1 .ar-infos { grid-area: info; padding-top: 22px; border-top: 1px solid var(--line); }
.ar-g1 .ar-go { grid-area: go; display: grid; gap: 14px; }

/* the robots to choose from */
.ar-pickbar { display: grid; gap: 14px; }
.ar-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.ar-cats button { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--soft); font: inherit; font-family: var(--display); font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.ar-cats button:hover { color: var(--ink); border-color: var(--teal); }
.ar-cats button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #00243A; }
html[data-theme="light"] .ar-cats button[aria-pressed="true"] { color: #fff; }
.ar-cats button:focus-visible, .ar-card:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ar-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ar-card { all: unset; box-sizing: border-box; cursor: pointer; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 12px 8px 12px; border-radius: 18px; text-align: center;
  border: 1px solid var(--line); background: var(--panel); transition: border-color .25s, background .25s, transform .25s var(--ease), box-shadow .25s; }
.ar-card[hidden] { display: none; }
.ar-card:hover { border-color: rgba(74, 213, 253, .5); transform: translateY(-2px); }
.ar-card[aria-pressed="true"] { border-color: var(--teal); background: rgba(74, 213, 253, .1); box-shadow: inset 0 0 0 1px var(--teal), 0 10px 26px rgba(0, 0, 0, .22); }
html[data-theme="light"] .ar-card[aria-pressed="true"] { background: rgba(0, 131, 155, .08); box-shadow: inset 0 0 0 1px var(--teal), 0 10px 22px rgba(0, 40, 60, .1); }
.ar-pic { display: block; position: relative; width: 100%; height: 76px; margin-bottom: 4px; overflow: hidden; }
.ar-pic img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .3)); }
.ar-card b { font-family: var(--display); font-weight: 800; font-size: 14.5px; line-height: 1.2; color: var(--ink); }
.ar-card small { font: 900 italic 12.5px/1.2 "Lato", sans-serif; color: var(--teal); }

/* the chosen robot's details */
.ar-info { display: grid; gap: 12px; align-content: start; }
.ar-info[hidden] { display: none; }
.ar-kind { justify-self: start; font-family: var(--display); font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--teal); padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(74, 213, 253, .4); background: rgba(74, 213, 253, .07); }
.ar-info h3 { font-family: "Lato", var(--display), sans-serif; font-weight: 900; font-style: italic; font-size: clamp(34px, 4vw, 52px); line-height: 1; color: var(--ink); margin: 2px 0 0; }
.ar-pitch { color: var(--soft); font-size: 16.5px; line-height: 1.75; margin: 0; }
.ar-lead { color: var(--dim); font-size: 14.5px; margin: 6px 0 -4px; }
.ar-more { justify-self: start; display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--teal); text-decoration: none; padding: 6px 0; }
.ar-more svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
html[dir="rtl"] .ar-more svg { transform: scaleX(-1); }
.ar-more:hover svg { transform: translateX(3px); }
html[dir="rtl"] .ar-more:hover svg { transform: scaleX(-1) translateX(3px); }
.ar-more:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
/* the numbered points belong to the G1 model only */
.ar-box[data-current]:not([data-current="g1"]) .ar-hs { display: none !important; }

@media (max-width: 900px) {
  .ar-g1 .ar-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pick" "stage" "info" "go"; grid-template-rows: none; }
  .ar-g1 .ar-stage { position: relative; top: 0; height: min(68svh, 600px); min-height: 420px; }
  .ar-g1 .ar-infos { border-top: 0; padding-top: 0; }
}

/* ---------- robots/g1.html: the hero button and the dialog ---------- */
.ar-open { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; justify-self: start; font-family: var(--display); font-weight: 700; font-size: 14.5px; color: var(--ink);
  background: rgba(74, 213, 253, .08); border: 1px solid rgba(74, 213, 253, .45); border-radius: 999px; padding: 8px 16px 8px 10px; cursor: pointer; transition: background .25s, border-color .25s; }
html[dir="rtl"] .ar-open { padding: 8px 10px 8px 16px; }
.ar-open:hover { background: rgba(74, 213, 253, .16); border-color: var(--teal); }
.ar-open .ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #00243A; }
.ar-open .ic svg { width: 16px; height: 16px; }
html[data-theme="light"] .ar-open { background: rgba(0, 131, 155, .07); border-color: rgba(0, 131, 155, .4); }
html[data-theme="light"] .ar-open .ic { color: #fff; }
dialog.ar-dialog { width: min(1080px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line-2); border-radius: 24px; background: var(--deep); color: var(--ink); overflow: auto; }
dialog.ar-dialog::backdrop { background: rgba(0, 10, 18, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.ar-dialog .ar-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.ar-dialog .ar-stage { border: 0; border-radius: 0; min-height: min(78dvh, 680px); }
.ar-dialog .ar-side { padding: 28px 28px 24px; display: grid; gap: 16px; align-content: start; }
.ar-dialog h2 { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.3; }
html[data-lang="en"] .ar-dialog h2 { line-height: 1.08; }
.ar-dialog .ar-points b { font-size: 15.5px; }
.ar-dialog .ar-points .d { font-size: 14.5px; }
.ar-dialog .ar-points button { padding: 11px 2px; }
.ar-close { position: absolute; z-index: 4; top: 12px; inset-inline-end: 12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(0, 19, 31, .6); color: #fff; border: 1px solid rgba(255, 255, 255, .2); }
.ar-close svg { width: 18px; height: 18px; }
@media (max-width: 820px) {
  .ar-dialog .ar-in { grid-template-columns: minmax(0, 1fr); }
  .ar-dialog .ar-reset { inset-inline-end: 62px; }
  .ar-dialog .ar-stage { min-height: 0; height: min(60dvh, 520px); }
  .ar-dialog .ar-side { padding: 20px 18px 22px; }
}
/* the model can be turned with the keyboard: show where the focus is (6 Nov 2026) */
/* the focus sits inside model-viewer's own shadow DOM, so the ring goes on its stage */
.ar-stage:has(> model-viewer.ar-mv:focus-within) { outline: 2px solid var(--teal); outline-offset: 3px; }

/* 7 Nov 2026: the size, the two forms of a robot, and the links to the other robots */
.ar-size { display: grid; gap: 4px; margin: 0; color: var(--soft); font-size: 14.5px; }
.ar-size b { font-family: "Lato", sans-serif; font-weight: 900; font-style: italic; font-size: 22px; color: var(--teal); justify-self: start; }
.ar-kinds, .ar-others p { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.ar-kinds button, .ar-others a { padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.ar-kinds button[aria-pressed="true"], .ar-kinds button:hover, .ar-others a:hover { background: var(--teal); border-color: var(--teal); color: #00243A; }
.ar-kinds button:focus-visible, .ar-others a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ar-others { display: grid; gap: 10px; margin-block: 14px; }
.ar-others b { font-size: 15px; }
