/* ============================================================
   HERO COM A RODA DOS OFÍCIOS (V5, 27 set 2026)
   Substitui o hero antigo (cena do site a ser construído) e a roda que vinha a seguir.
   Seis ofícios numa roda 3D: o scroll roda-a com a secção presa, a frase do H1 completa-se
   com cada ofício, as cores mudam, "Saber mais" segue o ofício da frente.
   Só na página inicial; o JS está em assets/js/hero-roda.js. Tudo com o prefixo .hx.
   ============================================================ */
@property --c1 { syntax: '<color>'; inherits: true; initial-value: #FF5500; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #FF2878; }

.hx {
  --c1: #FF5500; --c2: #FF2878;
  --hx-ease: cubic-bezier(.22, 1, .36, 1);
  position: relative; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate;
}
.hx-bg { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.hx-bg i { position: absolute; inset: -10%; opacity: 0; transition: opacity .9s var(--hx-ease); will-change: opacity;
  background:
    radial-gradient(42% 48% at 72% 52%, color-mix(in srgb, var(--b1) 34%, transparent), transparent 72%),
    radial-gradient(38% 42% at 88% 18%, color-mix(in srgb, var(--b2) 30%, transparent), transparent 72%),
    radial-gradient(32% 38% at 12% 90%, color-mix(in srgb, var(--b2) 18%, transparent), transparent 72%); }
.hx-bg i.is-on { opacity: 1; }
.hx-grain { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hx-ghost { position: absolute; left: 50%; top: 50%; z-index: -1; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(120px, 24vw, 380px); letter-spacing: -.05em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .06); transition: opacity .5s var(--hx-ease); will-change: opacity, transform; }

.hx-in { position: relative; height: 100%; max-width: 1360px; margin: 0 auto; padding: 96px var(--gutter) 28px;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-rows: 1fr auto; column-gap: 24px; }

/* ── texto ── */
.hx-copy { align-self: center; position: relative; z-index: 3; }
.hx-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 5px 12px; border-radius: var(--r-pill, 99px); border: 1px solid var(--nav-hair); background: var(--nav-soft);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); }
.hx-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--gradient); box-shadow: 0 0 12px var(--c1); }
.hx-title { margin: 22px 0 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -.035em; line-height: .98; font-size: clamp(38px, 4.6vw, 72px); color: var(--text); }
.hx-lead { display: block; }
.hx-words { position: relative; display: block; height: 2.02em; margin-top: .04em; overflow: hidden; }
.hx-word { position: absolute; left: 0; top: 0; width: 100%; display: block; transform: translateY(105%); opacity: 0;
  transition: transform .75s var(--hx-ease), opacity .28s ease; }
.hx-word.is-on { transform: none; opacity: 1; transition: transform .75s var(--hx-ease), opacity .6s var(--hx-ease) .12s; }
.hx-word.is-up { transform: translateY(-105%); opacity: 0; }
.hx-word em { font-style: normal; background: linear-gradient(120deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hx-desc { position: relative; height: 3.3em; margin: 18px 0 0; max-width: 440px; font-size: 17px; line-height: 1.6; color: var(--text-muted); }
.hx-desc span { position: absolute; inset: 0; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--hx-ease), transform .5s var(--hx-ease); }
.hx-desc span.is-on { opacity: 1; transform: none; transition-delay: .15s; }
.hx-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hx .hx-more { box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--c1) 70%, transparent); }

/* ── palco da roda ── */
.hx-stage { position: relative; z-index: 2; perspective: 1500px; perspective-origin: 50% 40%; align-self: stretch;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 100%); }
.hx-tilt { position: absolute; inset: 0; transform-style: preserve-3d; }
.hx-floor { position: absolute; left: 50%; top: 76%; width: 78%; height: 90px; transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--c1) 40%, transparent), transparent 72%); opacity: .7; }
.hx-dev { position: absolute; left: 50%; top: 47%; will-change: transform, opacity; backface-visibility: hidden; }
.hx-body { position: relative; border-radius: 18px; padding: 6px; background: linear-gradient(160deg, rgba(255,255,255,.2), rgba(255,255,255,.04));
  border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .8); }
