/* ══ Equipe técnica: cristal flutuante, refração, paralaxe e física de molas ══
   Só esta página carrega este ficheiro. A física vive em assets/js/equipe.js;
   aqui está apenas o que se vê. Sem JS tudo continua legível: os cartões
   mostram os nomes dos equipamentos e o modal simplesmente não abre. */

/* ── Vidro ─────────────────────────────────────────────────────────────────
   Base: desfoque + saturação (funciona em todo o lado). Onde o navegador aceita
   url() em backdrop-filter, soma-se a refração (feDisplacementMap): as linhas da
   grelha atrás do painel dobram-se como numa lente. */
.glass {
  position: relative; isolation: isolate; border-radius: 24px;
  background: linear-gradient(140deg, rgba(255,255,255,.13), rgba(255,255,255,.035) 55%, rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 34px 60px -26px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.24), inset 0 -1px 0 rgba(255,255,255,.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
}
@supports (backdrop-filter: url(#eq-refract)) {
  .glass {
    -webkit-backdrop-filter: blur(4px) saturate(1.5) url(#eq-refract);
    backdrop-filter: blur(4px) saturate(1.5) url(#eq-refract);
  }
}
/* brilho especular: segue o cursor dentro do painel */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  background: radial-gradient(260px circle at var(--mx, 30%) var(--my, 0%), rgba(255,255,255,.2), transparent 62%);
  opacity: var(--sheen, 0); transition: opacity .35s ease;
}

/* ── Fundo: grelha + luzes coloridas. É isto que a refração deforma ───────── */
.eq-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.eq-bg::before {
  content: ""; position: absolute; inset: -2px;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 60% 50%, #000 15%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 75% at 60% 50%, #000 15%, transparent 78%);
}
.eq-bg i { position: absolute; border-radius: 50%; filter: blur(64px); animation: eqDrift 20s ease-in-out infinite alternate; }
.eq-bg .o1 { width: 40vw; height: 40vw; left: 50%; top: -10%; background: radial-gradient(circle, #ff2e22, transparent 68%); opacity: .5; }
.eq-bg .o2 { width: 30vw; height: 30vw; left: 66%; top: 40%; background: radial-gradient(circle, #ffb454, transparent 68%); opacity: .34; animation-delay: -7s; }
.eq-bg .o3 { width: 34vw; height: 34vw; left: 26%; top: 48%; background: radial-gradient(circle, #4a78ff, transparent 68%); opacity: .3; animation-delay: -12s; }
.eq-bg .st { position: absolute; height: 2px; width: 46vw; filter: none; border-radius: 0; animation: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent); transform: rotate(-24deg); opacity: .5; }
.eq-bg .st1 { left: 44%; top: 28%; } .eq-bg .st2 { left: 30%; top: 64%; opacity: .32; }
@keyframes eqDrift { to { transform: translate3d(-5vw, 4vh, 0) scale(1.15); } }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.eq-hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; background: #07080a;
  padding-block: clamp(6.5rem, 13vh, 9rem) clamp(3rem, 7vh, 5rem); }
.eq-hero__in { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 2rem; align-items: center; }
.eq-hero h1 { font-size: clamp(1.95rem, 3.9vw, 3.1rem); line-height: 1.06; margin-top: .8rem; max-width: 20ch; }
.eq-hero h1 em { font-style: normal; color: var(--red-lit); }
.eq-lead { margin-top: 1.1rem; max-width: 50ch; color: #c4c8ce; font-size: clamp(.95rem, 1.35vw, 1.06rem); }
.eq-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.7rem; }
.eq-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; margin: 2rem 0 0; padding: 1.1rem 0 0; list-style: none; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; font-weight: 600; color: var(--mist); }
.eq-facts b { color: #fff; font-family: var(--f-display); font-size: 1.15rem; margin-right: .35rem; }

.eq-float { position: relative; height: clamp(360px, 44vw, 540px);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); will-change: transform; }
.eq-tile { position: absolute; }
.eq-tile > .glass { position: absolute; inset: 0; border-radius: 22px; animation: eqBob 7s ease-in-out infinite alternate; }
.eq-tile img { position: absolute; inset: 8% 10%; width: 80%; height: 84%; object-fit: contain; z-index: 4;
  filter: drop-shadow(0 22px 22px rgba(0,0,0,.55)); animation: eqBob 7s ease-in-out infinite alternate; }
.eq-tile:nth-child(2) > *, .eq-tile:nth-child(2) img { animation-delay: -1.6s; }
.eq-tile:nth-child(3) > *, .eq-tile:nth-child(3) img { animation-delay: -3.1s; }
.eq-tile:nth-child(4) > *, .eq-tile:nth-child(4) img { animation-delay: -4.4s; }
.eq-tile:nth-child(5) > *, .eq-tile:nth-child(5) img { animation-delay: -5.6s; }
@keyframes eqBob { to { transform: translateY(-11px) rotate(.5deg); } }
.eq-t1 { left: 22%; top: 14%; width: 46%; height: 54%; }
.eq-t2 { left: 67%; top: 2%;  width: 31%; height: 25%; }
.eq-t3 { left: 1%;  top: 46%; width: 33%; height: 36%; }
.eq-t4 { left: 62%; top: 52%; width: 25%; height: 42%; }
.eq-t5 { left: 30%; top: 76%; width: 35%; height: 21%; }

/* ── Banco de equipamentos ───────────────────────────────────────────────── */
.eq-banco { position: relative; overflow: hidden; background: #07080a; padding-block: var(--rhythm); border-top: 1px solid var(--edge); }
.eq-banco .wrap { position: relative; z-index: 2; }
.eq-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.eq-card { grid-column: span 2; min-height: 340px; padding: 1.5rem; display: flex; flex-direction: column;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--sc, 1)); will-change: transform; }
.eq-card--w { grid-column: span 3; }
.eq-card__n { font: 700 .72rem var(--f-display); letter-spacing: .14em; color: var(--red-lit); }
.eq-card h3 { margin-top: .6rem; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.12; max-width: 14ch; }
.eq-card__p { margin-top: .7rem; font-size: .88rem; color: #b6bbc2; max-width: 34ch; }
.eq-card--w .eq-card__p, .eq-card--w h3 { max-width: 30ch; }
.eq-names { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; max-width: 46ch; position: relative; z-index: 4; pointer-events: none; }
.eq-names li { font-size: .72rem; font-weight: 600; padding: .28rem .62rem; border-radius: 999px; color: #d7dbe0; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
.eq-art { position: absolute; right: 0; top: 0; width: 50%; height: 62%; pointer-events: none; }
.eq-art img { position: absolute; object-fit: contain; filter: drop-shadow(0 18px 18px rgba(0,0,0,.55)); z-index: 4; }
.eq-art img:nth-child(1) { width: 58%; right: 8%; top: 8%; }
.eq-art img:nth-child(2) { width: 42%; right: 46%; top: 34%; }
.eq-art img:nth-child(3) { width: 34%; right: 4%; top: 52%; }
.eq-card--w .eq-art { width: 52%; height: 78%; }
.eq-open { position: static; margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: .55rem;
  padding: .62rem 1.05rem; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.07);
  color: #fff; font: 600 .82rem var(--f-body); cursor: pointer; transition: background .25s ease, border-color .25s ease, padding .35s cubic-bezier(.34,1.56,.64,1); }
/* o cartão inteiro é a área de clique: o ::before do botão cobre o cartão (posicionado) */
.eq-open::before { content: ""; position: absolute; inset: 0; z-index: 5; border-radius: inherit; }
.eq-open i { display: inline-block; width: 8px; height: 8px; border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor; transform: rotate(45deg); transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.eq-card { cursor: pointer; }
.eq-card:hover .eq-open { background: var(--red); border-color: var(--red); padding-inline: 1.3rem; }
.eq-card:hover .eq-open i { transform: translateX(3px) rotate(45deg); }
.eq-open:focus-visible::before { outline: 2px solid var(--red-lit); outline-offset: 3px; }
.eq-open:focus-visible { outline: none; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
html.eq-lock { overflow: hidden; }
.eq-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 1rem; }
.eq-modal[hidden] { display: none; }
.eq-scrim { position: absolute; inset: 0; background: rgba(4,5,7,.6); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); opacity: 0; transition: opacity .4s ease; }
.eq-modal.is-open .eq-scrim { opacity: 1; }
.eq-sheet { width: min(980px, 100%); max-height: calc(100svh - 2rem); overflow: auto; padding: 1.1rem 1.4rem 1.3rem; border-radius: 30px;
  background: linear-gradient(140deg, rgba(34,38,46,.72), rgba(14,16,20,.62)); overscroll-behavior: contain; }
.eq-sheet::after { display: none; }
.eq-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.eq-seg { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); max-width: calc(100% - 52px); overflow-x: auto; scrollbar-width: none; }
.eq-seg::-webkit-scrollbar { display: none; }
.eq-seg button { all: unset; position: relative; z-index: 1; cursor: pointer; white-space: nowrap; padding: .55rem 1rem; border-radius: 999px; font: 600 .8rem var(--f-body); color: var(--mist); transition: color .25s ease; }
.eq-seg button[aria-selected="true"] { color: #fff; }
.eq-seg button:hover { color: #fff; }
.eq-seg button:focus-visible { outline: 2px solid var(--red-lit); outline-offset: 2px; }
.eq-pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,.12)); border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.4); }
.eq-x { all: unset; box-sizing: border-box; cursor: pointer; flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; }
.eq-x:hover { background: rgba(255,255,255,.14); }
.eq-x:focus-visible { outline: 2px solid var(--red-lit); outline-offset: 2px; }
.eq-x svg { width: 14px; height: 14px; }

.eq-stage { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1rem, 3vw, 2.2rem); align-items: center; margin-top: 1rem; }
.eq-view { position: relative; aspect-ratio: 5 / 4; border-radius: 22px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 55%, rgba(255,255,255,.14), rgba(255,255,255,.02) 70%), rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1); }
.eq-view img { max-width: 78%; max-height: 78%; object-fit: contain; filter: drop-shadow(0 26px 24px rgba(0,0,0,.6)); will-change: transform; }
.eq-info > * { will-change: transform, opacity; }
.eq-count { font: 700 .72rem var(--f-display); letter-spacing: .14em; color: var(--red-lit); }
.eq-info h3 { margin-top: .5rem; font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.08; }
.eq-desc { margin-top: .8rem; color: #c1c5cb; font-size: .95rem; max-width: 40ch; }
.eq-tag { display: inline-block; margin-top: 1rem; padding: .3rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 600; color: #d7dbe0; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }
.eq-cta { margin-top: 1.4rem; }

.eq-dock { display: flex; align-items: flex-end; justify-content: safe center; gap: 6px; height: 124px; margin-top: 1.1rem; padding: 0 .7rem .7rem;
  border-radius: 22px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.eq-dock::-webkit-scrollbar { display: none; }
.eq-d { all: unset; box-sizing: border-box; flex: none; position: relative; width: 60px; height: 60px; border-radius: 15px; cursor: pointer;
  display: grid; place-items: center; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.13);
  transform-origin: 50% 100%; translate: var(--tx, 0px) 0; scale: var(--s, 1); }
.eq-d img { width: 78%; height: 78%; object-fit: contain; pointer-events: none; }
.eq-d[aria-current="true"] { border-color: rgba(255,90,70,.75); background: rgba(255,255,255,.16); box-shadow: 0 0 22px rgba(255,46,34,.35); }
.eq-d[aria-current="true"]::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--red-lit); }
.eq-d:focus-visible { outline: 2px solid var(--red-lit); outline-offset: 2px; }

/* botões magnéticos: o JS move-os com translate/scale próprios */
.mag { will-change: translate, scale; }

/* ── Secções claras e escuras que seguem o hero ─────────────────────────── */
.eq-steps { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ── Responsivo ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .eq-hero { min-height: auto; }
  .eq-hero__in { grid-template-columns: 1fr; }
  .eq-hero h1 { max-width: none; }
  .eq-float { height: 380px; }
  .eq-grid { grid-template-columns: 1fr; }
  .eq-card, .eq-card--w { grid-column: auto; min-height: 320px; }
  .eq-art, .eq-card--w .eq-art { width: 46%; height: 52%; }
  .eq-stage { grid-template-columns: 1fr; }
  .eq-view { aspect-ratio: 16 / 11; }
  .eq-sheet { padding: .9rem 1rem 1.1rem; border-radius: 24px; }
}
@media (max-width: 560px) {
  .eq-names li:nth-child(n+5) { display: none; }
  .eq-dock { height: 84px; }
  .eq-d { width: 46px; height: 46px; }
}

/* ── Movimento reduzido: o vidro fica, as molas e a deriva não ──────────── */
@media (prefers-reduced-motion: reduce) {
  .eq-bg i, .eq-tile > .glass, .eq-tile img { animation: none; }
  .eq-card, .eq-float { transition: none; }
}

/* ── Ajuste de layout dos cartões: o arte nunca cobre o texto ─────────────── */
.eq-card--w h3, .eq-card--w .eq-card__p, .eq-card--w .eq-names { max-width: 46%; }
.eq-card--w .eq-art { width: 46%; height: 74%; right: 1.2rem; top: 1.2rem; }
.eq-card:not(.eq-card--w) .eq-art { position: relative; right: auto; top: auto; order: -1; width: 100%; height: 118px; margin: 0 0 .9rem; display: flex; justify-content: center; align-items: center; gap: 1.1rem; }
.eq-card:not(.eq-card--w) .eq-art img:nth-child(n) { position: static; width: auto; height: 100%; max-width: 32%; }
@media (max-width: 900px) {
  .eq-card--w h3, .eq-card--w .eq-card__p, .eq-card--w .eq-names { max-width: none; }
  .eq-card--w .eq-art { position: relative; right: auto; top: auto; order: -1; width: 100%; height: 118px; margin: 0 0 .9rem; display: flex; justify-content: center; align-items: center; gap: 1.1rem; }
  .eq-card--w .eq-art img:nth-child(n) { position: static; width: auto; height: 100%; max-width: 32%; }
  .eq-card, .eq-card--w { min-height: 0; }
}

.eq-names { margin-bottom: 1.2rem; }

.eq-art img { height: auto; }
