/* Newton Lima — V16 Clean Seam — hero only (homepage).
   Fonte: newton_lima_v16_clean_seam_package.zip (index.html / src/styles.css / src/main.ts).
   Escopo estrito: somente abertura do hero. Header real (.site-header) e
   seções seguintes (.statement etc.) preservados. Header/.after do preview
   DEMO não incluídos. Assets locais de produção. */

.hero {
  --v16-paper: #f1ece5;
  --v16-ink: #5a4b47;
  position: relative;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  background:
    radial-gradient(
      60vw 42vw at 18% 16%,
      rgba(255, 255, 255, 0.98),
      transparent 62%
    ),
    radial-gradient(
      58vw 46vw at 82% 78%,
      rgba(79, 64, 57, 0.08),
      transparent 74%
    ),
    linear-gradient(180deg, #f5f0e8 0%, #e7e0d8 100%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.06;
  background: repeating-linear-gradient(
    90deg,
    rgba(90, 75, 71, 0.2) 0 1px,
    transparent 1px 28px
  );
  mix-blend-mode: multiply;
}

.hero-accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.16)),
    linear-gradient(180deg, #ece4d4 0%, #dbcfba 100%);
  transform: scale(1.035) translate3d(0, 0.35%, 0);
  filter: saturate(0.95) contrast(1.02) brightness(0.94);
  will-change: opacity, transform, clip-path, filter;
}

/* Support layer: same desktop image, subtly enlarged + softly blurred so the
   letterbox areas around the sharp foreground feel like a warm editorial mat.
   Understated on purpose — no glow, glass, vignette or depth tricks. */
.hero-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.16)),
    url('/assets/Imagem do Codex 13 de set. de 2026, 20_54_26.png');
  background-size: cover;
  background-position: center 40%;
  filter: blur(18px) saturate(.94) brightness(1.02);
  transform: scale(1.1);
}

/* Foreground: the real banner, sharp, natural proportions, no extra zoom.
   Lives inside `.hero-media`, so the V16 reveal (opacity/clip/transform)
   animates both layers together with zero JS changes. */
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.media-light {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 24% 22%,
      rgba(255, 247, 236, 0.18),
      transparent 38%
    ),
    linear-gradient(
      90deg,
      rgba(17, 17, 15, 0.17),
      transparent 28%,
      transparent 72%,
      rgba(17, 17, 15, 0.11)
    );
}

.ambient {
  position: absolute;
  inset: -10%;
  z-index: 3;
  pointer-events: none;
  will-change: transform, opacity;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(34px);
  mix-blend-mode: screen;
}

.glow-a {
  width: 40vw;
  height: 40vw;
  left: 2%;
  top: 1%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.95),
    transparent 68%
  );
  opacity: 0.34;
  animation: v16-driftA 10s ease-in-out infinite alternate;
}

.glow-b {
  width: 26vw;
  height: 26vw;
  right: 8%;
  top: 26%;
  background: radial-gradient(circle, rgba(0, 116, 124, 0.13), transparent 74%);
  opacity: 0.28;
  animation: v16-driftB 12s ease-in-out infinite alternate;
}

.shadow-band {
  position: absolute;
  width: 58vw;
  height: 18vw;
  left: 21%;
  top: 45%;
  background: radial-gradient(ellipse, rgba(56, 42, 36, 0.15), transparent 70%);
  filter: blur(26px);
  transform: rotate(-7deg);
  animation: v16-breathe 7.5s ease-in-out infinite alternate;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 40%,
    transparent 42%,
    rgba(32, 25, 22, 0.08) 100%
  );
}

@keyframes v16-driftA {
  to {
    transform: translate3d(6vw, 3vh, 0) scale(1.08);
  }
}

@keyframes v16-driftB {
  to {
    transform: translate3d(-5vw, -4vh, 0) scale(0.93);
  }
}

@keyframes v16-breathe {
  to {
    transform: translate3d(0, 2vh, 0) rotate(-5deg) scale(1.04);
    opacity: 0.11;
  }
}

.stage {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  perspective: 1800px;
  transform-style: preserve-3d;
  pointer-events: none;
}