.hx-dev.is-on .hx-body { animation: hxFloat 5s ease-in-out infinite; }
@keyframes hxFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.hx-scr { position: relative; overflow: hidden; border-radius: 12px; background: #0b0d1c; }
.hx-scr img, .hx-scr video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.hx-scr::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.22) 48%, transparent 60%); transform: translateX(-130%); }
.hx-dev.is-on .hx-scr::after { animation: hxSheen 1.4s var(--hx-ease) .15s; }
@keyframes hxSheen { to { transform: translateX(130%); } }
.hx-dev--laptop { width: 500px; } .hx-dev--laptop .hx-scr { aspect-ratio: 16 / 10; }
.hx-dev--laptop .hx-body::after { content: ""; display: block; height: 10px; margin: 6px -16px -6px; border-radius: 0 0 14px 14px; background: linear-gradient(180deg, rgba(210,210,230,.4), rgba(120,120,150,.18)); }
.hx-dev--phone { width: 196px; } .hx-dev--phone .hx-body { border-radius: 32px; } .hx-dev--phone .hx-scr { aspect-ratio: 9 / 19; border-radius: 26px; }
.hx-dev--wide { width: 480px; } .hx-dev--wide .hx-scr { aspect-ratio: 16 / 9; }
.hx-dev--logo { width: 300px; } .hx-dev--logo .hx-scr { aspect-ratio: 1; background: #FDFAF4; color: #0E4C86; display: grid; place-items: center; align-content: center; gap: 12px; }
.hx-dev--logo svg { width: 52%; height: auto; fill: currentColor; }
.hx-dev--logo b { font-family: var(--font-display); font-size: 20px; letter-spacing: .01em; }
.hx-tag { position: absolute; left: 50%; bottom: -36px; transform: translateX(-50%); white-space: nowrap; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); }

