/* ═══════════ 9 · PRELOADER ═══════════ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .8s ease, visibility .8s
}

#preloader.done {
  opacity: 0;
  visibility: hidden
}

.pre-inner {
  text-align: center;
  width: min(320px, 72vw)
}

.pre-logo {
  margin-bottom: 2rem;
  justify-content: center
}

.pre-logo .logo-img {
  height: 34px
}

.pre-bar {
  height: 1px;
  background: #2a2a30;
  overflow: hidden
}

.pre-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--brand);
  transition: width .2s ease
}

.pre-label {
  margin-top: 1rem;
  font-size: .68rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--white-dim)
}

/* ═══════════ 1 · SCROLL STAGE (hero) ═══════════ */
#scrollStage {
  height: 460vh;
  position: relative;
  padding: 0
}

.stage-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--black)
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block
}

.stage-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.stage-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
  pointer-events: none;
  opacity: 1;
  z-index: 2;
}

.stage-text h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 1.05;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .7)
}

.stage-text h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.08;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .7)
}

.stage-text .lead {
  margin-top: 1.6rem;
  color: var(--white);
  font-size: clamp(.9rem, 1.4vw, 1.1rem);
  letter-spacing: .05em;
  max-width: 42rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.84), 0 0 12px rgba(0, 0, 0, 0.5);
}

@keyframes hint {
  to {
    top: 110%;
  }
}

.stage-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #ffe6c2 0%, var(--amber) 34%, rgba(7, 7, 8, 0) 74%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* ── 12.2 Íris de diafragma — transição do hero para Serviços ── */
#scrollStage+#servicos {
  --iris-k: 1;
  isolation: isolate;
}

#scrollStage+#servicos::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle calc(var(--iris-k) * 78vh) at 50% calc(58vh - 100%),
      rgba(255, 214, 170, calc(.20 * (1 - var(--iris-k)) + .05)) 0%,
      rgba(254, 80, 0, calc(.16 * (1 - var(--iris-k)) + .04)) 42%,
      rgba(7, 7, 8, 0) 72%);
  opacity: calc(.35 + .65 * (1 - var(--iris-k)));
  transition: none;
}

#scrollStage+#servicos>* {
  position: relative;
  z-index: 1;
}