.logo-scene {
  position: relative;
  width: min(58vw, 780px);
  aspect-ratio: 120/81;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.full-logo,
.frag img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.full-logo {
  opacity: 0;
  filter: drop-shadow(0 18px 40px rgba(58, 44, 40, 0.08));
  will-change: opacity, transform;
}

.v16-neutral-logo {
  z-index: 2;
}

.frag {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.f1 {
  clip-path: polygon(0 0, 20% 0, 20% 44%, 0 44%);
}

.f2 {
  clip-path: polygon(17% 0, 42% 0, 42% 44%, 17% 44%);
}

.f3 {
  clip-path: polygon(38% 0, 64% 0, 64% 44%, 38% 44%);
}

.f4 {
  clip-path: polygon(60% 0, 100% 0, 100% 44%, 60% 44%);
}

.f5 {
  clip-path: polygon(0 34%, 28% 34%, 28% 84%, 0 84%);
}

.f6 {
  clip-path: polygon(23% 34%, 56% 34%, 56% 84%, 23% 84%);
}

.f7 {
  clip-path: polygon(51% 34%, 82% 34%, 82% 84%, 51% 84%);
}

.f8 {
  clip-path: polygon(77% 34%, 100% 34%, 100% 100%, 77% 100%);
}

.f9 {
  clip-path: polygon(0 84%, 100% 84%, 100% 100%, 0 100%);
}

.curtain-world {
  position: absolute;
  inset: 0;
  z-index: 34;
  opacity: 0;
  pointer-events: none;
  perspective: 2200px;
  transform-style: preserve-3d;
  will-change: opacity;
}

.curtain-panel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

.curtain-left {
  clip-path: polygon(0 0, 50% 0, 40% 100%, 0 100%);
  transform-origin: 50% 50%;
}

.curtain-right {
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 40% 100%);
  transform-origin: 40% 50%;
}

.curtain-surface {
  position: absolute;
  inset: -2%;
  background:
    radial-gradient(
      60vw 42vw at 18% 16%,
      rgba(255, 255, 255, 0.98),
      transparent 62%
    ),
    radial-gradient(
      58vw 46vw at 82% 78%,
      rgba(79, 64, 57, 0.08),
      transparent 74%
    ),
    linear-gradient(180deg, #f5f0e8 0%, #e7e0d8 100%);
}

.curtain-logo-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(58vw, 780px);
  aspect-ratio: 120/81;
  transform: translate(-50%, -50%);
  will-change: opacity, transform;
}

.curtain-logo-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(58, 44, 40, 0.08));
}

.fold-shadow {
  position: absolute;
  top: -6%;
  bottom: -6%;
  width: 18%;
  background: linear-gradient(90deg, rgba(32, 25, 21, 0.34), transparent);
  filter: blur(16px);
  opacity: 0.22;
}

.curtain-left .fold-shadow {
  right: -8%;
}

.curtain-right .fold-shadow {
  left: -8%;
  transform: scaleX(-1);
}

.caption {
  position: absolute;
  left: 50%;
  bottom: 5.6vh;
  z-index: 80;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(83, 69, 64, 0.5);
  opacity: 0;
  text-align: center;
  pointer-events: none;
  max-width: 90vw;
}

/* Final-state sign-off, mirroring the reference banner line.
   Hidden during the V16 opening; revealed by `hero-arrival.js` once the
   temporary layers are cleaned up. No V16 timeline changes. */
.hero-arrival {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 5%;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #f6f0e8;
  font-size: 10px;
  letter-spacing: 1.5px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .6s ease, transform .6s ease, visibility 0s linear .6s;
  pointer-events: none;
}

.hero-arrival > span {
  text-transform: uppercase;
}

.hero-arrival a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid #f6f0e880;
  pointer-events: auto;
}

.hero.is-arrived .hero-arrival {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .6s ease, transform .6s ease;
}

/* Scroll cue: thin editorial arrow, bottom-center. Appears only after the
   opening completes (`.is-arrived`) and fades on first scroll
   (`.is-past-top`, toggled by `hero-arrival.js`). Calm drift only. */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 12%;
  z-index: 41;
  transform: translateX(-50%);
  color: #f6f0e8;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility 0s linear .5s;
  pointer-events: none;
}

.scroll-cue svg {
  display: block;
  width: 12px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  animation: cue-drift 2.8s ease-in-out infinite;
}

.hero.is-arrived:not(.is-past-top) .scroll-cue {
  opacity: .85;
  visibility: visible;
  transition: opacity .5s ease;
}

