/* MAX Mold Pro - a vitrine do MAX Vasos Studio e do MAX Velas Studio na home (02/11/2026).
   Mora fora do style.css: só as 10 páginas iniciais carregam (o poe_studio.py põe a linha).
   O palco (o torno no canvas) é do js/studio.js; a galeria das 94 peças é só CSS. */

#studio { position: relative; overflow: hidden;
  background: radial-gradient(90% 55% at 50% 0%, #20140f 0%, transparent 70%), var(--bg); }
#studio::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--bg2) 0, transparent 120px); }
#studio .wrap { position: relative; }
.st-head { text-align: center; }
.st-head h2 { margin-top: 14px; }
.st-head p { max-width: 62ch; margin: 16px auto 0; }

/* o palco: o torno de um lado, os controles do outro */
.st-palco { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; margin-top: 44px; }
.st-tela { position: relative; min-height: 540px; border: 1px solid #2c2522; border-radius: 20px; overflow: hidden;
  background: radial-gradient(52% 50% at 50% 40%, #ff83563d 0%, #ff835612 42%, transparent 72%),
              linear-gradient(180deg, #16120f 0%, #0c0c0e 78%); }
.st-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.st-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.st-hud { position: absolute; left: 18px; top: 16px; display: flex; flex-direction: column; gap: 4px;
  font: 650 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
.st-nome { color: var(--text); }
.st-med { color: var(--muted2); font-variant-numeric: tabular-nums; }
.st-molde { position: absolute; right: 16px; top: 16px; font: 700 10.5px/1 var(--mono); letter-spacing: .12em;
  text-transform: uppercase; color: var(--silicone2); border: 1px solid #5eead44d; background: #0c1715cc;
  padding: 7px 10px; border-radius: 99px; opacity: 0; transform: translateY(-6px); transition: opacity .35s, transform .35s; }
.st-molde.on { opacity: 1; transform: none; }
.st-fases { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 8px;
  list-style: none; margin: 0; padding: 0 12px; pointer-events: none; }
.st-fases li { font: 650 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted2);
  border: 1px solid #ffffff17; background: #0d0d0fd9; padding: 7px 11px; border-radius: 99px;
  transition: color .3s, background .3s, border-color .3s, transform .3s; }
.st-fases li.on { color: #21150e; background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.st-lado { display: flex; flex-direction: column; gap: 18px; padding: 22px; border: 1px solid var(--border);
  border-radius: 20px; background: var(--card); }
.st-abas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 14px;
  background: #0f0f12; border: 1px solid var(--border); }
.st-abas button { appearance: none; border: 0; background: transparent; color: var(--muted); border-radius: 10px;
  padding: 9px 10px; display: flex; align-items: baseline; justify-content: center; gap: 8px; cursor: pointer;
  font: 600 14px var(--sans); transition: background .25s, color .25s, box-shadow .25s; }
.st-abas button b { font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums;
  min-width: 1.4em; text-align: right; transition: color .25s; }
.st-abas button:hover { color: var(--text); }
.st-abas button[aria-selected="true"] { background: #211c1a; color: var(--text); box-shadow: inset 0 0 0 1px #ff835666; }
.st-abas button[aria-selected="true"] b { color: var(--accent); }
.st-abas button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* os quatro controles do Studio (mexer de verdade muda a peça) */
.st-ctrl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.st-ctrl label { display: grid; grid-template-columns: 1fr auto; gap: 7px 8px; align-items: center;
  font-size: 13px; color: var(--muted); }
.st-ctrl output { font: 650 12px var(--mono); color: var(--text); font-variant-numeric: tabular-nums; }
.st-ctrl input { grid-column: 1 / -1; width: 100%; margin: 0; height: 18px; background: transparent;
  -webkit-appearance: none; appearance: none; cursor: pointer; }
.st-ctrl input::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: #2b2b31; }
.st-ctrl input::-moz-range-track { height: 4px; border-radius: 4px; background: #2b2b31; }
.st-ctrl input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px;
  border-radius: 50%; background: var(--accent); border: 3px solid #1a1311; box-shadow: 0 0 0 1px var(--accent); }
.st-ctrl input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
  border: 3px solid #1a1311; box-shadow: 0 0 0 1px var(--accent); }
.st-ctrl input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.st-painel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.st-painel li { display: flex; gap: 10px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.st-painel li b { color: var(--text); font-weight: 650; }
.st-painel svg.ck { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }
.st-mini { margin-top: 18px; display: grid; gap: 8px; }
.st-mini > span { font: 650 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted2); }
.st-mini > div { display: flex; gap: 8px; flex-wrap: wrap; }
.st-mini i { display: block; width: 54px; height: 54px; border-radius: 9px; background-repeat: no-repeat;
  transition: transform .25s; }
.st-painel-vaso .st-mini i { background-image: url(/images/studio/vasos.webp); }
.st-painel-vela .st-mini i { background-image: url(/images/studio/velas.webp); }
.st-painel:not([hidden]) .st-mini i { animation: st-sobe .45s ease both; }
.st-mini i:nth-child(2) { animation-delay: .05s; } .st-mini i:nth-child(3) { animation-delay: .1s; }
.st-mini i:nth-child(4) { animation-delay: .15s; } .st-mini i:nth-child(5) { animation-delay: .2s; }
.st-mini i:nth-child(6) { animation-delay: .25s; }
.st-mini i:hover { transform: translateY(-3px); }
@keyframes st-sobe { from { opacity: 0; transform: translateY(8px); } }
.st-cta { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.st-nota { font-size: 12.5px; color: var(--muted2); }

/* a galeria: as 94 peças do Studio passando, vasos pra um lado e velas pro outro */
.st-galeria { margin-top: 34px; display: grid; gap: 12px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.st-fila { height: 118px; overflow: hidden; }
.st-trilho { display: flex; height: 100%; width: max-content; animation: st-anda var(--dur, 160s) linear infinite; }
.st-fila-velas .st-trilho { animation-direction: reverse; }
.st-trilho i { display: block; height: 100%; aspect-ratio: var(--ar); background-size: 100% 100%; background-repeat: no-repeat; }
.st-fila-vasos i { background-image: url(/images/studio/vasos.webp); }
.st-fila-velas i { background-image: url(/images/studio/velas.webp); }
.st-fila:hover .st-trilho { animation-play-state: paused; }
@keyframes st-anda { to { transform: translateX(-50%); } }
.st-legenda { margin: 14px 0 0; text-align: center; font: 650 10.5px var(--mono); letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted2); }

@media (max-width: 900px) {
  .st-palco { grid-template-columns: 1fr; margin-top: 32px; }
  .st-tela { min-height: 0; aspect-ratio: 4 / 5; }
  .st-fila { height: 90px; }
}
@media (max-width: 440px) {
  .st-mini i:nth-child(6) { display: none; }
}
@media (max-width: 420px) {
  .st-lado { padding: 16px; }
  .st-ctrl { gap: 12px 14px; }
  .st-fases li { padding: 6px 8px; font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-trilho, .st-painel:not([hidden]) .st-mini i { animation: none; }
  .st-fases li, .st-molde { transition: none; }
}
