.cinema-hero {
  height: calc(100vh + var(--cinema-distance, 7560px));
  height: calc(100svh + var(--cinema-distance, 7560px));
  background: #141712;
  position: relative;
}
.cinema-stage {
  height: 100vh;
  height: 100svh;
  min-height: 0;
  position: sticky;
  top: 0;
  overflow: hidden;
  isolation: isolate;
  color: #fbfaf5;
  background: #141712;
}
.cinema-layers,
.cinema-layer,
.cinema-layer video,
.cinema-poster,
.cinema-end,
.cinema-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cinema-layers {
  z-index: -2;
}
.cinema-layer {
  will-change: opacity;
}
.cinema-layer video,
.cinema-poster,
.cinema-end {
  object-fit: cover;
  object-position: center;
  max-width: none;
  transform: none;
}
.cinema-layer video {
  opacity: 0;
}
.cinema-layer video.has-frame {
  opacity: 1;
}
.cinema-end {
  opacity: 0;
  pointer-events: none;
}
.cinema-shade {
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(0deg, #0008, transparent 24%, transparent 76%, #0003),
    linear-gradient(90deg, rgba(0, 0, 0, var(--shade, 0.35)), transparent);
}
.cinema-copy {
  position: absolute;
  left: 64px;
  top: 31%;
  width: min(780px, calc(100% - 128px));
  text-shadow: 0 2px 16px #0005;
}
.cinema-copy .eyebrow,
.cinema-closing .eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #eee4d0;
}
.cinema-copy h1 {
  font-size: clamp(32px, 3.5vw, 56px);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -1.2px;
  color: #fbfaf5;
}
.cinema-copy > p {
  color: #fff;
  font-size: 16px;
  margin-top: 20px;
}
.cinema-copy .hero-edi-access {
  margin-top: 28px;
}
.cinema-top {
  position: absolute;
  top: 110px;
  left: 64px;
  right: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cinema-top a,
.cinema-top button {
  font:
    400 11px/18px Quatro,
    Arial,
    sans-serif;
  letter-spacing: 0.4px;
  color: white;
  border: 0;
  background: #0003;
  border-radius: 24px;
  padding: 10px 16px;
  min-height: 40px;
  text-decoration: none;
  backdrop-filter: blur(8px);
}
.cinema-bottom {
  position: absolute;
  bottom: 30px;
  left: 64px;
  right: 64px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.cinema-scroll.hero-scroll-cue {
  font:
    400 12px/13px Quatro,
    Arial,
    sans-serif;
  letter-spacing: normal;
  gap: 8px;
}
.cinema-scroll.hero-scroll-cue img {
  width: 12px;
  height: 13px;
}
.cinema-chapters {
  display: flex;
  gap: 20px;
}
.cinema-chapters button {
  color: #fffb;
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  padding: 12px 0;
  font-size: 11px;
  min-height: 44px;
}
.cinema-chapters button[aria-pressed="true"] {
  color: #fff;
  border-bottom-color: #dfd2b6;
}
.cinema-chapters small {
  margin-right: 7px;
  opacity: 0.6;
}
.cinema-note {
  font-size: 9px !important;
  color: #fffc !important;
  max-width: 180px;
  text-align: right;
  margin: 0 !important;
}
.cinema-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #ffffff20;
}
.cinema-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: #e5d7bb;
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}
.cinema-status {
  position: absolute;
  bottom: 94px;
  left: 64px;
  color: #fff;
  font-size: 11px;
  background: #0006;
  border-radius: 20px;
  padding: 6px 12px;
  pointer-events: none;
}
.cinema-status:empty {
  display: none;
}
.cinema-closing {
  position: absolute;
  top: 36%;
  left: 64px;
  opacity: 0;
}
.cinema-closing h2 {
  font-size: clamp(36px, 4.5vw, 72px);
  line-height: 1.08;
  color: #fff;
  font-weight: 400;
  letter-spacing: -1.5px;
  margin-top: 16px;
}
.cinema-closing p {
  color: #fff;
  margin-top: 24px;
}
.cinema-closing a {
  display: inline-flex;
  gap: 40px;
  color: #fff;
  border-bottom: 1px solid #fff8;
  padding: 14px 0;
  margin-top: 12px;
  font-size: 14px;
}
.cinema-hero :focus-visible {
  outline: 2px solid #fff;
  outline-offset: 5px;
}
.cinema-hero.cinema-manual {
  height: 100vh;
  height: 100svh;
}
.cinema-manual .cinema-stage {
  position: relative;
}
.cinema-manual .cinema-progress,
.cinema-manual .cinema-closing {
  display: none;
}
.cinema-manual video {
  display: none;
}
@media (max-width: 1000px) {
  .cinema-copy,
  .cinema-closing {
    left: 32px;
  }
  .cinema-copy {
    width: calc(100% - 64px);
  }
  .cinema-top,
  .cinema-bottom {
    left: 32px;
    right: 32px;
  }
  .cinema-note {
    display: none;
  }
  .cinema-chapters {
    gap: 16px;
  }
}
@media (max-width: 700px) {
  .cinema-copy,
  .cinema-closing {
    left: 24px;
    top: 26%;
    width: calc(100% - 48px);
  }
  .cinema-copy h1 {
    font-size: 32px;
  }
  .cinema-copy > p {
    font-size: 14px;
  }
  .cinema-top {
    top: 88px;
    left: 20px;
    right: 20px;
  }
  .cinema-top a,
  .cinema-top button {
    font-size: 10px;
    padding: 8px 10px;
  }
  .cinema-bottom {
    left: 24px;
    right: 24px;
    bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .cinema-chapters {
    gap: 16px;
  }
  .cinema-chapters button {
    font-size: 10px;
  }
  .cinema-copy .hero-quick-prompts {
    display: flex;
  }
  .cinema-status {
    left: 24px;
    bottom: 110px;
  }
  .cinema-closing h2 {
    font-size: 38px;
  }
}

/* Original soundtrack: explicit visitor activation, independent from frame seeking. */
.cinema-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cinema-top .cinema-music {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  white-space: nowrap;
}
.cinema-music .music-waves {
  display: none;
}
.cinema-music[aria-pressed="true"] .music-waves {
  display: block;
}
.cinema-music[aria-pressed="true"] .music-off {
  display: none;
}
.cinema-top .cinema-music[aria-pressed="true"] {
  background: #f1ede32b;
  box-shadow: inset 0 0 0 1px #f1ede360;
}
.cinema-soundtrack {
  display: none;
}
@media (max-width: 700px) {
  .cinema-top {
    gap: 6px;
  }
  .cinema-top-actions {
    gap: 6px;
  }
  .cinema-top .cinema-music {
    width: 40px;
    min-width: 40px;
    padding: 8px;
  }
  .cinema-music span {
    display: none;
  }
  .cinema-top .cinema-skip {
    font-size: 9px;
    padding: 8px;
  }
}

/* The mobile hero uses the same scroll timeline and full-bleed scenes. */
@media (max-width: 700px) {
  .cinema-layer video {
    pointer-events: none;
  }
  .cinema-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .cinema-chapters {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .cinema-copy h1 {
    font-size: clamp(26px, 7.5vw, 32px);
  }
  .cinema-copy .hero-edi-access {
    max-width: 100%;
  }
}
@media (max-width: 700px) and (max-height: 600px) {
  .cinema-copy,
  .cinema-closing {
    top: 30%;
  }
  .cinema-copy h1 {
    font-size: 24px;
  }
  .cinema-copy > p {
    margin-top: 10px;
  }
  .cinema-copy .hero-edi-access {
    margin-top: 12px;
  }
  .cinema-bottom {
    bottom: 12px;
    gap: 4px;
  }
}

@media (max-width: 700px) {
  .edi-is-floating .cinema-bottom {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  .edi-is-floating .cinema-status {
    bottom: 175px;
  }
}

/* Restore site navigation after the boat, and on leaving the cinematic route. */
:is(body, #portal-root) :is(body > header, #portal-root > header) {
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
:is(body, #portal-root)
  :is(body > header, #portal-root > header).cinema-header-hidden {
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  :is(body, #portal-root) :is(body > header, #portal-root > header) {
    transition: none;
  }
}

/* Mobile opens directly on the first scene and reserves navigation for the ending. */
@media (max-width: 700px) {
  body:has(.cinema-hero:not(.cinema-manual):not([data-complete="true"]))
    :is(body > header, #portal-root > header) {
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .cinema-copy .hero-edi-access {
    margin: 16px auto 0;
  }
  body:has(.cinema-hero) .floating-edi {
    left: 0;
    right: 0;
    margin-inline: auto;
    bottom: calc(36px + env(safe-area-inset-bottom, 0px));
  }
  .edi-is-floating .cinema-bottom {
    bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  }
  .edi-is-floating .cinema-status {
    bottom: 195px;
  }
}

/* The URL anchor is separate from the tall sticky scroll track. */
.cinema-start {
  display: block;
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  scroll-margin: 0;
  overflow-anchor: none;
}
.cinema-hero {
  overflow-anchor: none;
}

/* Hero synced to Figma 1019:27 / 1019:81 — 30 Oct 2026. */
.cinema-shade {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, var(--shade, 0.35)), transparent),
    linear-gradient(
      90deg,
      #0003 0%,
      transparent 24%,
      transparent 76%,
      #00000087 100%
    );
}
.cinema-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115.97412deg,
    rgba(24, 11, 2, 0.7),
    transparent 100.4%
  );
  opacity: var(--cinema-intro, 1);
}
.cinema-copy {
  text-shadow: none;
}
.cinema-copy .eyebrow {
  color: var(--gold);
  line-height: 18px;
  margin-bottom: 16px;
}
.cinema-copy > p {
  line-height: 24px;
}
.cinema-top a,
.cinema-top button {
  letter-spacing: 0;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.cinema-top .cinema-skip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  min-height: 42px;
}
.cinema-skip img {
  flex-shrink: 0;
  max-width: none;
  transform: scaleY(-1);
}
.cinema-top .cinema-music {
  padding: 13px 16px;
}
.cinema-music > svg {
  display: none;
}
.cinema-music[aria-pressed="true"] > svg {
  display: block;
}
.cinema-music[aria-pressed="true"] > .cinema-music-off {
  display: none;
}
.cinema-copy .hero-edi-form {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 1;
}
.cinema-copy .hero-edi-form input {
  text-overflow: ellipsis;
}
.cinema-copy .hero-edi-form button img {
  width: auto;
  height: auto;
}
.cinema-copy .hero-quick-prompts button {
  height: 44px;
  padding: 10px 14px;
}
.cinema-copy .hero-quick-prompts img {
  width: auto;
  height: auto;
}
.cinema-bottom {
  display: grid;
  grid-template-columns: minmax(140px, 24.24%) 1fr auto;
  gap: 8px;
  min-height: 44px;
}
.cinema-scroll.hero-scroll-cue {
  padding-bottom: 0;
}
.cinema-scroll.hero-scroll-cue img {
  transform: none;
}
.cinema-chapters {
  justify-content: center;
  align-items: center;
  gap: 20px;
}
.cinema-chapters button {
  position: relative;
  line-height: 22px;
  padding: 12px 0 11px;
  min-height: 45px;
  white-space: nowrap;
  border: 0;
  color: #fff;
  opacity: 0.72;
}
.cinema-chapters button[aria-pressed="true"] {
  opacity: 1;
}
.cinema-chapters button::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--card);
  opacity: 0;
}
.cinema-chapters button[aria-pressed="true"]::after {
  opacity: 1;
}
.cinema-chapters button:first-child {
  min-width: 125px;
  text-align: left;
}
.cinema-chapters small {
  font-size: inherit;
  opacity: 1;
  margin-right: 7px;
}
.cinema-note {
  color: #fff !important;
  white-space: nowrap;
  line-height: 24px;
}
@media (max-width: 1000px) and (min-width: 701px) {
  .cinema-bottom {
    grid-template-columns: 1fr 1fr;
  }
  .cinema-chapters {
    justify-content: flex-end;
  }
}
@media (max-width: 700px) {
  .cinema-shade::after {
    background: linear-gradient(
      97.51635deg,
      rgba(24, 11, 2, 0.7),
      transparent 100.4%
    );
  }
  .cinema-top .cinema-skip {
    width: 113px;
    padding: 12px 8px;
    border-radius: 30px;
  }
  .cinema-top .cinema-music {
    width: 45px;
    min-width: 45px;
    padding: 13px 11px;
    border-radius: 30px;
  }
  .cinema-copy .hero-edi-form {
    padding-left: 20px;
    padding-right: 22px;
  }
  .cinema-bottom {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-height: 79px;
    transform: translateY(12px);
  }
  .cinema-chapters {
    justify-content: flex-start;
    gap: 22px;
  }
  .cinema-hero[data-exploring="true"]:not(.cinema-manual) .cinema-chapters {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
  .cinema-hero[data-exploring="true"]:not(.cinema-manual) .hero-quick-prompts {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
  .cinema-note {
    display: none;
  }
}
@media (max-width: 370px) {
  .cinema-chapters {
    gap: 12px;
  }
  .cinema-chapters button:first-child {
    min-width: 110px;
  }
}
@media (max-width: 700px) and (min-height: 601px) and (max-height: 740px) {
  .cinema-copy {
    top: 21%;
  }
}
@media (max-width: 700px) and (max-height: 600px) {
  .cinema-bottom {
    min-height: 60px;
    gap: 4px;
  }
}

/* Mobile: original-video frames, loaded on demand, keep the poster until ready. */
.cinema-frames {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  opacity: 0;
  display: none;
}
.cinema-hero[data-render-mode="frames"] .cinema-frames {
  display: block;
}
.cinema-hero[data-render-mode="frames"] .cinema-frames.has-frame {
  opacity: 1;
}
.cinema-hero[data-render-mode="frames"] .cinema-layer video {
  display: none;
}

/* Shared glass header for the home and all portal routes. */
body:is(.home-hero, .portal-glass) {
  --glass-header-bg: #0003;
  --glass-header-ink: #fff;
  --glass-header-logo: brightness(0) invert(1);
}
body.home-hero:has(.cinema-hero[data-complete="true"]),
body.portal-glass.portal-header-light {
  --glass-header-bg: #ffffffb3;
  --glass-header-ink: var(--ink);
  --glass-header-logo: none;
}
body:is(.home-hero, .portal-glass) :is(body > header, #portal-root > header),
body:is(.home-hero, .portal-glass)
  :is(body > header, #portal-root > header):has(.portal-quick-menu[open]),
body:is(.home-hero, .portal-glass)
  :is(body > header, #portal-root > header):has(nav.open) {
  background: var(--glass-header-bg);
  color: var(--glass-header-ink);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid #ffffff14;
}
body:is(.home-hero, .portal-glass)
  :is(body > header, #portal-root > header):not(.cinema-header-hidden) {
  opacity: 1;
}
body:is(.home-hero, .portal-glass)
  :is(body > header, #portal-root > header)
  .brand
  img {
  filter: var(--glass-header-logo);
}
body:is(.home-hero, .portal-glass)
  :is(body > header, #portal-root > header)
  nav
  > a:not(.header-account),
body:is(.home-hero, .portal-glass)
  :is(body > header, #portal-root > header)
  .portal-quick-menu
  > summary,
body:is(.home-hero, .portal-glass)
  :is(body > header, #portal-root > header)
  .menu-toggle {
  color: inherit;
}
body:is(.home-hero, .portal-glass)
  :is(body > header, #portal-root > header)
  .menu-toggle {
  border-color: currentColor;
}
body:is(.home-hero, .portal-glass)
  :is(body > header, #portal-root > header)
  .portal-quick-panel {
  color: var(--ink);
}
@media (max-width: 700px) {
  body:is(.home-hero, .portal-glass)
    :is(body > header, #portal-root > header)
    nav.open {
    color: var(--ink);
  }
}

/* Home: fundo do atendimento Edi. */
body.home-hero #edi-dialog {
  background: var(--bg, #f7f7f7);
}

/* Casa: white at the top, translucent white while scrolling. */
body.portal-glass.portal-header-light[data-experience="journey"] {
  --glass-header-bg: #fff;
}
body.portal-glass.portal-header-light.journey-header-scrolled[data-experience="journey"] {
  --glass-header-bg: rgba(255, 255, 255, 0.7);
}
body.portal-glass[data-experience="journey"]
  :is(body > header, #portal-root > header) {
  transition:
    background-color 0.2s ease,
    backdrop-filter 0.2s ease;
}
body.portal-glass[data-experience="journey"]:not(.journey-header-scrolled)
  :is(body > header, #portal-root > header) {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
@media (prefers-reduced-motion: reduce) {
  body.portal-glass[data-experience="journey"]
    :is(body > header, #portal-root > header) {
    transition: none;
  }
}
/* Clean edge between the home hero and the following section. */
.home-hero .cinema-progress {
  display: none;
}

/* Opaque mobile navigation and a reliable portal-link arrow. */
.portal-all-arrow-mobile {
  display: none;
}
@media (max-width: 700px) {
  :is(body, #portal-root) :is(body > header, #portal-root > header) nav.open,
  :is(body, #portal-root)
    :is(body > header, #portal-root > header)
    .portal-quick-panel {
    background: #fff;
  }
  body:is(.home-hero, .portal-glass)
    :is(body > header, #portal-root > header):has(nav.open),
  body:is(.home-hero, .portal-glass)
    :is(body > header, #portal-root > header):has(.portal-quick-menu[open]) {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  header nav .portal-quick-heading a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .portal-all-arrow-text {
    display: none;
  }
  .portal-all-arrow-mobile {
    display: block;
    flex-shrink: 0;
  }
}