@keyframes cue-drift {
  0%, 100% {
    transform: translateY(0);
    opacity: .55;
  }
  50% {
    transform: translateY(6px);
    opacity: .95;
  }
}

/* Trava de scroll somente durante a abertura V16. */
body.v16-locked {
  overflow: hidden;
  height: 100svh;
}

@media (max-width: 800px) {
  .logo-scene,
  .curtain-logo-wrap {
    width: 88vw;
  }

  .glow-a {
    width: 80vw;
    height: 80vw;
    left: -18%;
    top: 8%;
  }

  .glow-b {
    width: 66vw;
    height: 66vw;
    right: -18%;
    top: 25%;
  }

  .shadow-band {
    width: 100vw;
    height: 42vw;
    left: 0;
    top: 44%;
  }

  .hero-media {
    background-image:
      linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.16)),
      url('/assets/newton_sofa_mobile_1080x1920.jpg');
    background-size: cover;
    background-position: center center;
  }

  /* Mobile keeps today's single-layer cover rendering exactly as-is. */
  .hero-media::before,
  .hero-photo {
    display: none;
  }

  .curtain-left {
    clip-path: polygon(0 0, 50% 0, 35% 100%, 0 100%);
    transform-origin: 50% 50%;
  }

  .curtain-right {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 35% 100%);
    transform-origin: 35% 50%;
  }

  .caption {
    width: 88vw;
    bottom: 4.8vh;
  }

  .hero-arrival {
    bottom: 5%;
    font-size: 9px;
    gap: 16px;
  }

  .hero-arrival > span {
    max-width: 45%;
    line-height: 1.8;
  }

  .hero-arrival a {
    min-height: 44px;
  }

  .scroll-cue {
    bottom: 14%;
  }

  .scroll-cue svg {
    width: 10px;
    height: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glow,
  .shadow-band {
    animation: none !important;
  }

  .scroll-cue svg {
    animation: none;
  }
}

/* Homepage header states over the V16 hero (production header only).
   STATE A (default, over hero): fixed transparent overlay, light text.
   STATE B (.is-solid, hero scrolled past): warm-white bar, production dark.
   Scoped to body.home — internal pages keep their own header layout.
   No height/padding changes, so no layout shift. Restrained legibility:
   no blur, glass, opaque bar, large gradient or drop-shadow. */
body.home .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background-color: transparent;
  border-bottom-color: transparent;
  color: #f6f0e8;
  transition: background-color .32s ease, color .32s ease, border-color .32s ease;
}

body.home .site-header .signature img {
  filter: brightness(0) invert(1);
}

body.home .site-header:not(.is-solid) .language-rail button[aria-pressed='true']::after,
body.home .site-header:not(.is-solid) .language-current::after {
  background-color: #98c4c8;
}

body.home .site-header.is-solid {
  background-color: var(--paper, #F3EFE8);
  border-bottom-color: #282c2418;
  color: #282c24;
}

body.home .site-header.is-solid .signature img {
  filter: brightness(0);
}

/* Passagem híbrida: o papel abre atrás dos fragmentos para que a câmera
   atravesse a marca antes de revelar a fotografia, como na versão film. */
.curtain-world {
  z-index: 12;
}

.curtain-logo-wrap {
  display: none;
}

.curtain-panel::after {
  content: '';
  position: absolute;
  inset: -10%;
  pointer-events: none;
  opacity: var(--v16-light, 0);
  transform: translateX(var(--v16-light-x, 0px));
  background: linear-gradient(
    109deg,
    transparent 27%,
    rgba(194, 154, 99, 0.13) 41%,
    rgba(255, 250, 240, 0.63) 48%,
    rgba(133, 98, 59, 0.09) 53%,
    transparent 66%
  );
  will-change: transform, opacity;
}

.v16-threshold {
  position: absolute;
  inset: 0;
  z-index: 15;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}

.fold-shadow {
  display: none;
}

.v16-threshold path {
  fill: none;
  stroke: #007279;
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  opacity: 0.72;
}

.v16-threshold path + path {
  stroke-width: 1;
  opacity: 0.34;
}

.v16-slash {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 25;
  width: min(58vw, 780px);
  height: auto;
  aspect-ratio: 120/81;
  overflow: visible;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}

@media (max-width: 800px) {
  .v16-slash {
    width: 88vw;
  }
}
