/* ============================================================================
   Holemberg — scroll-story.css
   Estilos do componente de experiência de scroll (prefixo hs-).
   Os tokens de cor/fonte vêm de main.css (:root).
   ========================================================================== */

.hs-root { position: relative; z-index: 1; background: var(--bg); }

/* track em fluxo: é ele que gera a altura de scroll da seção */
.hs-track { width: 100%; pointer-events: none; }

/* ---- camadas fixas ------------------------------------------------------ */
.hs-stage {
  position: fixed; inset: 0; z-index: 5;
  pointer-events: none; opacity: 0;      /* a engine controla a opacidade */
  background: var(--bg);
}
.hs-canvas, .hs-video, .hs-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.hs-video { z-index: 1; }
.hs-stage.has-video .hs-poster { opacity: 0; }

/* vinheta + grão: profundidade e textura cinematográfica discretas */
.hs-vignette {
  position: absolute; inset: 0; z-index: 2;
  background: radial-gradient(120% 90% at 50% 42%, transparent 55%, rgba(4, 6, 8, 0.55) 100%);
}
.hs-grain {
  position: absolute; inset: 0; z-index: 3; opacity: 0.05;
  mix-blend-mode: overlay;
  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='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* scrim de legibilidade atrás da copy (desktop: da esquerda; mobile: de baixo) */
.hs-copylayer { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.hs-copylayer::before {
  content: ""; position: absolute; inset: 0;
  width: min(60vw, 820px);
  background: linear-gradient(90deg,
    rgba(9, 12, 15, 0.92) 0%,
    rgba(9, 12, 15, 0.72) 34%,
    rgba(9, 12, 15, 0.32) 62%,
    transparent 100%);
}

/* ---- copy das cenas ------------------------------------------------------ */
.hs-copy {
  position: absolute;
  left: clamp(20px, 5vw, 72px);
  top: 50%;
  transform: translateY(-50%);
  width: min(44vw, 520px);
  opacity: 0;                             /* a engine controla opacidade/transform/filter */
  will-change: opacity, transform;
}
.hs-copy__num {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.74rem; letter-spacing: 0.14em; color: var(--ink-soft);
}
.hs-copy__eyebrow {
  display: block; margin-top: 16px;
  font-weight: 600; font-size: 0.78rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold);
}
.hs-copy__title {
  font-family: var(--font-display);
  font-weight: 600; font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.06; letter-spacing: -0.01em;
  margin: 12px 0 0; color: var(--ink);
}
.hs-copy__body {
  margin-top: 18px;
  font-size: clamp(1rem, 1.2vw, 1.13rem); line-height: 1.6;
  color: var(--ink-soft); max-width: 42ch;
}

/* pills de serviços (cena 4) */
.hs-pills {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px;
  margin: 26px 0 0; padding: 0;
}
.hs-pill {
  font-size: 0.86rem; font-weight: 500; color: var(--ink);
  padding: 9px 16px; border-radius: 999px;
  background: rgba(23, 29, 34, 0.72);
  border: 1px solid rgba(185, 151, 91, 0.28);
  backdrop-filter: blur(6px);
  opacity: 0;                             /* a engine controla a entrada escalonada */
}

/* cartão de liderança (cena 5) */
.hs-card {
  display: flex; align-items: center; gap: 16px;
  margin: 26px 0 0; padding: 14px 18px 14px 14px;
  width: fit-content; max-width: 100%;
  background: rgba(23, 29, 34, 0.66);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}
.hs-card__photo {
  position: relative; width: 64px; height: 80px; flex: 0 0 auto;
  border-radius: 9px; overflow: hidden;
  background: linear-gradient(160deg, #1c232a, #12171c);
  border: 1px solid rgba(185, 151, 91, 0.22);
  display: grid; place-items: center;
}
.hs-card__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hs-card__mono {
  font-family: var(--font-display); font-size: 1.9rem; color: var(--gold);
}
.hs-card figcaption { display: flex; flex-direction: column; gap: 3px; }
.hs-card strong { font-size: 0.98rem; font-weight: 600; color: var(--ink); }
.hs-card em { font-style: normal; font-size: 0.82rem; color: var(--ink-soft); }

/* CTAs da última cena */
.hs-copy__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; pointer-events: auto; }
.hs-btn {
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 14px 26px; border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.hs-btn--primary { color: #16130c; background: var(--gold); }
.hs-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(185, 151, 91, 0.28); }
.hs-btn--ghost { color: var(--ink); border: 1px solid rgba(237, 241, 243, 0.22); }
.hs-btn--ghost:hover { transform: translateY(-2px); border-color: rgba(237, 241, 243, 0.45); }

/* ---- route rail (navegação por cenas) ----------------------------------- */
.hs-rail {
  position: fixed; right: clamp(14px, 2.4vw, 30px); top: 50%; z-index: 40;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 20px; padding: 16px 8px;
}
.hs-rail::before {
  content: ""; position: absolute; left: 50%; top: 20px; bottom: 20px;
  width: 1px; transform: translateX(-50%);
  background: rgba(185, 151, 91, 0.25);
}
.hs-rail__dot {
  position: relative; border: 0; background: transparent; cursor: pointer;
  width: 14px; height: 14px; display: grid; place-items: center; padding: 0;
}
.hs-rail__dot i {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(185, 151, 91, 0.35);
  transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
}
.hs-rail__dot:hover i { transform: scale(1.3); background: var(--gold); }
.hs-rail__dot.is-active i {
  background: var(--gold); transform: scale(1.35);
  box-shadow: 0 0 0 5px rgba(185, 151, 91, 0.18);
}
.hs-rail__label {
  position: absolute; right: 22px; top: 50%;
  transform: translateY(-50%) translateX(6px);
  white-space: nowrap; font-size: 0.76rem; font-weight: 500; color: var(--ink);
  background: rgba(17, 22, 26, 0.88); backdrop-filter: blur(6px);
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.hs-rail__dot:hover .hs-rail__label,
.hs-rail__dot.is-active .hs-rail__label { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ---- hint de scroll ------------------------------------------------------ */
.hs-hint {
  position: fixed; left: 50%; bottom: 26px; z-index: 30;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft); opacity: 0; pointer-events: none;
}
.hs-hint i {
  width: 22px; height: 34px; border-radius: 12px;
  border: 1.5px solid rgba(237, 241, 243, 0.25); position: relative;
}
.hs-hint i::after {
  content: ""; position: absolute; left: 50%; top: 7px;
  width: 3px; height: 7px; border-radius: 2px; background: var(--gold);
  transform: translateX(-50%);
  animation: hs-wheel 1.8s ease-in-out infinite;
}
@keyframes hs-wheel {
  0% { opacity: 0; top: 6px; } 40% { opacity: 1; } 100% { opacity: 0; top: 17px; }
}

/* ---- mobile -------------------------------------------------------------- */
@media (max-width: 860px) {
  .hs-copylayer::before {
    width: 100%; height: 62%; top: auto; bottom: 0;
    background: linear-gradient(0deg,
      rgba(9, 12, 15, 0.95) 8%,
      rgba(9, 12, 15, 0.66) 46%,
      transparent 100%);
  }
  /* copy ancorada embaixo, livre do home indicator e da URL bar */
  .hs-copy {
    left: clamp(18px, 5vw, 64px); right: clamp(18px, 5vw, 64px);
    top: auto; bottom: calc(clamp(56px, 12dvh, 110px) + env(safe-area-inset-bottom));
    transform: none; width: auto; max-width: 560px;
  }
  .hs-copy__title { font-size: clamp(1.7rem, 7vw, 2.5rem); }
  .hs-copy__body { max-width: none; }
  .hs-hint { bottom: calc(16px + env(safe-area-inset-bottom)); }
  .hs-rail { right: 6px; gap: 14px; }
  .hs-rail__label { display: none; }
}
@media (hover: none) and (pointer: coarse) {
  .hs-rail__dot { width: 26px; height: 26px; }
  .hs-btn { padding: 15px 26px; }
}

/* ---- modo estático (reduced-motion / baixo desempenho) -------------------
   As mesmas cenas, textos e CTAs, empilhados em fluxo normal. Sem pin,
   sem scrub, sem canvas. */
.hs-static { background: linear-gradient(180deg, #0b0e11, #10151a 40%, #0b0e11); }
.hs-static__intro {
  text-align: center; padding: clamp(70px, 12vh, 130px) 24px 0;
}
.hs-static__scene {
  display: grid; place-items: center;
  padding: clamp(48px, 9vh, 100px) 24px;
}
.hs-static .hs-copy {
  position: static; transform: none; filter: none;
  width: auto; max-width: 640px; opacity: 1;
  text-align: center; margin: 0 auto;
}
.hs-static .hs-copy__body { margin-left: auto; margin-right: auto; }
.hs-static .hs-pills { justify-content: center; }
.hs-static .hs-pill { opacity: 1; transform: none; }
.hs-static .hs-card { margin-left: auto; margin-right: auto; text-align: left; }
.hs-static .hs-copy__cta { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .hs-hint i::after { animation: none; }
}


/* copy ampliada (cena de liderança — sem cartão) */
.hs-copy--big { width: min(52vw, 660px); }
.hs-copy--big .hs-copy__title { font-size: clamp(2.3rem, 5vw, 4rem); }
.hs-copy--big .hs-copy__body { font-size: clamp(1.1rem, 1.5vw, 1.35rem); max-width: 46ch; }
@media (max-width: 860px) {
  .hs-copy--big { width: auto; }
  .hs-copy--big .hs-copy__title { font-size: clamp(1.9rem, 8vw, 2.8rem); }
}
