/* ==========================================================
   Hero da home: fly-through guiado pela rolagem.
   Sem a classe .is-live (sem JS ou "reduzir movimento") vira
   uma foto em tela cheia com o título e os botões.
   ========================================================== */
/* o hero começa atrás do cabeçalho fixo (o main reserva o espaço dele nas outras páginas) */
main:has(> .fx:first-child), main:has(> .pin-spacer:first-child > .fx) { padding-top: 0; }
.fx { --serif: "Cormorant Garamond", "Times New Roman", serif; position: relative; background: #0E0D0C; color: #fff; }
.fx-stage { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }

/* cenas: .fx-a = hall com a porta, .fx-b = living (recortado pelo vão até a câmera atravessar);
   .fx-scene recorta e .fx-cam leva o zoom da câmera */
.fx-scene { position: absolute; inset: 0; overflow: hidden; }
.fx-scene + .fx-scene { visibility: hidden; }
.fx-cam { position: absolute; inset: 0; will-change: transform; }
.fx-scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* porta: a folha é um recorte da imagem (posicionado pelo hero.js) que gira sobre o pivô */
.fx.is-live .fx-b { visibility: visible; }
.fx:not(.is-live) .fx-b, .fx:not(.is-live) .fx-doorlayer { display: none; }
.fx-doorlayer { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.fx-door { position: absolute; background-repeat: no-repeat; will-change: transform; box-shadow: 0 0 60px rgba(0, 0, 0, .55); }
.fx-door i { position: absolute; inset: 0; background: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .55) 100%); opacity: 0; }
.fx-spill { position: absolute; opacity: 0; mix-blend-mode: screen; background: radial-gradient(ellipse at center, rgba(255, 210, 150, .6), rgba(255, 190, 120, .18) 40%, transparent 68%); }

/* abertura: a logo se desenha e as duas folhas da porta se abrem */
/* fixa e acima do cabeçalho, como a cortina do site (.veil, z-index 100) */
.fx-intro { position: fixed; inset: 0; z-index: 101; display: none; place-items: center; pointer-events: none; }
html.motion .fx-intro { display: grid; }
/* mesma cor e tamanho de logo da cortina do site (.veil), para a troca entre páginas ser contínua */
/* cada folha leva uma cópia da logo recortada na divisão: o vão entre o N e o painel do S
   (x = 247 no viewBox 56..430, ou seja 51,07% da largura) cai exatamente no meio da tela */
/* as folhas giram como porta de duas folhas abrindo para dentro (dobradiças nas bordas da tela) */
.fx-intro { --lw: min(180px, 44vw); perspective: 1400px; perspective-origin: 50% 50%; }
.fx-leaf { position: absolute; top: 0; bottom: 0; width: 50%; background: var(--ink); overflow: hidden; backface-visibility: hidden; will-change: transform; }
.fx-leaf:first-child { left: 0; transform-origin: 0 50%; box-shadow: inset -1px 0 rgba(224, 169, 109, .35); }
.fx-leaf + .fx-leaf { right: 0; transform-origin: 100% 50%; }
.fx-leaf::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--shade, 0); pointer-events: none; }
.fx-logo { position: absolute; top: 50%; width: var(--lw); height: auto; margin-top: calc(var(--lw) * -131 / 374); color: var(--on-dark); --logo-cut: var(--ink); overflow: visible; }
.fx-leaf:first-child .fx-logo { left: calc(100% - var(--lw) * .5107); }
.fx-leaf + .fx-leaf .fx-logo { left: calc(var(--lw) * -.5107); }
/* a logo aparece inteira (um fade só); vindo de outra página ela já está visível */
.fx-intro .fx-logo { opacity: 0; }
.from-site .fx-intro .fx-logo { opacity: 1; }
/* na home a abertura do hero substitui o véu de carregamento */
.is-loading .veil:has(~ main [data-fx]) { transform: translateY(-100%); }
.fx-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx-shade { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 45%, rgba(8, 7, 6, .65)),
    linear-gradient(180deg, rgba(8, 7, 6, .45) 0%, transparent 22%, transparent 55%, rgba(8, 7, 6, .75) 100%); }