/* pesquisa no Google feita em código (SEO) */
.hx-serp { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; padding: 18% 8% 0; background: #fff; color: #1f1f1f; font-family: var(--font); font-size: 9px; }
.hx-serp-g { display: flex; justify-content: center; gap: 4px; }
.hx-serp-g i { width: 8px; height: 8px; border-radius: 50%; background: #4285F4; }
.hx-serp-g i:nth-child(2) { background: #EA4335; } .hx-serp-g i:nth-child(3) { background: #FBBC05; } .hx-serp-g i:nth-child(4) { background: #34A853; }
.hx-serp-bar { display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 99px; box-shadow: 0 1px 6px rgba(32,33,36,.24); font-size: 9.5px; white-space: nowrap; }
.hx-serp-bar svg { width: 10px; height: 10px; flex: none; fill: none; stroke: #5f6368; stroke-width: 2.4; stroke-linecap: round; }
.hx-serp-q { overflow: hidden; }
.hx-serp-q::after { content: ""; display: inline-block; width: 1px; height: 1em; margin-left: 1px; vertical-align: -2px; background: #1a73e8; animation: hxCaret 1s steps(1) infinite; }
@keyframes hxCaret { 50% { opacity: 0; } }
.hx-serp-map { position: relative; height: 30%; border-radius: 9px; overflow: hidden; background: #e8efe3; }
.hx-serp-map i { position: absolute; background: #fff; }
.hx-serp-map i:nth-child(1) { left: -10%; right: -10%; top: 42%; height: 6px; transform: rotate(-8deg); }
.hx-serp-map i:nth-child(2) { top: -10%; bottom: -10%; left: 58%; width: 6px; transform: rotate(12deg); }
.hx-serp-map i:nth-child(3) { left: 10%; width: 70%; top: 78%; height: 3px; background: #a8c7fa; }
.hx-serp-pin { position: absolute; left: 50%; top: 20%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #EA4335; box-shadow: 0 3px 6px rgba(0,0,0,.25); }
.hx-serp-pin::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.hx-dev.is-on .hx-serp-pin { animation: hxDrop .9s var(--hx-ease) both; }
@keyframes hxDrop { from { translate: 0 -30px; opacity: 0; } }
.hx-serp-card { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 10px; border: 1px solid #e3e3e3; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.hx-serp-card b { font-size: 11.5px; color: #1a0dab; }
.hx-serp-card span { color: #4d5156; }
.hx-serp-card .ok { color: #188038; font-weight: 600; }
.hx-serp-btns { display: flex; gap: 4px; margin-top: 6px; }
.hx-serp-btns em { font-style: normal; padding: 3px 7px; border-radius: 99px; border: 1px solid #dadce0; color: #1a73e8; font-size: 8px; font-weight: 600; }
.hx-serp-btns em:first-child { background: #1a73e8; border-color: #1a73e8; color: #fff; }
.hx-serp-line { height: 6px; width: 90%; border-radius: 3px; background: #eceff1; }
.hx-serp-line + .hx-serp-line { width: 62%; margin-top: -3px; }

/* ── navegação dos ofícios ── */
.hx-nav { grid-column: 1 / -1; position: relative; z-index: 3; display: flex; align-items: center; gap: 18px; }
.hx-count { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--text-dim); white-space: nowrap; }
.hx-count b { color: var(--text); font-weight: 400; }
.hx-chips { display: flex; gap: 6px; flex: 1; }
.hx-chip { position: relative; flex: 1; min-width: 0; padding: 14px 4px 0; border: 0; background: none; cursor: pointer; text-align: left; color: var(--text-dim);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; transition: color .3s; }
.hx-chip::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; background: rgba(255,255,255,.12); }
.hx-chip i { position: absolute; left: 0; top: 0; height: 2px; width: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--c1), var(--c2)); transform-origin: left; transform: scaleX(0); }
.hx-chip:hover, .hx-chip.is-on { color: var(--text); }
.hx-chip span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-scroll { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); white-space: nowrap; }
.hx-mouse { width: 18px; height: 28px; border-radius: 10px; border: 1.5px solid var(--text-dim); position: relative; }
.hx-mouse::after { content: ""; position: absolute; left: 50%; top: 6px; width: 2px; height: 6px; margin-left: -1px; border-radius: 2px; background: var(--text); animation: hxWheel 1.8s var(--hx-ease) infinite; }
@keyframes hxWheel { 0% { opacity: 0; transform: translateY(-3px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(7px); } }

/* ── telemóvel e tablet ── */
@media (max-width: 899px) {
  .hx-stage { -webkit-mask-image: none; mask-image: none; perspective: 1100px; min-height: 0; }
  .hx-in { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; padding-top: 84px; padding-bottom: 18px; }
  .hx-copy { align-self: start; }
  .hx-title { margin-top: 14px; font-size: clamp(34px, 9.6vw, 54px); }
  .hx-desc { font-size: 14.5px; line-height: 1.5; height: 4.5em; margin-top: 10px; }
  .hx-eyebrow { font-size: 9.5px; letter-spacing: .12em; }
  .hx-cta { margin-top: 16px; }
  .hx-cta .btn-hero--ghost { display: none; }
  .hx-dev { top: 50%; }
  .hx-grain { display: none; }
  .hx-body { box-shadow: 0 24px 40px -16px rgba(0, 0, 0, .7); }
  .hx-ghost { font-size: 34vw; -webkit-text-stroke: 2px rgba(255, 255, 255, .08); }
  .hx-dev--laptop { width: 330px; } .hx-dev--wide { width: 310px; } .hx-dev--phone { width: 128px; } .hx-dev--logo { width: 200px; }
  .hx-tag { display: none; }
  .hx-scroll, .hx-count { display: none; }
  .hx-chip { padding-top: 10px; font-size: 9px; letter-spacing: .08em; }
}
@media (max-height: 700px) and (max-width: 899px) { .hx-desc { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .hx *, .hx *::before, .hx *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* V7 (29 set 2026): no aparelho do Google & Marca aparece a própria Solve & Promote, como na página google-e-marca */
.hx-serp-who { display: flex; align-items: center; gap: 8px; }
.hx-serp-who > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hx-serp-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #05060E; }
.hx-serp-ic svg { width: 72%; height: auto; }
.hx-serp-card--sp .hx-serp-btns { margin-top: 6px; }

/* V7 (29 set 2026): o Google & Marca passou a janela retangular (a roda alterna janela e telemóvel):
   pesquisa em cima, resultado à esquerda e mapa à direita */
.hx-dev--serp .hx-serp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto auto auto auto 1fr; gap: 7px 12px; padding: 5% 6% 0; }
.hx-dev--serp .hx-serp-g { grid-column: 1 / -1; justify-content: flex-start; }
.hx-dev--serp .hx-serp-bar { grid-column: 1 / -1; max-width: 72%; }
.hx-dev--serp .hx-serp-card { grid-column: 1; grid-row: 3; }
.hx-dev--serp .hx-serp-line { grid-column: 1; }
.hx-dev--serp .hx-serp-map { grid-column: 2; grid-row: 3 / 6; height: auto; min-height: 0; margin-bottom: 7%; }
@media (max-width: 899px) {
  .hx-dev--serp .hx-serp { gap: 5px 8px; font-size: 7px; }
  .hx-dev--serp .hx-serp-bar { padding: 5px 7px; font-size: 7.5px; }
  .hx-dev--serp .hx-serp-card { padding: 6px 7px; }
  .hx-dev--serp .hx-serp-card b { font-size: 9px; }
  .hx-dev--serp .hx-serp-ic { width: 22px; height: 22px; border-radius: 6px; }
  .hx-dev--serp .hx-serp-btns em { font-size: 6.5px; padding: 2px 5px; }
  .hx-dev--serp .hx-serp-line { display: none; }
}

/* V7 (3 out 2026): a roda deixou de rodar com o scroll (críticas de quem não queria ser obrigado a fazer scroll
   pelo hero para ver o resto do site). Roda com estas setas, que ficam no mesmo sítio do palco, e no telemóvel
   também com o dedo (o JS trata do deslizar; a página continua a fazer scroll na vertical). */
.hx-stage { touch-action: pan-y; grid-column: 2; grid-row: 1; }
.hx-nav { grid-row: 2; }
.hx-arrows { grid-column: 2; grid-row: 1; position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between;
  padding: 0 2%; pointer-events: none; }
.hx-arrow { pointer-events: auto; position: relative; display: grid; place-items: center; width: 58px; height: 58px; padding: 0; border: 0; border-radius: 50%;
  cursor: pointer; color: var(--text); background: rgba(10, 12, 28, .55);
  box-shadow: inset 0 0 0 1px var(--nav-hair), 0 14px 34px -12px color-mix(in srgb, var(--c1) 75%, transparent);
  -webkit-tap-highlight-color: transparent; transition: transform .35s var(--hx-ease), box-shadow .35s var(--hx-ease); }
/* aro com o gradiente do ofício da frente */
.hx-arrow::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: linear-gradient(135deg, var(--c1), var(--c2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.hx-arrow svg { position: relative; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .35s var(--hx-ease); }
.hx-arrow:hover { transform: scale(1.07); box-shadow: inset 0 0 0 1px var(--nav-hair), 0 18px 40px -10px color-mix(in srgb, var(--c1) 90%, transparent); }
.hx-arrow--prev:hover svg { transform: translateX(-2px); }
.hx-arrow--next:hover svg { transform: translateX(2px); }
.hx-arrow:active { transform: scale(.94); }
.hx-arrow:focus-visible { outline: 2px solid var(--c2); outline-offset: 4px; }
.hx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 899px) {
  .hx-stage { grid-column: 1; grid-row: 2; }
  .hx-nav { grid-row: 3; }
  .hx-arrows { grid-column: 1; grid-row: 2; padding: 0; margin: 0 -6px; }
  .hx-arrow { width: 46px; height: 46px; background: rgba(10, 12, 28, .7); }
  .hx-arrow svg { width: 19px; height: 19px; }
}

/* 3 out 2026: as janelas da roda são clicáveis (levam à página do serviço); sem arrastar imagens nem selecionar
   texto ao deslizar */
.hx-stage { -webkit-user-select: none; user-select: none; }
.hx-dev { cursor: pointer; }
.hx-dev img, .hx-dev video { -webkit-user-drag: none; pointer-events: none; }
