/* Home + Cinema — Clinical Lumen */
body.page-home { padding-top: 0; }

#cinema {
  position: relative;
  height: 760vh;
  color: #f5f1ea;
  background: #0c0f13;
}
.cinema-pin {
  position: sticky;
  /* Abaixo da nav fixa — evita cortar cabeça/rosto no topo */
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  height: calc(100svh - var(--nav-h));
  overflow: hidden;
}
#cine-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.cinema-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse at center, transparent 55%, rgba(5, 7, 9, 0.55) 100%),
    linear-gradient(180deg, rgba(12, 15, 19, 0.55) 0%, transparent 22%, transparent 72%, rgba(12, 15, 19, 0.6) 100%);
}
.cinema-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
.scene {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0 clamp(1.25rem, 6vw, 6rem);
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* cliques passam aos dots; só .scene__box captura */
}
/* Primeira cena visível desde o load (antes do 1º scroll) */
#scene-1 {
  opacity: 1;
  visibility: visible;
}
.scene__box {
  max-width: 40rem;
  pointer-events: auto;
}
.scene--center { justify-content: center; text-align: center; }
.scene--right { justify-content: flex-end; }
.scene--right .scene__box { text-align: right; }
.scene .overline {
  color: var(--petrol-bright);
  margin-bottom: 1.1rem;
}
.scene h1,
.scene h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-size: clamp(2.1rem, 5.2vw, 4.2rem);
  text-shadow: 0 2px 40px rgba(5, 7, 9, 0.7);
  color: #f5f1ea;
}
.scene p.lead {
  margin-top: 1.4rem;
  font-size: clamp(0.98rem, 1.4vw, 1.15rem);
  color: rgba(245, 241, 234, 0.88);
  max-width: 34rem;
  text-shadow: 0 1px 20px rgba(5, 7, 9, 0.8);
}
.scene--right .scene__box p.lead { margin-left: auto; }
.scene--center .scene__box p.lead { margin-left: auto; margin-right: auto; }
.scene .btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.scene--center .btn-row { justify-content: center; }
.scene--right .btn-row { justify-content: flex-end; }
.scene .btn-ghost {
  background: rgba(245, 241, 234, 0.06);
  border-color: rgba(245, 241, 234, 0.28);
  color: #f5f1ea;
}
.scene .btn-ghost:hover { border-color: rgba(245, 241, 234, 0.6); }
.scene__note {
  margin-top: 1.6rem;
  font-size: 0.8rem;
  color: rgba(245, 241, 234, 0.6);
}
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  pointer-events: none;
}
.scroll-hint::after {
  content: "";
  width: 1px;
  height: 2.4rem;
  background: linear-gradient(180deg, var(--petrol-bright), transparent);
  animation: hint 2s ease-in-out infinite;
}
@keyframes hint {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}
.cine-progress {
  position: absolute;
  right: clamp(0.75rem, 2.5vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  z-index: 30;
  pointer-events: auto;
}
.cine-dot {
  appearance: none;
  border: 0;
  padding: 0.45rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 999px;
  transition: transform 0.25s ease;
}
.cine-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(245, 241, 234, 0.3);
  box-shadow: 0 0 0 1px rgba(245, 241, 234, 0.12);
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}
.cine-dot:hover::before,
.cine-dot:focus-visible::before {
  background: rgba(245, 241, 234, 0.7);
  transform: scale(1.35);
}
.cine-dot:focus-visible {
  outline: 2px solid var(--petrol-bright);
  outline-offset: 2px;
}
.cine-dot.on::before {
  background: var(--petrol-bright);
  transform: scale(1.55);
  box-shadow: 0 0 0 3px rgba(63, 182, 196, 0.28);
}
.cinema-loader {
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  z-index: 6;
  background: rgba(245, 241, 234, 0.08);
  pointer-events: none;
  transition: opacity 0.6s;
}
.cinema-loader i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--petrol-bright);
  transition: width 0.3s;
}

#chapters-static { display: none; }
.chapter {
  position: relative;
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: flex-end;
  padding: 4.5rem clamp(1.25rem, 6vw, 4rem);
  background-size: cover;
  background-position: center top;
  color: #f5f1ea;
}
.chapter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 15, 19, 0.35) 0%, rgba(12, 15, 19, 0.15) 45%, rgba(12, 15, 19, 0.88) 100%);
}
.chapter > div { position: relative; max-width: 36rem; }
.chapter h1,
.chapter h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 7.5vw, 3rem);
  color: #f5f1ea;
}
.chapter p.lead { margin-top: 1rem; color: rgba(245, 241, 234, 0.9); }
.chapter .btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.5rem; }
.chapter .btn-ghost {
  background: rgba(245, 241, 234, 0.06);
  border-color: rgba(245, 241, 234, 0.28);
  color: #f5f1ea;
}

html.no-cinema #cinema { display: none; }
html.no-cinema #chapters-static { display: block; }

.home-after {
  background: var(--bg);
  color: var(--ink);
}
.marquee {
  border-block: 1px solid #d5e8eb;
  background: rgba(15, 106, 117, 0.05);
  overflow: hidden;
  padding: 0.95rem 0;
  user-select: none;
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}
.marquee__track span {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(15, 106, 117, 0.75);
  font-weight: 600;
  padding-right: 2rem;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.diff-item {
  border-top: 1px solid var(--line);
  padding-top: 1.35rem;
}
.diff-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}
.diff-item p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 768px) {
  .scene {
    align-items: flex-end;
    padding: 0 1.15rem 5.5rem;
  }
  .scene--right { justify-content: flex-start; }
  .scene--right .scene__box { text-align: left; }
  .scene--center { justify-content: flex-start; text-align: left; }
  .scene--center .scene__box p.lead,
  .scene--center .btn-row { margin-left: 0; margin-right: 0; justify-content: flex-start; }
  .scene h1,
  .scene h2 { font-size: clamp(1.65rem, 7.5vw, 2.35rem); }
  .scene p.lead { font-size: 0.95rem; max-width: 28rem; }
  .scene .btn-row { margin-top: 1.25rem; gap: 0.55rem; }
  .scene .btn-row .btn { font-size: 0.78rem; padding: 0.65rem 0.95rem; }
  .cine-progress {
    right: 0.65rem;
    gap: 0.28rem;
  }
  .cine-dot {
    width: 2.4rem;
    height: 2.4rem;
  }
  .cine-dot::before {
    width: 0.42rem;
    height: 0.42rem;
  }
  .scroll-hint {
    bottom: 1.1rem;
    font-size: 0.62rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .scroll-hint::after { animation: none; }
}