/* escurece a cena enquanto há texto por cima (controlado pelo hero.js) */
.fx-dim { position: absolute; inset: 0; pointer-events: none; background: #0B0A09; opacity: .2; }
.fx:not(.is-live) .fx-dim { opacity: .5; }
.fx-grain { position: absolute; inset: -50%; pointer-events: none; opacity: .09; 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: fx-grain .9s steps(4) infinite; }
@keyframes fx-grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-1%, -2%); } }

/* textos */
.fx-copy { position: absolute; inset: 0; z-index: 2; }
.fx-line { position: absolute; left: 50%; top: 50%; width: min(1100px, calc(100% - 2 * var(--gutter))); transform: translate(-50%, -50%); text-align: center; }
.fx-kicker { font: 600 12px/1 var(--font-body); letter-spacing: .28em; text-transform: uppercase; color: var(--accent-light); margin-bottom: 22px; }
.fx-serif { font: 400 clamp(46px, 8.2vw, 128px)/.98 var(--serif); letter-spacing: -.015em; margin: 0; text-wrap: balance; text-shadow: 0 2px 40px rgba(0, 0, 0, .35); }
.fx-serif em { font-style: italic; color: #F1D3AA; }
.fx-serif .w { display: inline-block; }
h1.fx-serif { font-size: clamp(42px, 6.4vw, 96px); }
.fx-lead { max-width: 40em; margin: 26px auto 0; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.6; color: rgba(255, 255, 255, .82); }
.fx-final .btn-row { justify-content: center; margin-top: 30px; }
.fx .btn-ghost { --f: #fff; border-color: #fff; }
.fx .btn-ghost::after { background: #fff; }
.fx .btn-ghost:hover { color: var(--ink); border-color: #fff; }

/* rodapé do hero */
.fx-meta { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
.fx-cap b { color: var(--accent-light); font-weight: 700; margin-right: 6px; }
.fx-cue { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: inline-flex; flex-direction: column; align-items: center; gap: 10px; white-space: nowrap; }
.fx-cue i { width: 1px; height: 36px; background: linear-gradient(rgba(255, 255, 255, .9), transparent); animation: fx-cue 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes fx-cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.fx-bar { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .12); }
.fx-bar i { display: block; height: 100%; background: var(--accent-light); transform-origin: left; transform: scaleX(0); }

/* sem animação: só a primeira foto e o título final */
.fx:not(.is-live) .fx-line:not(.fx-final), .fx:not(.is-live) .fx-cue, .fx:not(.is-live) .fx-bar { display: none; }
.fx.is-live .fx-line:not(:first-child) { visibility: hidden; }

/* cabeçalho transparente sobre o hero escuro (com o menu aberto volta ao normal) */
body:not(.nav-open) .site-header.on-dark { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; }
body:not(.nav-open) .site-header.on-dark .brand, body:not(.nav-open) .site-header.on-dark .nav > a:not(.btn) { color: #fff; }
body:not(.nav-open) .site-header.on-dark .brand-logo { color: #fff; --logo-cut: #14120F; }
body:not(.nav-open) .site-header.on-dark .nav > a.btn { background: #fff; color: var(--ink); border-color: #fff; }
body:not(.nav-open) .site-header.on-dark .nav-toggle span:not(.sr-only) { background: #fff; }

@media (max-width: 640px) {
  .fx-serif { font-size: clamp(40px, 12vw, 64px); }
  h1.fx-serif { font-size: clamp(36px, 10.5vw, 52px); }
  .fx-lead { font-size: 14.5px; }
  .fx-final .btn-row { flex-direction: column; align-items: stretch; }
  .fx-meta { bottom: 20px; font-size: 10px; }
  .fx-cap span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .fx-grain, .fx-cue i { animation: none; } }
