/* Hero Cuidado Digital Tech Provider */

:root {
  --azul: #060c29;
  --laranja: #ff7a00;
  --texto: #f4f6ff;

  --marca-w-ref: 280px;
  --simbolo: 64px;
  --item-w: 10rem;
  --item-h: calc(var(--simbolo) + 3.6rem);
  --margem: clamp(0.5rem, 2.5vw, 2rem);
  --anel-gap: clamp(0.5rem, 1.5vw, 1.5rem);
  --percurso: 150vh;
  --flutuacao: 10px;
}

@media (max-width: 640px) {
  :root {
    --marca-w-ref: 200px;
    --simbolo: 48px;
    --item-w: 5.75rem;
    --item-h: calc(var(--simbolo) + 4rem);
    --percurso: 100vh;
    --flutuacao: 7px;
  }
}

@supports (height: 1svh) {
  :root { --percurso: 150svh; }
  @media (max-width: 640px) { :root { --percurso: 100svh; } }
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--azul);
  color: var(--texto);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Seção e cena ---------- */

.hero { position: relative; width: 100%; }

/* Espaço de rolagem real só quando há produtos e JavaScript para animá-los. */
.js .hero--orbita { height: calc(100vh + var(--percurso)); }
@supports (height: 1svh) {
  .js .hero--orbita { height: calc(100svh + var(--percurso)); }
}

.hero__cena {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--azul);
  /* Reserva caso o vídeo não carregue: campo de estrelas discreto. */
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255, 255, 255, .75), transparent 60%),
    radial-gradient(1px 1px at 27% 78%, rgba(255, 255, 255, .55), transparent 60%),
    radial-gradient(1.5px 1.5px at 41% 12%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1px 1px at 63% 86%, rgba(255, 255, 255, .5), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 30%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(1px 1px at 90% 64%, rgba(255, 255, 255, .55), transparent 60%),
    radial-gradient(ellipse at 50% 50%, #0d1a4d 0%, var(--azul) 70%);
}
@supports (height: 1svh) { .hero__cena { height: 100svh; } }

.hero__video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  pointer-events: none;
}
.hero--sem-video .hero__video { display: none; }

/* Halo: realce quente e suave atrás da marca + vinheta para leitura dos nomes. */
.hero__halo {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 22rem 9rem at 50% 50%, rgba(255, 122, 0, .14), rgba(255, 122, 0, 0) 70%),
    radial-gradient(ellipse at 50% 50%, rgba(6, 12, 41, 0) 40%, rgba(6, 12, 41, .55) 100%);
}

/* ---------- Marca central ---------- */

.hero__marca {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  margin: 0;
  width: min(var(--marca-w-ref), calc(100vw - 2 * var(--item-w) - 4 * var(--margem)));
  min-width: min(140px, 90vw);
  line-height: 0;
  transform: translate(-50%, -50%);
}
.hero--vazia .hero__marca { width: min(var(--marca-w-ref), 86vw); }

.hero__marca img {
  display: block;
  width: 100%;
  height: auto;
  animation: hero-flutuar 6s ease-in-out infinite;
  will-change: transform;
}

@keyframes hero-flutuar {
  0%, 100% { transform: translate3d(0, calc(var(--flutuacao) * -1), 0); }
  50% { transform: translate3d(0, var(--flutuacao), 0); }
}

/* ---------- Órbitas ---------- */

.hero__cena {
  --orbita-rx: calc(min(640px, 50vw - var(--item-w) / 2 - var(--margem)) * 0.92);
  --orbita-ry: calc(min(400px, 50vh - var(--item-h) / 2 - var(--margem)) * 0.92);
}
@supports (height: 1svh) {
  .hero__cena { --orbita-ry: calc(min(400px, 50svh - var(--item-h) / 2 - var(--margem)) * 0.92); }
}

.orbita__trilha,
.orbita__item {
  --rx: calc(var(--orbita-rx) - var(--anel, 0) * (var(--item-w) + var(--anel-gap)));
  --ry: calc(var(--orbita-ry) - var(--anel, 0) * (var(--item-h) + var(--anel-gap)));
}

.orbita__trilhas { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.orbita__trilha {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(2 * var(--rx));
  height: calc(2 * var(--ry));
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbita { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.orbita__lista { margin: 0; padding: 0; list-style: none; }

.orbita__item {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  justify-content: center;
  width: var(--item-w);
  /* Posição inicial (sem JS); hero.js substitui por valores medidos. */
  transform: translate(calc(var(--cx) * var(--rx)), calc(var(--cy) * var(--ry))) translate(-50%, -50%);
  will-change: transform;
}

.produto {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  max-width: 100%;
  padding: .375rem .375rem .5rem;
  border-radius: .75rem;
  color: var(--texto);
  text-align: center;
  text-decoration: none;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.produto__simbolo {
  display: block;
  flex: none;
  width: var(--simbolo);
  height: var(--simbolo);
}
.produto__simbolo picture,
.produto__simbolo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .25s ease;
}

.produto__nome {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .01em;
  overflow-wrap: break-word;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85), 0 0 12px rgba(6, 12, 41, .9);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  transition: color .2s ease;
}

.produto:hover .produto__nome,
.produto:focus-visible .produto__nome { color: var(--laranja); }
.produto:hover .produto__simbolo img { transform: scale(1.08); }

.produto:focus { outline: none; }
.produto:focus-visible {
  outline: 3px solid var(--laranja);
  outline-offset: 2px;
  background: rgba(6, 12, 41, .72);
  box-shadow: 0 0 0 6px rgba(255, 122, 0, .2);
}

@media (max-width: 640px) {
  .produto { gap: .375rem; padding: .3125rem; }
  .produto__nome { font-size: .8125rem; }
}

/* ---------- Movimento reduzido ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .hero--orbita { height: auto; }
  .hero__marca img { animation: none; }
  .produto__simbolo img, .produto__nome { transition: none; }
  .produto:hover .produto__simbolo img { transform: none; }
  /* Sem JS não há como pausar o vídeo: mostra só o cenário de reserva. */
  html:not(.js) .hero__video { display: none; }
}
