/* ==========================================================================
   Marand Studio
   Loaded only on /studio/. Design tokens deliberately mirror the rest of the
   site (blue #0c24c2, lime accent, Acrom + Roboto Flex) so the page reads as
   part of Marand rather than as a bolted-on tool.
   ========================================================================== */

.studio {
  /* Every value here is an existing site token rather than a Studio
     invention, so the tool inherits the design system instead of running a
     parallel one: ink #0b0b0b, secondary #776f6f, blue #0c24c2, lime accent,
     32px outer / 24px inner radii, 1376px module grid, --shadow-card. */
  --studio-ink: #0b0b0b;
  --studio-body: #020202;
  --studio-muted: #776f6f;
  --studio-line: var(--border, #e1e1e1);
  --studio-surface: var(--surface, #fcfcfc);
  --studio-raise: #f0f0f0;
  --studio-blue: var(--blue, #0c24c2);
  --studio-lime: var(--lime, #9dfd43);
  --studio-radius: 32px;
  --studio-radius-inner: 24px;
  --studio-shadow: 0 7px 14px rgba(0, 0, 0, 0.06);
  --studio-display: "Acrom", "Roboto Flex", sans-serif;
  --studio-gap: clamp(24px, 4vw, 56px);
  --studio-shell: min(calc(100% - 60px), var(--module-grid-width, 1376px));

  color: #333;
  font-family: "Roboto Flex", system-ui, sans-serif;
}

/* The section marker used on every other page: lime pill, Acrom 700. */
.studio-eyebrow,
.studio-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 35px;
  padding: 4px 16px;
  border-radius: 24px;
  background: var(--studio-lime);
  color: #000;
  font-family: var(--studio-display);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: lowercase;
}

.studio-shell {
  width: var(--studio-shell);
  margin: 0 auto;
}

/* ---------------------------------------------------------------- hero */

/* Inner pages open at 130px and stack chip / heading / copy left-aligned
   with a 32px rhythm — /echipamente/ and /materiale/ do exactly this. */
.studio-hero {
  padding: 130px 0 clamp(48px, 6vw, 80px);
}

.studio-hero .studio-shell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}

.studio-hero h1 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--studio-display);
  font-size: 68px;
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: -0.09em;
  color: var(--studio-ink);
}

.studio-hero-sub {
  margin: 0;
  max-width: 62ch;
  font-family: var(--studio-display);
  font-size: 20px;
  line-height: 26px;
  font-weight: 300;
  letter-spacing: -0.06em;
  color: var(--studio-body);
}

.studio-hero-actions {
  margin: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Studio defines no button of its own — the markup uses the shared
   .cta / .cta-primary / .cta-secondary / .cta-pill classes from
   marand-shell.css. Only the compact inline variant is local, for the
   "change image" control that sits inside a card row. */
.studio-cta-sm.cta {
  height: 48px;
  padding: 0 24px;
  font-size: 12px;
}

/* A reassurance paragraph, not a spec label — the site's uppercase 900 meta
   style is for two- or three-word specs and turns shouty at this length. */
.studio-privacy {
  margin: 0;
  max-width: 62ch;
  color: var(--studio-muted);
  font-family: "Roboto Mono", monospace;
  font-size: 13px;
  line-height: 22px;
}

/* ---------------------------------------------------------------- steps */

.studio-step {
  padding: clamp(40px, 5vw, 72px) 0;
  border-top: 1px solid var(--studio-line);
  transition: opacity 0.35s ease;
}

.studio-step[data-state="locked"] { opacity: 0.42; }
.studio-step[data-state="locked"] .studio-step-body { pointer-events: none; }

/* Same section header as .equip-section-header: column, 32px gap,
   left-aligned, chip on top. */
.studio-step-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  margin-bottom: 40px;
}

.studio-step-title {
  margin: 0;
  font-family: var(--studio-display);
  font-size: 37px;
  line-height: 45px;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: #1a1a1a;
}

.studio-step-note {
  margin: 0;
  max-width: 62ch;
  font-family: var(--studio-display);
  font-size: 20px;
  line-height: 26px;
  font-weight: 300;
  letter-spacing: -0.06em;
  color: var(--studio-body);
}

