/* Hardside v3: máquina de arcada. Posições em % da arte, medidas na imagem (ferramentas/medir.py e medir_pe.py). */
@font-face { font-family: "Bricolage Grotesque"; src: url(bricolage-grotesque.woff2) format("woff2"); font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url(schibsted-grotesk-var-latin.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  --fundo: #151515;
  --painel: #272727;
  --branco: #f5f4f1;
  --texto: #d2d1ce;
  --suave: #a3a2a0;
  --linha: #2c2c2f;
  --laranja: #ff5a1f;
  --laranja-luz: #ff9a54;
  --tinta: #0b0b0c;
  --expo: cubic-bezier(.16, 1, .3, 1);
  --camara: cubic-bezier(.7, 0, .2, 1);
  --titulos: "Bricolage Grotesque", "Schibsted Grotesk", sans-serif;
  --corpo: "Schibsted Grotesk", sans-serif;
  /* caixas medidas, em % da arte deitada (2752 x 1536) */
  --ex: 49.8; --ey: 29.9; --ew: 33.9; --eh: 44.6;        /* vidro do ecrã */
  --by: 82.5; --bw: 7.63; --bh: 4.9;                     /* botões (com o aro) */
  --pw: 10.43; --ph: 6.77;                               /* placas */
  --lx: 11.265; --ly: 3.451; --lw: 77.616; --lh: 13.802; /* letreiro */
  --cw: 3.1cqw;                                          /* cubo */
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--fundo); scrollbar-color: #3b3b3e var(--fundo); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fundo); color: var(--texto); font: 400 16px/1.5 var(--corpo); overflow-x: hidden; }
::selection { background: var(--laranja); color: var(--tinta); }
:focus-visible { outline: 2px solid var(--laranja); outline-offset: 3px; }
a { color: inherit; text-underline-offset: .2em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video { display: block; max-width: 100%; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
.saltar { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--branco); color: var(--tinta); padding: 10px 14px; font-weight: 600; }
.saltar:focus { top: 12px; }

/* ---------- palco e máquina ---------- */
.palco { position: relative; overflow: hidden; }
.maquina {
  position: relative; margin: 0 auto;
  width: min(100vw, calc(100svh * 2752 / 1536));
  aspect-ratio: 2752 / 1536;
  container-type: inline-size;
  transform-origin: 0 0;
  will-change: transform; /* a câmara do zoom arranca sem soluço */
}
.maquina picture { display: contents; }
.maquina__arte { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; pointer-events: none; }
.luz {
  position: absolute; left: 0; top: 0; width: 46cqw; height: 46cqw; margin: -23cqw 0 0 -23cqw; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(255, 232, 205, .13), rgba(255, 232, 205, 0) 100%);
  mix-blend-mode: screen; will-change: transform; transition: opacity .6s;
}
.maquina:hover .luz { opacity: 1; }
.sob { display: none; }

/* ---------- letreiro e navegação ---------- */
.letreiro { position: absolute; left: calc(var(--lx) * 1%); top: calc(var(--ly) * 1%); width: calc(var(--lw) * 1%); height: calc(var(--lh) * 1%); display: grid; place-items: center; }
.marca { position: relative; z-index: 1; display: block; width: 28.5%; }
.marca img { width: 100%; height: auto; }
.letreiro__brilho { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.letreiro__brilho::before {
  content: ""; position: absolute; inset: -20% 0; width: 34%; transform: translateX(-130%) skewX(-18deg); opacity: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .5) 50%, rgba(255, 255, 255, 0));
}
.letreiro__brilho.e-passa::before { animation: passa 1.1s cubic-bezier(.45, 0, .2, 1); }
@keyframes passa { 0% { transform: translateX(-130%) skewX(-18deg); opacity: 0; } 18% { opacity: 1; } 82% { opacity: 1; } 100% { transform: translateX(330%) skewX(-18deg); opacity: 0; } }
.nav {
  position: absolute; right: 11.4%; top: 0; display: flex; align-items: center; gap: 1.5cqw;
  padding: .95cqw 1.5cqw 1cqw; background: var(--tinta);
  font: 500 clamp(11px, .98cqw, 17px)/1 var(--corpo); color: var(--branco);
}
.nav a { text-decoration: none; padding: .35cqw 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--expo), color .2s; }
.nav a:hover, .nav a:focus-visible { background-size: 100% 1px; }
.nav__lingua { color: var(--suave); }
.nav__lingua a[aria-current] { color: var(--laranja-luz); }

