/* =========================================================
   ROLLON 100 — upgrade layer
   ---------------------------------------------------------
   Loaded after style.css. Uses the same brand tokens
   (Rollon Blue, Manrope + Inter) and only adds the new parts:
   the 3D chair, the scroll-to-fold scene, section nav,
   boot checker, phone action bar and a few refinements.
   ========================================================= */

/* ---------- Refinements to existing pieces ---------- */
p, li { text-wrap: pretty; }
section[id], .feature[id] { scroll-margin-top: 150px; }
.feature-media img { transition: transform 1.2s var(--ease); }
@media (hover: hover) { .feature-media:not(.contain):hover img { transform: scale(1.04); } }
.mini-stats { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 520px) { .mini-stats { grid-template-columns: repeat(2, 1fr); } }
.nav { gap: 30px; }
@media (max-width: 1080px) and (min-width: 861px) { .nav { gap: 20px; } .nav a:not(.btn) { letter-spacing: .08em; } }

/* ---------- Home hero: the chair you can turn and fold ---------- */
.hero.hero--stage { overflow: visible; padding-top: clamp(20px, 3vw, 40px); }
/* the soft blue glow sits behind the chair inside the viewer, so the photo's white blends into it */
.hero.hero--stage::before { display: none; }
.hero--stage .hero-grid { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(20px, 3vw, 48px); align-items: center; }
.scene-copy { min-width: 0; }
.fold-story { margin-top: 40px; }
.fold-story h2 { margin-bottom: 22px; }
.fold-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-width: 520px; }
.fold-steps button {
  width: 100%; display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; text-align: left;
  background: none; border: 0; border-left: 2px solid var(--grey); padding: 12px 14px 12px 18px; cursor: pointer;
  font: inherit; color: var(--ink-soft); transition: border-color .3s var(--ease), background .3s var(--ease);
}
.fold-steps .n {
  display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center;
  font: 800 .85rem var(--font-head); color: var(--blue); background: var(--blue-soft); transition: background .3s, color .3s;
}
.fold-steps b { display: block; font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; color: var(--ink); line-height: 1.3; }
.fold-steps small { display: block; font-size: .93rem; line-height: 1.5; margin-top: 2px; }
.fold-steps button:hover { background: var(--silver); }
.fold-steps .is-on { border-left-color: var(--blue); background: var(--blue-soft); }
.fold-steps .is-on .n, .fold-steps .is-done .n { background: var(--blue); color: var(--white); }
.fold-steps .is-done { border-left-color: var(--blue); }
.fold-result { margin: 18px 0 0; font-size: .98rem; max-width: 520px; }
.fold-result b { font-family: var(--font-head); color: var(--blue); font-size: 1.1rem; }

.stage { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stage-chips { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.view-chips { display: flex; flex-wrap: nowrap; gap: 5px; justify-content: flex-end; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.view-chips::-webkit-scrollbar { display: none; }
.mode { flex: none; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--silver); border: 1px solid var(--grey); }
.mode-btn { font: 700 .78rem var(--font-head); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; border: 0; background: none; color: var(--ink-soft); padding: 8px 18px; border-radius: 999px; transition: all .25s var(--ease); }
.mode-btn[aria-pressed="true"] { background: var(--white); color: var(--blue); box-shadow: 0 1px 2px rgba(16,27,43,.08), 0 4px 12px rgba(16,27,43,.08); }
.stage[data-mode="photo"] .view-chips { display: none; }
.stage[data-mode="3d"] .mode-hint { display: none; }
.mode-hint { font: 700 .7rem var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); text-align: right; }
.stage-chips { min-height: 46px; min-width: 0; }
.stage[data-mode="photo"] .viewer { cursor: pointer; }
.stage[data-mode="photo"] #gl, .stage[data-mode="photo"] .layer, .stage[data-mode="photo"] .pin-card { opacity: 0; pointer-events: none; visibility: hidden; }
.stage[data-mode="3d"] #film, .stage[data-mode="3d"] .poster { opacity: 0; }
.viewer #film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; }
.stage[data-mode="photo"].film-ready #film { opacity: 1; }
.stage.film-ready .poster { opacity: 0; }
.stage-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 700 .72rem var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); background: rgba(255,255,255,.9); padding: 8px 14px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.stage.loading-3d .stage-loading { opacity: 1; }
.stage[data-mode="photo"] .hint-3d { display: none; }
.view-chip {
  font: 700 .7rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  flex: none; padding: 8px 11px; border-radius: 999px; border: 1px solid var(--grey); background: var(--white); color: var(--ink-soft);
  transition: all .25s var(--ease);
}
.view-chip:hover { border-color: var(--blue); color: var(--blue); }
.view-chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--white); }
.view-chip.sep { margin-left: 6px; }
.viewer { position: relative; height: clamp(380px, 56vh, 620px); touch-action: pan-y; cursor: grab; outline: none; border-radius: var(--radius); background: radial-gradient(closest-side at 50% 52%, var(--blue-soft), rgba(232,238,246,0) 92%); }
.viewer:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.viewer.dragging { cursor: grabbing; }
.viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.viewer .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; max-width: none; transition: opacity .3s var(--ease); pointer-events: none; }
.viewer .layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.viewer .hero-badge { pointer-events: none; transition: opacity .3s var(--ease); z-index: 2; }
.viewer .hero-badge.b1 { top: 6%; left: 0; }
.viewer .hero-badge.b2 { top: 40%; left: 0; bottom: auto; right: auto; }
.stage.folding .hero-badge, .stage.focused .hero-badge, .stage.measuring .hero-badge { opacity: 0; }
.stage-hint { position: absolute; left: 4px; bottom: 6px; font: 700 .68rem var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); transition: opacity .4s; pointer-events: none; }
.stage.touched .stage-hint { opacity: 0; }