/* ------------------------------------------------------------ dropzone */

.studio-dropzone {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 260px;
  padding: 40px;
  border: 1.5px dashed #cfcfcf;
  border-radius: var(--studio-radius);
  background: var(--studio-raise);
  box-shadow: var(--studio-shadow);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.24s ease, background 0.24s ease;
}

.studio-dropzone:hover,
.studio-dropzone:focus-visible {
  border-color: var(--studio-blue);
  background: #fff;
}

.studio-dropzone.is-dragging {
  border-color: var(--studio-blue);
  border-style: solid;
  background: #fff;
}

.studio-dropzone.is-busy { opacity: 0.6; pointer-events: none; }

.studio-dropzone-icon {
  width: 46px;
  height: 46px;
  color: var(--studio-blue);
}

.studio-dropzone-title {
  font-family: var(--studio-display);
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--studio-ink);
}

.studio-dropzone-hint {
  color: var(--studio-muted);
  font-size: 13px;
  line-height: 27px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.studio-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Swap dropzone for the thumbnail card once an image is in. */
[data-studio-image-state][data-state="ready"] .studio-dropzone,
[data-studio-space-state][data-state="ready"] .studio-dropzone { display: none; }
[data-studio-image-state] .studio-loaded,
[data-studio-space-state] .studio-loaded { display: none; }
[data-studio-image-state][data-state="ready"] .studio-loaded,
[data-studio-space-state][data-state="ready"] .studio-loaded { display: flex; }

.studio-loaded {
  align-items: center;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--studio-line);
  border-radius: var(--studio-radius);
  background: var(--studio-surface);
  box-shadow: var(--studio-shadow);
  flex-wrap: wrap;
}

.studio-loaded-thumb {
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  border-radius: var(--studio-radius-inner);
  overflow: hidden;
  background: var(--studio-raise);
}

.studio-loaded-thumb img { width: 100%; height: 100%; object-fit: cover; }
.studio-loaded-text { flex: 1 1 200px; min-width: 0; }
.studio-loaded-name {
  font-family: var(--studio-display);
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--studio-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.studio-loaded-meta {
  color: var(--studio-muted);
  font-family: "Roboto Mono", monospace;
  font-size: 12px;
  margin-top: 4px;
}

.studio-error {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--studio-radius-inner);
  background: #fdecea;
  color: #a32116;
  font-size: 14px;
}

/* -------------------------------------------------------- product cards */

.studio-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 18px;
}

.studio-product-card,
.studio-scene-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--studio-line);
  border-radius: var(--studio-radius-inner);
  background: var(--studio-surface);
  box-shadow: var(--studio-shadow);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.studio-product-card:hover,
.studio-scene-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.07);
}

/* Selection reads in Marand blue, the site's one active colour. */
.studio-product-card.is-active,
.studio-scene-card.is-active {
  border-color: var(--studio-blue);
  box-shadow: 0 0 0 1px var(--studio-blue), 0 8px 24px rgba(12, 36, 194, 0.14);
}

.studio-product-name {
  font-family: var(--studio-display);
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--studio-ink);
}

.studio-product-blurb { color: var(--studio-muted); font-size: 13px; line-height: 1.45; }

/* Thumbnail host — the illustration itself lives in product-thumbs.js. */
.studio-product-visual {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  margin-bottom: 10px;
  border-radius: var(--studio-radius-inner);
  overflow: hidden;
  background: #eceae5;
}

.studio-product-visual svg,
.studio-product-photo {
  width: 100%;
  height: 100%;
  display: block;
}

/* Photographs are square or 4:3 into a 16:10 card, so the crop is steered
   per product from PHOTOS[].position rather than left to chance. */
.studio-product-photo { object-fit: cover; }

.studio-product-card:hover .studio-product-photo,
.studio-product-card.is-active .studio-product-photo {
  transform: scale(1.03);
}

.studio-product-photo { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }

/* ---------------------------------------------------------- scene cards */

.studio-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  margin-bottom: 26px;
  border-radius: 999px;
  background: var(--studio-raise);
}

/* Segmented control matching .materials-overview-option: Acrom 700,
   13px uppercase, blue when selected. */