/* ---------- título ---------- */
.titulo { position: absolute; left: 17.4%; top: 33.2%; width: 30.5%; }
.titulo h1 {
  margin: 0; color: var(--branco);
  font: 700 clamp(26px, 4.25cqw, 6rem)/.98 var(--titulos); letter-spacing: -.032em; font-stretch: 96%;
}
.titulo .linha { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.titulo .linha > span { display: block; }
.titulo p { margin: 1.7cqw 0 0; max-width: 25cqw; font-size: clamp(12px, 1.3cqw, 21px); line-height: 1.45; color: var(--texto); text-wrap: pretty; }
.mensagem {
  display: inline-block; margin-top: 1.7cqw; padding: .85cqw 1.45cqw .9cqw; background: var(--branco); color: var(--tinta);
  font: 600 clamp(11px, 1.02cqw, 17px)/1 var(--corpo); text-decoration: none; white-space: nowrap;
  transition: background .25s, transform .35s var(--expo);
}
.mensagem:hover, .mensagem:focus-visible { background: var(--laranja-luz); transform: translateY(-.12cqw); }

/* ---------- ecrã (as medidas de dentro são em % da largura do próprio ecrã) ---------- */
.cab { position: absolute; left: calc(var(--ex) * 1%); top: calc(var(--ey) * 1%); width: calc(var(--ew) * 1%); height: calc(var(--eh) * 1%); }
.ecra { position: absolute; inset: 0; border-radius: 7.6% / 10.4%; overflow: hidden; background: #060607; isolation: isolate; container-type: inline-size; }
.slides { position: absolute; inset: 0; transform-origin: 50% 50%; }
.slide { position: absolute; inset: 0; overflow: hidden; background: #08080a; visibility: hidden; }
.slide.e-ativa, .slide.e-sai { visibility: visible; }
.slide[hidden] { display: none; }
.slide--site img { width: 100%; height: auto; will-change: transform; }
.slide--intro { background: #000; display: grid; place-items: center; }
.slide--intro video { width: 100%; height: auto; }
.slide--video { display: grid; place-items: center; background: #000; }
.slide__fundo { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(14px) brightness(.5); }
.slide--video video { position: relative; height: 100%; width: auto; }

.slide--bots { display: grid; grid-template-columns: auto auto; grid-template-rows: 1fr auto; align-content: center; justify-content: center; column-gap: 6.5cqw; padding: 0 5.9cqw 15.9cqw; }
.bots__n { grid-row: 1 / 3; align-self: center; margin: 0; color: var(--branco); font: 800 44.2cqw/.8 var(--titulos); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.bots__luzes { align-self: end; display: grid; grid-template-columns: repeat(3, 4.4cqw); gap: 2.65cqw; margin-bottom: 3.8cqw; }
.bots__luzes i { width: 4.4cqw; height: 4.4cqw; border-radius: 50%; background: #2c2c2f; transition: background .35s, transform .5s var(--expo); }
.bots__luzes i.e-on { background: var(--laranja); transform: scale(1.12); }
.bots__t { align-self: start; margin: 0; color: var(--texto); font: 500 clamp(10px, 3.7cqw, 20px)/1.25 var(--corpo); }

.seg, .ferr { position: absolute; inset: 0 0 13% 0; display: grid; align-content: center; gap: 3.7cqw; padding: 0 9.4cqw; }
.seg li { display: grid; grid-template-columns: 5.9cqw 21.8cqw 1fr; align-items: baseline; column-gap: 2.95cqw; }
.seg svg { width: 5.9cqw; height: 5.9cqw; align-self: center; fill: none; stroke: var(--laranja); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.seg path { stroke-dasharray: 26; stroke-dashoffset: 0; }
.seg b, .ferr b { color: var(--branco); font: 700 clamp(12px, 5.15cqw, 28px)/1 var(--titulos); letter-spacing: -.01em; }
.seg span, .ferr span { color: var(--texto); font-size: clamp(9px, 3.1cqw, 17px); line-height: 1.3; }
.ferr { gap: 5.9cqw; }
.ferr li { display: grid; gap: 1cqw; }

/* faixa de estado */
.faixa {
  position: absolute; left: 0; right: 0; bottom: 0; height: 13%; z-index: 3;
  display: flex; align-items: center; gap: 2.4cqw; padding: 0 5.9cqw 0 6.2cqw;
  background: rgba(7, 7, 8, .88); color: var(--branco);
  font: 600 clamp(8.5px, 2.65cqw, 15px)/1 var(--titulos); font-stretch: 80%; letter-spacing: .04em; text-transform: uppercase;
}
.faixa__barra { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--laranja); transform: scaleX(0); transform-origin: 0 50%; }
.faixa__id { flex: none; padding: .95cqw 1.6cqw; border: 1px solid rgba(245, 244, 241, .55); }
.faixa__txt { flex: 1; min-width: 0; white-space: nowrap; }
.faixa__ponto { flex: none; width: 1.83cqw; height: 1.83cqw; border-radius: 50%; background: var(--laranja); }
.faixa__conta { flex: none; color: var(--suave); font-variant-numeric: tabular-nums; white-space: nowrap; }
.troca { display: inline-grid; overflow: hidden; vertical-align: bottom; }
.troca > span { grid-area: 1 / 1; display: block; overflow: hidden; text-overflow: ellipsis; padding: .12em 0; }
.faixa__conta .troca { color: var(--branco); }

/* vidro: sombra e reflexo tirados da própria arte; ruído na mudança de canal */
.ruido { position: absolute; inset: -12%; z-index: 4; pointer-events: none; opacity: 0; mix-blend-mode: screen; background: url(ruido.jpg) 0 0 / 190px 190px; }
.varrimento { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: .16; background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, .55) 2px 3px); }
.vidro { position: absolute; inset: 0; z-index: 5; pointer-events: none; background-size: 100% 100%; }
.vidro--sombra { background-image: url(vidro-sombra.jpg); mix-blend-mode: multiply; }
.vidro--luz { background-image: url(vidro-luz.jpg); mix-blend-mode: screen; inset: -2%; will-change: transform; }
.vidro--passa { inset: -20% -60%; opacity: 0; mix-blend-mode: screen; background: linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, .11) 50%, rgba(255, 255, 255, 0) 58%); }

.ecra__abrir { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; border-radius: inherit; display: grid; place-items: start end; padding: 4.4cqw 5.6cqw; }
.ecra__abrir:focus-visible { outline-offset: -4px; }
.ecra__dica {
  display: inline-flex; align-items: center; gap: 1.5cqw; padding: 1.6cqw 2.4cqw; background: var(--branco); color: var(--tinta);
  font: 600 clamp(10px, 2.8cqw, 15px)/1 var(--corpo); opacity: 0; transform: translateY(-1.5cqw); transition: opacity .3s, transform .5s var(--expo);
}
.ecra__dica svg, .projeto svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ecra__abrir:hover .ecra__dica, .ecra__abrir:focus-visible .ecra__dica { opacity: 1; transform: none; }

/* ---------- botões ---------- */
.comandos { display: contents; }
.botao { position: absolute; left: calc(var(--bx) * 1%); top: calc(var(--by) * 1%); width: calc(var(--bw) * 1%); height: calc(var(--bh) * 1%); -webkit-tap-highlight-color: transparent; }
.botao[data-cat="0"] { --bx: 22.2; } .botao[data-cat="1"] { --bx: 38.23; } .botao[data-cat="2"] { --bx: 54.29; } .botao[data-cat="3"] { --bx: 70.35; }
.botao__arte {
  position: absolute; inset: 0; --x: var(--bx); --y: var(--by); --w: var(--bw); --h: var(--bh);
  background-image: url(maquina.webp); background-repeat: no-repeat;
  background-size: calc(10000% / var(--w)) calc(10000% / var(--h));
  background-position: calc(var(--x) / (100 - var(--w)) * 100%) calc(var(--y) / (100 - var(--h)) * 100%);
  transform-origin: 50% 100%; transition: filter .35s;
}
.botao__brilho {
  position: absolute; inset: -55% -22% -70%; pointer-events: none; opacity: .18; mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(255, 138, 62, .6), rgba(255, 138, 62, 0));
  transition: opacity .5s;
}
.botao__onda { position: absolute; inset: -22% -9%; border-radius: 50%; border: 1px solid var(--laranja-luz); opacity: 0; pointer-events: none; }
.botao__nome {
  position: absolute; left: 50%; top: calc(100% + .45cqw); transform: translateX(-50%); white-space: nowrap;
  color: var(--suave); font: 600 clamp(9px, .8cqw, 14px)/1 var(--titulos); font-stretch: 82%; letter-spacing: .09em; text-transform: uppercase;
  transition: color .3s;
}
.botao:hover .botao__arte, .botao:focus-visible .botao__arte { filter: brightness(1.16); }
.botao:hover .botao__nome, .botao:focus-visible .botao__nome { color: var(--branco); }
.botao.e-ativa .botao__arte { filter: brightness(1.2) saturate(1.1); }
.botao.e-ativa .botao__brilho { opacity: .62; }
.botao.e-ativa .botao__nome, .botao.e-realce .botao__nome { color: var(--branco); }
.botao.e-realce .botao__arte { filter: brightness(1.16); }
.botao:focus-visible { outline-offset: .5cqw; }
@media (prefers-reduced-motion: no-preference) {
  .botao.e-ativa .botao__brilho { animation: respira 2.6s ease-in-out infinite alternate; }
  .cubo__corpo { animation: cubo-vive 3.4s ease-in-out infinite alternate; }
}
@keyframes respira { from { opacity: .48; } to { opacity: .74; } }

/* ---------- o cubo da intro vive no painel de comandos ---------- */
.cubo { position: absolute; left: 0; top: 0; width: var(--cw); aspect-ratio: 1; z-index: 2; transform-origin: 50% 100%; will-change: transform; }
.cubo[hidden] { display: none; }
.cubo__sombra { position: absolute; left: 2%; right: 4%; bottom: -8%; height: 24%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0)); }
.cubo__corpo { position: absolute; inset: 0; transform-origin: 50% 100%; cursor: pointer; }
.cubo__corpo img { width: 100%; height: 100%; object-fit: contain; user-select: none; pointer-events: none; }
.olho { position: absolute; top: 47%; width: 8.5%; height: 17.5%; border-radius: 50%; background: #1b0d06; translate: var(--ox, 0px) var(--oy, 0px); transition: translate .25s ease-out; }
.olho--e { left: 24.3%; }
.olho--d { left: 44.3%; }
@keyframes cubo-vive { from { transform: scale(1, 1); } to { transform: scale(1.018, .978); } }

/* ---------- placas ---------- */
.placas { display: contents; }
.placas li { position: absolute; left: calc(var(--px) * 1%); top: calc(var(--py) * 1%); width: calc(var(--pw) * 1%); height: calc(var(--ph) * 1%); --py: 92.12; }
.placas li:nth-child(1) { --px: 12.42; } .placas li:nth-child(2) { --px: 25.4; } .placas li:nth-child(3) { --px: 38.37; }
.placas li:nth-child(4) { --px: 51.38; } .placas li:nth-child(5) { --px: 64.32; } .placas li:nth-child(6) { --px: 77.29; }
.placa {
  position: relative; display: grid; align-content: center; gap: .28cqw; width: 100%; height: 100%; padding: 0 1.15cqw 0 1.2cqw; text-align: left; color: #fff;
  --x: var(--px); --y: var(--py); --w: var(--pw); --h: var(--ph);
  background-image: url(maquina.webp); background-repeat: no-repeat;
  background-size: calc(10000% / var(--w)) calc(10000% / var(--h));
  background-position: calc(var(--x) / (100 - var(--w)) * 100%) calc(var(--y) / (100 - var(--h)) * 100%);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .42);
  transition: transform .5s var(--expo), filter .3s, box-shadow .5s var(--expo);
}
.placa__num { font: 600 clamp(8px, .74cqw, 13px)/1 var(--titulos); font-stretch: 84%; letter-spacing: .08em; }
.placa__nome { font: 700 clamp(9px, .86cqw, 15px)/1.05 var(--titulos); font-stretch: 76%; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.placa:hover, .placa:focus-visible, .placa.e-realce { filter: brightness(1.14); transform: translateY(-.18cqw); }
.placa:active { transform: translateY(.06cqw) scale(.985); transition-duration: .08s; }
.placa.e-ativa { transform: translateY(-.34cqw); box-shadow: 0 .55cqw .9cqw rgba(0, 0, 0, .55); filter: brightness(1.1); }
.placa:focus-visible { outline-offset: .55cqw; }
/* um só aro que desliza de placa em placa */
.anel {
  position: absolute; left: 0; top: 0; width: calc(var(--aw, 0px) + .84cqw); height: calc(var(--ah, 0px) + .84cqw); margin: -.76cqw 0 0 -.42cqw;
  border: 2px solid var(--laranja); pointer-events: none; opacity: 0;
  transform: translate3d(var(--ax, 0px), var(--ay, 0px), 0); transition: transform .75s var(--expo), opacity .4s;
}
.anel.e-visivel { opacity: 1; }

/* ---------- depois do zoom: trabalho, contacto, sobre e legal ---------- */
.projeto { position: fixed; inset: 0; z-index: 30; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: #0c0c0d; color: var(--texto); overflow: auto; overscroll-behavior: contain; }
.projeto[hidden] { display: none; }
.projeto.e-fechado { visibility: hidden; pointer-events: none; opacity: 0; }
.projeto__media { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #060607; container-type: inline-size; }
.projeto__texto { align-self: center; padding: clamp(24px, 4.4vw, 80px); max-width: 46rem; }
.projeto__voltar { display: inline-flex; align-items: center; gap: .55em; padding: .7em 1em; margin-bottom: clamp(22px, 4.5vh, 56px); border: 1px solid #3a3a3d; color: var(--branco); font-weight: 600; transition: border-color .25s, background .25s; }
.projeto__voltar:hover, .projeto__voltar:focus-visible { border-color: var(--branco); background: #1a1a1c; }
.projeto__id { margin: 0 0 .9rem; color: var(--suave); font: 600 .95rem/1 var(--titulos); font-stretch: 84%; letter-spacing: .09em; text-transform: uppercase; }
.projeto h2 { margin: 0; color: var(--branco); font: 700 clamp(2.3rem, 5vw, 5.2rem)/.98 var(--titulos); letter-spacing: -.032em; text-wrap: balance; }
.projeto__estado { display: flex; align-items: center; gap: .6em; margin: 1.3rem 0 0; color: var(--branco); font: 600 .95rem/1 var(--titulos); font-stretch: 84%; letter-spacing: .07em; text-transform: uppercase; }
.projeto__estado i { width: .6em; height: .6em; border-radius: 50%; background: var(--laranja); }
.projeto__resumo { margin: 1.8rem 0 0; max-width: 34ch; color: var(--branco); font: 500 clamp(1.15rem, 1.6vw, 1.5rem)/1.3 var(--corpo); text-wrap: balance; }
.projeto__corpo { margin: 1rem 0 0; max-width: 60ch; font-size: clamp(1rem, 1.1vw, 1.1rem); line-height: 1.6; text-wrap: pretty; }
.numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.2rem, 1fr)); gap: 1.1rem 1.6rem; margin: 1.9rem 0 0; padding: 1.3rem 0 1.2rem; border-block: 1px solid var(--linha); }
.numeros dt { color: var(--branco); font: 700 clamp(1.9rem, 3vw, 3rem)/1 var(--titulos); letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.numeros dd { margin-top: .45rem; color: var(--suave); font-size: .875rem; line-height: 1.35; text-wrap: balance; }
.projeto__sub { margin: 1.7rem 0 .7rem; color: var(--suave); font: 600 .82rem/1 var(--titulos); font-stretch: 84%; letter-spacing: .1em; text-transform: uppercase; }
.feito li { display: grid; grid-template-columns: 1.2rem 1fr; align-items: baseline; gap: .65rem; padding: .28rem 0; line-height: 1.45; }
.feito svg { align-self: center; color: var(--laranja); stroke-width: 2.4; }
.feito path { stroke-dasharray: 26; stroke-dashoffset: 0; }
.canais { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.canais li { padding: .4rem .7rem; border: 1px solid #3a3a3d; color: var(--branco); font: 600 .8rem/1 var(--titulos); font-stretch: 84%; letter-spacing: .07em; text-transform: uppercase; }
.projeto__link { display: inline-flex; align-items: center; gap: .6em; margin-top: 1.9rem; padding: .95em 1.3em; background: var(--laranja); color: var(--tinta); font-weight: 700; text-decoration: none; transition: background .25s, transform .35s var(--expo); }
.projeto__link:hover, .projeto__link:focus-visible { background: var(--laranja-luz); transform: translateY(-2px); }
.projeto__outros { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.2rem; padding-top: 1.1rem; border-top: 1px solid var(--linha); }
.projeto__outros button { display: grid; gap: .3rem; padding: .35rem 0; text-align: left; color: var(--suave); transition: color .25s, transform .4s var(--expo); }
.projeto__outros button:last-child { text-align: right; }
.projeto__outros small { font: 600 .74rem/1 var(--titulos); font-stretch: 84%; letter-spacing: .1em; text-transform: uppercase; }
.projeto__outros b { color: var(--branco); font: 700 1rem/1.1 var(--titulos); font-stretch: 88%; }
.projeto__outros button:hover, .projeto__outros button:focus-visible { color: var(--laranja-luz); }
.projeto__outros button:first-child:hover { transform: translateX(-4px); }
.projeto__outros button:last-child:hover { transform: translateX(4px); }

/* galeria de capturas verdadeiras */
.gal__palco { position: absolute; inset: 0; overflow: hidden; }
.gal__img { position: absolute; left: 0; top: 0; width: 100%; height: auto; visibility: hidden; will-change: transform; }
.gal__img.e-ativa, .gal__img.e-sai { visibility: visible; }
.gal__tabs { position: absolute; left: 3.2cqw; bottom: 3.2cqw; z-index: 2; display: flex; flex-wrap: wrap; gap: .25rem; padding: .3rem; background: rgba(7, 7, 8, .86); }
.gal__tab { padding: .6rem .85rem; color: var(--suave); font: 600 .78rem/1 var(--titulos); font-stretch: 84%; letter-spacing: .07em; text-transform: uppercase; transition: color .2s, background .25s; }
.gal__tab:hover, .gal__tab:focus-visible { color: var(--branco); }
.gal__tab.e-ativa { background: var(--branco); color: var(--tinta); }
.pm-video { position: absolute; inset: 0; display: grid; place-items: center; }
.pm-video .slide__fundo { position: absolute; }
.pm-video video { position: relative; height: 100%; width: auto; max-width: 100%; }

/* trabalhos sem captura: o próprio painel em grande */
.pm { position: absolute; inset: 0; display: grid; align-content: center; gap: 4.2cqw; padding: 9cqw; }
.pm-bots__topo { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 5cqw; }
.pm-bots__n { margin: 0; color: var(--branco); font: 800 34cqw/.78 var(--titulos); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.pm-bots__luzes { display: grid; grid-template-columns: repeat(3, 4cqw); gap: 2.4cqw; }
.pm-bots__luzes i { width: 4cqw; height: 4cqw; border-radius: 50%; background: #2c2c2f; transition: background .35s, transform .5s var(--expo); }
.pm-bots__luzes i.e-on { background: var(--laranja); transform: scale(1.12); }
.pm-lista { display: grid; border-top: 1px solid var(--linha); }
.pm-lista li { display: grid; grid-template-columns: 1fr; row-gap: .5rem; padding: 2.6cqw 0; border-bottom: 1px solid var(--linha); }
.pm-lista--icone li { grid-template-columns: 4cqw minmax(7.5rem, 21cqw) 1fr; align-items: baseline; column-gap: 2.6cqw; }
.pm-lista svg { width: 4cqw; height: 4cqw; align-self: center; color: var(--laranja); stroke-width: 2.4; }
.pm-lista path { stroke-dasharray: 26; stroke-dashoffset: 0; }
.pm-lista b { color: var(--branco); font: 700 clamp(1.3rem, 4.6cqw, 3rem)/1 var(--titulos); letter-spacing: -.015em; }
.pm-lista span { color: var(--texto); font-size: clamp(1rem, 2.35cqw, 1.3rem); line-height: 1.4; text-wrap: pretty; }
.pm-lista--simples li { grid-template-columns: 1.6cqw 1fr; align-items: center; column-gap: 3cqw; padding: 1.7cqw 0; }
.pm-lista--simples i { width: 1cqw; height: 1cqw; min-width: 6px; min-height: 6px; border-radius: 50%; background: var(--laranja); }
.pm-lista--simples span { color: var(--branco); font: 600 clamp(1rem, 2.5cqw, 1.6rem)/1.2 var(--titulos); font-stretch: 90%; }
.pm-marca { width: min(62%, 26rem); height: auto; }
.pm-nota { margin: 0; max-width: 30ch; color: var(--suave); font-size: clamp(.95rem, 2cqw, 1.15rem); line-height: 1.5; }
.pm h2 { font-size: clamp(2.6rem, 11cqw, 7rem); }

/* contacto */
.form { display: grid; gap: 1.05rem; }
.form label { display: grid; gap: .4rem; color: var(--suave); font: 600 .8rem/1.2 var(--titulos); font-stretch: 84%; letter-spacing: .08em; text-transform: uppercase; }
.form input[type="text"], .form input[type="email"], .form textarea {
  width: 100%; padding: .8rem .9rem; background: #151517; border: 1px solid #3a3a3d; border-radius: 0; color: var(--branco);
  font: 400 1rem/1.4 var(--corpo); letter-spacing: 0; text-transform: none; transition: border-color .2s, background .2s;
}
.form textarea { resize: vertical; min-height: 7.5rem; }
.form input:hover, .form textarea:hover { border-color: #5a5a5e; }
.form input:focus-visible, .form textarea:focus-visible { outline: none; border-color: var(--laranja); background: #1a1a1c; }
.form__duas { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; }
.form__cap { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 1rem; }
.form__cap img { width: 200px; height: 64px; background: #151517; border: 1px solid #3a3a3d; }
.form__cap button { margin-top: .4rem; color: var(--suave); font-size: .85rem; text-decoration: underline; text-underline-offset: .2em; }
.form__cap button:hover { color: var(--branco); }
.form .consent { grid-template-columns: 1.25rem 1fr; align-items: start; gap: .7rem; color: var(--texto); font: 400 .92rem/1.45 var(--corpo); letter-spacing: 0; text-transform: none; }
.form .consent input { width: 1.15rem; height: 1.15rem; margin: .15rem 0 0; accent-color: var(--laranja); }
.form__enviar { justify-self: start; padding: .95em 1.5em; background: var(--laranja); color: var(--tinta); font-weight: 700; transition: background .25s, transform .35s var(--expo), opacity .2s; }
.form__enviar:hover, .form__enviar:focus-visible { background: var(--laranja-luz); transform: translateY(-2px); }
.form__enviar[disabled] { opacity: .55; cursor: progress; transform: none; }
.form__estado { margin: 0; min-height: 1.5em; color: var(--laranja-luz); line-height: 1.45; }
.form__estado.e-ok { color: var(--branco); font: 500 1.25rem/1.35 var(--corpo); }
.armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* legal */
.projeto--legal { grid-template-columns: minmax(0, 1fr); }
.projeto--legal .projeto__media { display: none; }
.projeto--legal .projeto__texto { justify-self: center; align-self: start; width: 100%; max-width: 50rem; }
.legal { max-width: 68ch; line-height: 1.65; }
.legal h2 { font-size: clamp(2rem, 4vw, 3.4rem); margin-bottom: 1.6rem; }
.legal h3 { margin: 2.2rem 0 .6rem; color: var(--branco); font: 700 1.35rem/1.2 var(--titulos); letter-spacing: -.01em; }
.legal h4 { margin: 1.4rem 0 .4rem; color: var(--branco); font: 600 1.05rem/1.3 var(--corpo); }
.legal p, .legal ul, .legal ol, .legal dl, .legal table { margin: 0 0 .9rem; }
.legal ul, .legal ol { padding-left: 1.2rem; list-style: disc; }
.legal ol { list-style: decimal; }
.legal li { margin-bottom: .3rem; }
.legal a { color: var(--laranja-luz); }
.legal table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.legal th, .legal td { padding: .5rem .6rem; border: 1px solid var(--linha); text-align: left; vertical-align: top; }
.legal dt { color: var(--branco); font-weight: 600; }
.legal dd { margin: 0 0 .6rem; }

.nota { max-width: 1200px; margin: 0 auto; padding: 22px 16px 36px; color: var(--suave); font-size: .875rem; line-height: 1.6; }
.nota p { margin: 0; max-width: 72ch; }

/* ---------- estado antes de ligar (só com JavaScript e movimento aceite) ---------- */
.arranque .maquina__arte { filter: brightness(.2); }
.arranque .marca, .arranque .nav, .arranque .titulo p, .arranque .mensagem, .arranque .faixa, .arranque .botao__nome { opacity: 0; }
.arranque .titulo .linha > span { transform: translateY(108%); }
.arranque .slides { opacity: 0; }
.arranque .botao__arte { filter: brightness(.26) saturate(.5); }
.arranque .botao__brilho { opacity: 0; animation: none; }
.arranque .placas li { opacity: 0; transform: translateY(70%); }
.arranque .vidro--luz { opacity: .5; }

/* ---------- telemóvel e ecrãs em pé: arte própria, em pé (1536 x 2752) ---------- */
@media (max-width: 820px), (max-aspect-ratio: 11 / 10) {
  :root {
    --ex: 12.9; --ey: 34.3; --ew: 74.3; --eh: 31.4;
    --by: 71.75; --bw: 13.6; --bh: 4.1;
    --pw: 23.86; --ph: 5;
    --lx: 6.771; --ly: 3.743; --lw: 86.458; --lh: 9.375;
    --cw: 7.6cqw;
  }
  .palco { padding-top: 2.75rem; }
  .maquina { width: min(100vw, max(22.5rem, calc((100svh - 2.75rem) * 1536 / 2752))); aspect-ratio: 1536 / 2752; }
  .luz { display: none; }
  .marca { width: 42%; }
  .nav { left: 0; right: 0; top: auto; bottom: 100%; height: 2.75rem; justify-content: center; gap: 1.5rem; padding: 0 1rem; font-size: .9rem; }
  .nav a { padding: .5rem 0; }
  .titulo { left: 11%; top: 18.3%; width: 78%; height: 10.7%; display: grid; align-content: center; justify-items: center; text-align: center; }
  .titulo h1 { font-size: 5.9cqw; line-height: 1; white-space: nowrap; }
  .titulo .linha { display: inline-block; vertical-align: bottom; }
  .titulo p { margin-top: 1.3cqw; max-width: none; font-size: 3.05cqw; line-height: 1.32; }
  .titulo .mensagem { display: none; }
  .ecra { border-radius: 8.2% / 10.8%; }
  .vidro--sombra { background-image: url(vidro-sombra-pe.jpg); }
  .vidro--luz { background-image: url(vidro-luz-pe.jpg); }
  .ecra__dica { opacity: 1; transform: none; gap: 0; padding: 2.4cqw; font-size: 14px; }
  .ecra__dica > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

  .botao[data-cat="0"] { --bx: 9.64; } .botao[data-cat="1"] { --bx: 32.1; } .botao[data-cat="2"] { --bx: 54.5; } .botao[data-cat="3"] { --bx: 76.83; }
  .botao__arte, .placa { background-image: url(maquina-pe.webp); }
  .botao__nome { top: calc(100% + 3.5cqw); width: 21cqw; white-space: normal; text-align: center; font-size: 2.45cqw; line-height: 1.15; letter-spacing: .06em; }
  .botao__brilho { inset: -40% -14% -50%; }

  .placas li { --py: 83.321; }
  .placas li:nth-child(n + 4) { --py: 91.243; }
  .placas li:nth-child(3n + 1) { --px: 8.985; } .placas li:nth-child(3n + 2) { --px: 38.086; } .placas li:nth-child(3n) { --px: 67.122; }
  .placa { padding: 0 1.5cqw 0 2.3cqw; gap: .55cqw; }
  .placa__num { font-size: 2cqw; }
  .placa__nome { font-size: 2.35cqw; line-height: 1.04; letter-spacing: .02em; white-space: normal; }
  .placa.e-ativa { transform: translateY(-.7cqw); box-shadow: 0 1.2cqw 2cqw rgba(0, 0, 0, .55); }
  .placa:hover, .placa:focus-visible, .placa.e-realce { transform: translateY(-.4cqw); }
  .anel { width: calc(var(--aw, 0px) + 1.8cqw); height: calc(var(--ah, 0px) + 1.8cqw); margin: -1.6cqw 0 0 -.9cqw; }

  .sob { display: block; width: min(100vw, max(22.5rem, calc((100svh - 2.75rem) * 1536 / 2752))); margin: 0 auto; padding: 1.1rem 1rem 0; }
  .sob .mensagem { display: block; margin: 0; padding: 1rem; text-align: center; font-size: 1rem; }

  .projeto { display: block; }
  .projeto__media { position: relative; height: auto; aspect-ratio: 1 / .82; }
  .pm--bots.projeto__media, .pm--seg.projeto__media, .pm--ferr.projeto__media, .pm--painel.projeto__media { aspect-ratio: auto; }
  .pm { position: relative; padding: 4.6rem 6cqw 9cqw; gap: 6cqw; }
  .projeto--legal .projeto__texto { padding-top: 4.6rem; }
  .pm-lista li { padding: 3.4cqw 0; }
  .pm-lista--icone li { grid-template-columns: 6cqw 1fr; column-gap: 3cqw; }
  .pm-lista--icone li span { grid-column: 2; }
  .pm-lista svg { width: 6cqw; height: 6cqw; }
  .pm-lista--simples li { grid-template-columns: 4cqw 1fr; padding: 3cqw 0; }
  .pm-lista b { font-size: 1.3rem; }
  .pm-lista span { font-size: 1rem; }
  .pm-lista--simples span { font-size: 1.15rem; }
  .projeto__texto { align-self: start; padding: 1.5rem 1.25rem 2.5rem; }
  .projeto__voltar { position: fixed; left: .75rem; top: .75rem; z-index: 5; margin: 0; background: rgba(12, 12, 13, .92); }
  .form__duas { grid-template-columns: 1fr; }
  .form__cap { grid-template-columns: 1fr; }
  .arranque .placas li { transform: translateY(30%); }
  .nota { padding: 18px 16px 30px; text-align: center; }
  .nota p { margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