.pin {
  position: absolute; left: 0; top: 0; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; border: 0; padding: 0;
  cursor: pointer; pointer-events: auto; background: rgba(255,255,255,.92); color: var(--blue); font: 800 .72rem var(--font-head);
  box-shadow: 0 0 0 1px rgba(16,27,43,.14), 0 4px 14px rgba(16,27,43,.16);
  transition: opacity .3s var(--ease), background .2s, color .2s, box-shadow .2s; will-change: transform;
}
.pin:hover, .pin[aria-pressed="true"] { background: var(--blue); color: var(--white); box-shadow: 0 0 0 6px rgba(21,79,144,.16); }
.stage.folding .pin, .stage.measuring .pin { opacity: 0; pointer-events: none; }
.dim { position: absolute; left: 0; top: 0; white-space: nowrap; font: 600 .78rem var(--font-head); color: var(--blue); background: rgba(255,255,255,.9); padding: 3px 9px; border-radius: 999px; box-shadow: 0 0 0 1px var(--blue-soft); will-change: transform, opacity; }
.dim b { font-weight: 800; font-size: .9rem; }

.pin-card {
  position: absolute; z-index: 4; left: 0; top: 54px; width: min(310px, 100%); background: var(--white); border: 1px solid var(--grey);
  border-radius: var(--radius); padding: 20px 22px 22px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.pin-card.on { opacity: 1; transform: none; pointer-events: auto; }
.pin-card .num { font: 800 .78rem var(--font-head); letter-spacing: .16em; color: var(--blue); }
.pin-card h3 { margin: 8px 0 8px; font-size: 1.2rem; }
.pin-card p { margin: 0; font-size: .95rem; }
.pin-card button { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: none; cursor: pointer; font-size: 20px; line-height: 1; color: var(--ink-mute); }
.pin-card button:hover { background: var(--silver); color: var(--ink); }

/* fold dock: the track is a 0–5 second ruler */
.dock {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  background: var(--white); border: 1px solid var(--grey); border-radius: 999px; padding: 8px 26px 8px 8px; box-shadow: var(--shadow);
}
.foldbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 124px; border: 0; cursor: pointer;
  font: 700 .98rem var(--font-head); padding: 15px 24px; border-radius: 999px; background: var(--blue); color: var(--white);
  transition: all .25s var(--ease);
}
.foldbtn:hover { background: var(--blue-dark); box-shadow: 0 10px 24px rgba(21,79,144,.28); }
.foldbtn .ico { width: 0; height: 0; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.foldbtn.playing .ico { width: 9px; height: 12px; border: 0; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.foldbtn.rev .ico { transform: scaleX(-1); }
.scrub input { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; margin: 0; background: transparent; cursor: ew-resize; display: block; }
.scrub input::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--blue) calc(var(--p, 0) * 100%), var(--grey) 0); }
.scrub input::-moz-range-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--blue) calc(var(--p, 0) * 100%), var(--grey) 0); }
.scrub input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9.5px; border-radius: 50%; background: var(--white); border: 0; box-shadow: 0 0 0 2px var(--blue), 0 3px 10px rgba(16,27,43,.2); }
.scrub input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--white); border: 0; box-shadow: 0 0 0 2px var(--blue), 0 3px 10px rgba(16,27,43,.2); }
.scrub .ticks { display: flex; justify-content: space-between; padding: 0 11px; font: 600 .68rem var(--font-head); color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.scrub .ticks span { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.fold-state { min-width: 150px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.fold-state b { font: 800 1.05rem var(--font-head); color: var(--ink); display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.fold-state b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--grey); transition: background .3s; }
.fold-state.live b::before { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.fold-state.done b::before { background: var(--blue); }
.fold-state small { font: 700 .66rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }

/* the pinned scene: on wide screens, scrolling folds the chair */
@media (min-width: 961px) and (min-height: 660px) and (prefers-reduced-motion: no-preference) {
  .hero.hero--stage { padding-top: 0; }
  .scene.pinned { --pin: 1; height: 250vh; }
  .scene.pinned .scene-pin { position: sticky; top: 84px; height: calc(100vh - 84px); display: flex; align-items: center; }
  .scene.pinned .scene-pin > .container { width: 100%; }
  .scene.pinned .viewer { height: min(620px, calc(100vh - 84px - 190px)); }
  .scene.pinned .scene-copy { display: grid; align-items: center; }
  .scene.pinned .hero-intro, .scene.pinned .fold-story { grid-area: 1 / 1; margin: 0; transition: opacity .45s var(--ease), transform .45s var(--ease); }
  .scene.pinned .fold-story { opacity: 0; transform: translateY(18px); pointer-events: none; }
  .scene.pinned.story .fold-story { opacity: 1; transform: none; pointer-events: auto; }
  .scene.pinned.story .hero-intro { opacity: 0; transform: translateY(-18px); pointer-events: none; }
  .scene.pinned .scroll-cue { display: inline-flex; }
}
.scroll-cue { display: none; margin-top: 30px; align-items: center; gap: 10px; font: 700 .72rem var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); transition: opacity .4s; }
.scroll-cue::before { content: ""; width: 1px; height: 26px; background: linear-gradient(var(--blue), transparent); animation: cue 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 960px) {
  .hero--stage .hero-grid { grid-template-columns: 1fr; }
  .scene-copy { display: contents; }
  .hero-intro { order: 1; } .stage { order: 2; } .fold-story { order: 3; margin-top: 8px; }
  .view-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .view-chips::-webkit-scrollbar { display: none; }
  .view-chip { flex: none; }
  .viewer { height: min(52vh, 440px); min-height: 340px; }
  .pin { width: 24px; height: 24px; margin: -12px 0 0 -12px; font-size: .66rem; }
  .pin-card { top: auto; bottom: 96px; left: 0; right: 0; width: auto; padding: 14px 16px 16px; }
  .pin-card h3 { font-size: 1.05rem; margin: 6px 0; } .pin-card p { font-size: .9rem; line-height: 1.45; }
  .dock { grid-template-columns: auto 1fr; border-radius: 26px; padding: 10px 18px 10px 10px; gap: 6px 14px; }
  .fold-state { grid-column: 1 / -1; order: -1; flex-direction: row; justify-content: space-between; align-items: center; min-width: 0; padding: 2px 6px 0; }
  .foldbtn { min-width: 108px; padding: 13px 18px; }
  .stage-hint { display: none; }
  .viewer .hero-badge { display: none; }
}

/* ---------- Section nav on the Features page ---------- */
.subnav { position: sticky; top: 84px; z-index: 40; background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--grey); }
.subnav .container { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 10px; padding-bottom: 10px; }
.subnav .container::-webkit-scrollbar { display: none; }
.subnav a { flex: none; padding: 8px 14px; border-radius: 999px; font: 700 .74rem var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); transition: all .25s var(--ease); }
.subnav a:hover { color: var(--blue); background: var(--blue-soft); }
.subnav a.on { background: var(--blue); color: var(--white); }
@media (max-width: 860px) { .subnav { top: 68px; } }