.studio-tab {
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4b4b4b;
  font-family: var(--studio-display);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease;
}

.studio-tab.is-active { background: var(--studio-blue); color: #fff; }

.studio-scene-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: var(--studio-radius-inner);
  overflow: hidden;
  background: var(--studio-raise);
}

.studio-scene-thumb svg,
.studio-scene-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.studio-scene-name {
  margin-top: 10px;
  font-family: var(--studio-display);
  font-size: 20px;
  line-height: 26px;
  font-weight: 700;
  letter-spacing: -0.06em;
  color: var(--studio-ink);
}

/* -------------------------------------------------------------- editor */

.studio-editor { padding: clamp(40px, 5vw, 72px) 0 0; border-top: 1px solid var(--studio-line); }

.studio-editor-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--studio-gap);
  align-items: start;
}

.studio-sidebar {
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 110px;
}

.studio-control-group { display: flex; flex-direction: column; gap: 12px; }

.studio-control-label {
  font-size: 13px;
  line-height: 27px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--studio-muted);
}

.studio-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.studio-chip {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--studio-line);
  border-radius: 999px;
  background: var(--studio-surface);
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.studio-chip:hover { border-color: var(--studio-blue); }
.studio-chip.is-active { background: var(--studio-blue); border-color: var(--studio-blue); color: #fff; }

.studio-readout {
  font-family: "Roboto Mono", monospace;
  font-size: 13px;
  color: var(--studio-muted);
}

.studio-hint {
  color: var(--studio-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

/* ---------------------------------------------------------- the stage */

.studio-stage-wrap { position: relative; }

.studio-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--stage-ratio, 1.6);
  border-radius: var(--studio-radius);
  overflow: hidden;
  background: var(--studio-raise);
  touch-action: none;          /* pinch belongs to us, not to the page */
  cursor: grab;
  outline: none;
}

.studio-stage[data-interacting="true"] { cursor: grabbing; }
.studio-stage:focus-visible { box-shadow: 0 0 0 3px rgba(12, 36, 194, 0.35); }

.studio-scene-layer { position: absolute; inset: 0; }
.studio-scene-svg,
.studio-scene-photo { width: 100%; height: 100%; display: block; object-fit: cover; }

/* The composite is what Before/After clips. */
.studio-composite { position: absolute; inset: 0; }

/* The surface plane. Children live in wall units; the homography does the rest. */
.studio-wall {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.studio-art { position: absolute; }
.studio-art-body { position: relative; width: 100%; height: 100%; }
.studio-art-face { position: absolute; inset: 0; overflow: hidden; }

.studio-art-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.studio-art-image--cover { object-fit: cover; }

/* Shared contact shadow, driven by each product's declared physics. */
.studio-art-body {
  box-shadow: 0 var(--shadow-lift, 0px) var(--shadow-blur, 0px)
    var(--shadow-spread, 0px) rgba(0, 0, 0, var(--shadow-alpha, 0));
}

/* --- canvas: gallery wrap, visible thickness ------------------------- */

.studio-art--canvas .studio-art-face { z-index: 2; }

.studio-art--canvas .studio-art-edge {
  position: absolute;
  top: var(--edge);
  width: var(--edge);
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.studio-art--canvas[data-view-side="right"] .studio-art-edge { right: calc(-1 * var(--edge)); }
.studio-art--canvas[data-view-side="left"] .studio-art-edge { left: calc(-1 * var(--edge)); }

.studio-art-edge-image { width: 100%; height: 100%; object-fit: cover; }
.studio-art--canvas[data-view-side="right"] .studio-art-edge-image { object-position: 100% 50%; }
.studio-art--canvas[data-view-side="left"] .studio-art-edge-image { object-position: 0 50%; }

.studio-art-edge-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.16));
}

/* Woven texture — barely there, but it stops the print reading as flat glass. */
.studio-art-weave {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.5) 0 0.5px, transparent 0.5px 2px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0 0.5px, transparent 0.5px 2px);
}

.studio-art-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(122deg, rgba(255, 255, 255, 0.16), transparent 46%);
}

/* --- poster --------------------------------------------------------- */

.studio-art-paper {
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.2), transparent 40%);
}

/* --- framed poster -------------------------------------------------- */

.studio-art--framed .studio-art-frame {
  position: absolute;
  inset: 0;
  padding: calc(var(--edge) * 1.15);
  background: linear-gradient(120deg, #38322c, #221e1a 55%, #423a32);
  box-sizing: border-box;
}

.studio-art--framed .studio-art-frame-inner {
  position: absolute;
  inset: calc(var(--edge) * 1.15);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 2px 6px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.studio-art--framed .studio-art-mat {
  position: relative;
  width: 100%;
  height: 100%;
  padding: calc(var(--edge) * 0.9);
  background: #f6f4ef;
  box-sizing: border-box;
}

.studio-art--framed .studio-art-face { position: relative; inset: auto; width: 100%; height: 100%; }

.studio-art-glass {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    118deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.06) 30%,
    transparent 42%
  );
}

/* --- forex / PVC ---------------------------------------------------- */

.studio-art--forex .studio-art-face { z-index: 2; }

.studio-art--forex .studio-art-edge--cut {
  position: absolute;
  top: calc(var(--edge) * 0.6);
  width: var(--edge);
  height: 100%;
  background: linear-gradient(90deg, #efefec, #cfcfca);
  z-index: 1;
}

.studio-art--forex[data-view-side="right"] .studio-art-edge--cut { right: calc(-1 * var(--edge)); }
.studio-art--forex[data-view-side="left"] .studio-art-edge--cut { left: calc(-1 * var(--edge)); }

.studio-art-matte {
  position: absolute;
  inset: 0;
  background: rgba(244, 244, 240, 0.14);
}

/* --- wallpaper ------------------------------------------------------ */

.studio-art--wallpaper .studio-art-face { overflow: hidden; }

.studio-art-seams {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.07) 0 1px,
    transparent 1px 180px
  );
}

/* Sits under the room light rather than over it — the wallpaper IS the wall. */
.studio-art-ambient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.34),
    rgba(255, 255, 255, 0.04) 46%,
    rgba(0, 0, 0, 0.14)
  );
}

/* --- banner --------------------------------------------------------- */

.studio-art--banner .studio-art-face {
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* Slack in the material: a hanging banner is never perfectly flat. */
.studio-art-slack {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.14) 0%,
    transparent 12%,
    transparent 84%,
    rgba(0, 0, 0, 0.12) 100%
  );
}

.studio-art-grommets { position: absolute; inset: 0; pointer-events: none; }

.studio-art-grommet {
  position: absolute;
  width: calc(var(--edge) * 3);
  height: calc(var(--edge) * 3);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f2f2f2, #8f8f8f 62%, #5d5d5d);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.studio-art-grommet:nth-child(1) { top: calc(var(--edge) * 1.4); left: calc(var(--edge) * 1.4); }
.studio-art-grommet:nth-child(2) { top: calc(var(--edge) * 1.4); right: calc(var(--edge) * 1.4); }
.studio-art-grommet:nth-child(3) { bottom: calc(var(--edge) * 1.4); right: calc(var(--edge) * 1.4); }
.studio-art-grommet:nth-child(4) { bottom: calc(var(--edge) * 1.4); left: calc(var(--edge) * 1.4); }

/* ------------------------------------------------------------- handles */

.studio-handles { position: absolute; inset: 0; pointer-events: none; }
.studio-handles > * { pointer-events: auto; }

.studio-frame-outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.studio-frame-outline polygon {
  fill: none;
  stroke: #fff;
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
  opacity: 0.85;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.55));
}

.studio-handle {
  position: absolute;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--studio-blue);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.16s ease;
}

/* Author `display` beats the UA [hidden] rule, so state it explicitly or the
   hidden attribute set from JS does nothing at all. */
.studio-handle[hidden],
.studio-frame-outline[hidden] { display: none; }