/* ---------- Boot checker ---------- */
.fit { margin-top: 24px; background: var(--white); border-radius: var(--radius); padding: clamp(24px, 3.4vw, 40px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.fit h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 800; margin-bottom: 8px; }
.fit p { margin: 0; }
.fit-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fit-form label { display: grid; gap: 6px; font: 700 .72rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.fit-form input { width: 100%; font: 700 1.15rem var(--font-head); color: var(--ink); padding: 12px 14px; border: 1.5px solid var(--grey); border-radius: var(--radius-sm); background: var(--white); font-variant-numeric: tabular-nums; }
.fit-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.fit-out { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--blue-soft); color: var(--ink); font-size: .97rem; line-height: 1.5; }
.fit-out::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--blue); }
.fit-out.no { background: var(--silver); } .fit-out.no::before { background: var(--ink-mute); }
.fit-out b { font-family: var(--font-head); }
.fit-note { grid-column: 1 / -1; font-size: .82rem; color: var(--ink-mute); }
.spec-group .fit { margin-top: 28px; grid-template-columns: 1fr; padding: 24px; gap: 18px; }
@media (max-width: 760px) { .fit { grid-template-columns: 1fr; } }

/* ---------- Home: short answers before the order cards ---------- */
.faq-more { text-align: center; margin-top: 32px; }

/* ---------- Contact form: copy fallback ---------- */
.form-copy { display: none; margin-top: 16px; }
.form-copy.show { display: grid; gap: 10px; }
.form-copy textarea { width: 100%; min-height: 150px; font: 400 .9rem/1.5 var(--font-body); color: var(--ink); padding: 14px 16px; border: 1.5px solid var(--grey); border-radius: var(--radius-sm); background: var(--silver); resize: vertical; }
.form-copy .btn { justify-self: start; }

/* ---------- Phone action bar ---------- */
.action-bar { display: none; }
@media (max-width: 860px) {
  .action-bar {
    display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.94);
    backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-top: 1px solid var(--grey);
    transform: translateY(110%); transition: transform .35s var(--ease);
  }
  .action-bar.show { transform: none; }
  .action-bar .btn { padding: 13px 14px; font-size: .92rem; }
  body { padding-bottom: 0; }
  .footer { padding-bottom: 84px; }
}

/* ---------- Single-file preview: one view at a time ---------- */
[data-page][hidden] { display: none !important; }