.studio-handle:hover { transform: scale(1.14); }
.studio-handle--rotate svg { width: 15px; height: 15px; }
.studio-handle--quad { background: var(--studio-lime); border-color: #14140f; }

/* Fingers need a bigger target than a cursor does. */
@media (pointer: coarse) {
  .studio-handle { width: 34px; height: 34px; margin: -17px 0 0 -17px; }

  /* On touch, finger-sized corner and rotate handles swallow a small print
     whole. Pinch already does both scale and rotate here, so drop them and
     keep the dashed outline as the only selection cue. The wall-corner
     handles stay: they sit on the room, not on the artwork. */
  .studio-handle--corner,
  .studio-handle--rotate { display: none; }
}

/* Hide the furniture while comparing — it would sit on top of the "original". */
.studio-stage[data-ba-state="original"] .studio-handles,
.studio-stage[data-ba-state="split"] .studio-handles { opacity: 0; pointer-events: none; }

/* -------------------------------------------------------- before/after */

.studio-ba-track {
  position: absolute;
  inset: 0;
  cursor: ew-resize;
  z-index: 5;
}

/* Only the divider itself takes the pointer, so dragging the print still works. */
.studio-ba-track { pointer-events: none; }
.studio-ba-handle { pointer-events: auto; }

.studio-ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  margin-left: -20px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: ew-resize;
}

.studio-ba-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.studio-ba-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316161a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-4 6 4 6M15 6l4 6-4 6'/%3E%3C/svg%3E") center / 20px no-repeat;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.studio-stage[data-ba-state="preview"] .studio-ba-handle { opacity: 0; }
.studio-stage:hover .studio-ba-handle { opacity: 1; }

.studio-ba-labels {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.62);
  backdrop-filter: blur(8px);
  z-index: 6;
}

.studio-ba-labels button {
  min-height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--studio-display);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

.studio-ba-labels button.is-active { background: #fff; color: var(--studio-ink); }

/* ----------------------------------------------------------------- CTA */

/* The site's closing banner, .tpl-cta-banner, reproduced exactly. */
.studio-cta {
  margin: clamp(64px, 8vw, 120px) 0 0;
  padding: 64px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  border-radius: var(--studio-radius);
  background: #000;
  box-shadow: var(--studio-shadow);
  text-align: center;
  color: #fff;
}

.studio-cta h2 {
  margin: 0;
  max-width: 904px;
  font-family: var(--studio-display);
  font-size: 52px;
  line-height: 55px;
  font-weight: 700;
  letter-spacing: -0.09em;
  color: #fff;
}

.studio-cta p {
  margin: 0;
  max-width: 904px;
  font-family: var(--studio-display);
  font-size: 20px;
  line-height: 26px;
  font-weight: 300;
  letter-spacing: -0.06em;
  color: #fff;
}

.studio-cta .cta { min-width: 215px; }

/* ------------------------------------------------------------- mobile */

.studio-sheet-toggle { display: none; }

@media (max-width: 1024px) {
  .studio-editor-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-sidebar { position: static; top: auto; }
}

@media (max-width: 1024px) {
  .studio-hero h1 { font-size: 52px; line-height: 55px; }
  .studio-step-title { font-size: 30px; line-height: 36px; }
  .studio-cta h2 { font-size: 40px; line-height: 44px; }
}

@media (max-width: 720px) {
  .studio { --studio-shell: calc(100% - 32px); }
  .studio-hero h1 { font-size: 40px; line-height: 42px; }
  .studio-cta { padding: 48px 24px; }
  .studio-cta h2 { font-size: 32px; line-height: 36px; }
  .studio-stage { border-radius: 20px; }

  /* Preview first, controls in a bottom sheet — never both competing. */
  .studio-editor-grid { display: block; }

  .studio-sheet-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    margin-top: 16px;
    border: 1px solid var(--studio-line);
    border-radius: 999px;
    background: var(--studio-surface);
    font-family: var(--studio-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
  }

  .studio-sidebar {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.34s ease;
  }

  .studio-sidebar.is-open {
    max-height: 720px;
    margin-top: 20px;
    padding-top: 4px;
  }

  .studio-sidebar > * + * { margin-top: 24px; }
  .studio-hero { padding-top: 104px; }
  .studio-ba-handle { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .studio-product-card,
  .studio-scene-card,
  .studio-handle,
  .studio-sidebar { transition: none; }
  .studio-product-card:hover,
  .studio-scene-card:hover { transform: none; }
}
