/* =========================================================================
   MOTION — camada de animação e ousadia visual
   Tudo aqui é progressivo: sem JS ou com "reduzir movimento" ativado,
   o site aparece completo e estático.
   ========================================================================= */

/* ---------- Transição entre páginas (View Transitions nativas) ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
/* Fundo da transição no azul-marinho do site: sem isso, durante o esmaecimento aparecia o branco
   padrão do navegador entre uma página e outra */
html { background-color: #0a1628; }
::view-transition { background: #0a1628; }
/* Esmaecimento suave e rápido (sem desfoque nem deslocamento): a nova página surge sobre a antiga */
::view-transition-old(root) { animation: vt-out .28s ease both; }
::view-transition-new(root) { animation: vt-in .38s ease both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }

/* ---------- Textura de grão (editorial, estática) ---------- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06;
  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='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Barra de progresso de leitura (scroll-driven) ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 1px; z-index: 60; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .progress { animation: progress linear both; animation-timeline: scroll(root); }
  @keyframes progress { to { transform: scaleX(1); } }
}

/* ---------- Títulos com revelação palavra a palavra ---------- */
/* A "janela" de cada palavra precisa caber as descendentes (g, j, p, q) e os acentos
   da Cormorant; padding + margem negativa aumentam a janela sem mexer na entrelinha. */
/* a "janela" de cada palavra tem folga também nas laterais: letras em itálico (g, f, j…) avançam
   além da própria caixa e eram cortadas; a margem negativa mantém o espaçamento entre as palavras */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding: .12em .14em .28em; margin: -.12em -.14em -.28em; }
.split-word > span { display: inline-block; }
.js .split-ready .split-word > span {
  transform: translateY(105%) rotate(4deg); transform-origin: 0 100%;
  transition: transform 1.1s cubic-bezier(.16, 1, .3, 1);
  transition-delay: calc(var(--i) * 70ms + var(--d, 0ms));
}
.js .split-ready.is-in .split-word > span { transform: none; }
.split-punct { font-style: normal; }

/* ---------- Hero: zoom lento + linha dourada ---------- */
.hero__bg img, .hero__bg .ph { animation: kenburns 2.8s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes kenburns { from { transform: scale(1.14); filter: brightness(.6); } }
.hero .display, .hr-hero .display { font-size: clamp(3rem, 12.5vw, 8.6rem); line-height: .95; letter-spacing: -.02em; }
.hero .display { max-width: 11ch; }
/* Título do Heritage é mais longo: menor, para caber na primeira dobra */
.hr-hero .display { font-size: clamp(2.8rem, 10vw, 6.2rem); max-width: 15ch; line-height: 1.04; }
@media (min-width: 768px) and (max-height: 820px) { .hr-hero .display { font-size: clamp(2.8rem, 8.5vh, 6.2rem); } }
.seal { position: relative; overflow: hidden; }
.js .seal::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(214, 189, 134, .35) 50%, transparent 70%);
  transform: translateX(-120%); animation: sheen 2.6s 1.2s cubic-bezier(.6, 0, .2, 1) both;
}
@keyframes sheen { to { transform: translateX(120%); } }
.hero__ctas, .hero__sub, .hr-hero__meta { animation: rise 1s cubic-bezier(.16, 1, .3, 1) both; }
.hero__sub { animation-delay: .55s; }
.hero__ctas { animation-delay: .7s; }
.hr-hero__meta { animation-delay: .85s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ---------- Imagens: revelação por cortina + parallax ---------- */
.js .wipe { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s cubic-bezier(.77, 0, .18, 1); }
.js .wipe.is-in { clip-path: inset(0 0 0 0); }
.js .wipe > img, .js .wipe > .ph, .js .wipe picture > img { transform: scale(1.25); transition: transform 1.8s cubic-bezier(.16, 1, .3, 1); }
.js .wipe.is-in > img, .js .wipe.is-in > .ph, .js .wipe.is-in picture > img { transform: scale(1.08); }

@supports (animation-timeline: view()) {
  @media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
    .js .wipe.is-in > img, .js .wipe.is-in > .ph {
      animation: parallax linear both; animation-timeline: view(); animation-range: cover;
    }
    @keyframes parallax { from { transform: translateY(-5%) scale(1.12); } to { transform: translateY(5%) scale(1.12); } }
  }
}
/* Cards de projeto: foto sempre inteira, sem zoom nem parallax (que cortariam as bordas) */
.js .card__media.wipe > img, .js .card__media.wipe.is-in > img { transform: none; animation: none; }
.marquee { overflow: clip; }
.stat__n { white-space: nowrap; }
.card__media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 22, 40, .55)); transition: opacity .6s var(--ease);
}
.card:hover .card__media::after { opacity: 1; }
.card__title { transition: color .4s var(--ease); }
.card:hover .card__title { color: var(--gold-2); }

/* ---------- Marquee de assinaturas ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; user-select: none; }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
/* Com JS, o movimento é feito em motion.js (continua no hover e aceita arrastar/rolar para os lados) */
.marquee.is-js { cursor: grab; touch-action: pan-y; }
.marquee.is-js.is-dragging { cursor: grabbing; }
.marquee.is-js .marquee__track { animation: none; will-change: transform; }
.marquee img { -webkit-user-drag: none; user-select: none; pointer-events: none; }
.marquee__item {
  display: flex; align-items: center; gap: 48px; padding-right: 48px; white-space: nowrap;
  font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(3rem, 9vw, 7.5rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(233, 228, 218, .45);
}
.marquee__item b { font-weight: 300; color: var(--text); -webkit-text-stroke: 0; }
.marquee__item i { font-style: normal; font-size: .35em; color: var(--gold); -webkit-text-stroke: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }
/* Versão com os logos oficiais: alturas ajustadas para o mesmo "peso" visual */
.marquee--logos { padding: 44px 0; }
/* Seção logo abaixo do banner: menos respiro no topo (o banner já separa) */
.marquee + .section { padding-top: 56px; }
@media (min-width: 1024px) { .marquee + .section { padding-top: 80px; } }
.marquee--logos .marquee__item { gap: clamp(40px, 6vw, 88px); padding-right: clamp(40px, 6vw, 88px); font-size: clamp(2.4rem, 5vw, 4rem); }
.marquee--logos img { display: block; width: auto; max-width: none; opacity: .88; }
.marquee--logos .logo-armani { height: clamp(22px, 3vw, 36px); }
.marquee--logos .logo-dg { height: clamp(34px, 4.6vw, 56px); }
.marquee--logos .logo-pf { height: clamp(14px, 1.9vw, 23px); }
.marquee--logos .logo-cl { height: clamp(30px, 4.2vw, 50px); }
.marquee--logos .logo-versace { height: clamp(64px, 8.4vw, 104px); }
.marquee--logos .logo-yoo { height: clamp(22px, 3vw, 36px); }
.marquee--logos .logo-mw { height: clamp(15px, 2vw, 24px); }

/* ---------- Faixa de números (Heritage) ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 40px 20px; display: grid; gap: 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat:nth-child(2n) { border-right: 0; }
@media (min-width: 900px) { .stat { padding: 64px 32px; border-bottom: 0; } .stat:nth-child(2n) { border-right: 1px solid var(--line); } .stat:last-child { border-right: 0; } }
.stat__n { font-family: var(--serif); font-weight: 300; font-size: clamp(2.8rem, 7vw, 5.4rem); line-height: 1; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; }
.stat__n small { font-size: .38em; color: var(--gold-2); margin-left: .12em; letter-spacing: 0; }
.stat__l { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }

/* ---------- Números gigantes em contorno nos pilares ---------- */
.pillar { position: relative; overflow: hidden; }
.pillar__n { position: relative; z-index: 1; }
.pillar::before {
  content: attr(data-n); position: absolute; right: -6px; top: -18px; font-family: var(--serif); font-weight: 300;
  font-size: 7.5rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(184, 154, 94, .18);
  transition: transform .9s cubic-bezier(.16, 1, .3, 1), -webkit-text-stroke-color .6s;
}
.pillar:hover::before { transform: translate(-10px, 10px); -webkit-text-stroke-color: rgba(184, 154, 94, .5); }
.pillar h3 { transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.pillar:hover h3 { transform: translateX(6px); }

/* ---------- Links: sublinhado que se desenha ---------- */
.link { border-bottom-color: transparent; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 1px no-repeat, linear-gradient(var(--line-2), var(--line-2)) 0 100% / 100% 1px no-repeat; transition: background-size .6s cubic-bezier(.16, 1, .3, 1), color .3s; }
.link:hover { background-size: 100% 1px, 100% 1px; }

/* ---------- Botões: preenchimento que sobe ---------- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gold);
  transform: translateY(101%); transition: transform .55s cubic-bezier(.16, 1, .3, 1);
}
.btn:hover::before { transform: none; }
.btn:hover { color: var(--bg); border-color: var(--gold); }
.btn--solid:hover { background: var(--text); color: var(--bg); }

/* ---------- Galeria: imagens entram em cascata ---------- */
.js .gallery figure { opacity: 0; transform: translateX(60px); transition: opacity 1s cubic-bezier(.16, 1, .3, 1), transform 1.2s cubic-bezier(.16, 1, .3, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.js .gallery.is-in figure { opacity: 1; transform: none; }
.gallery img { transition: filter .6s; filter: saturate(.85); }
.gallery figure:hover img { filter: saturate(1.05); }

/* ---------- Respeito a "reduzir movimento" ---------- */
@media (prefers-reduced-motion: reduce) {
  .marquee__track, .hero__bg img, .hero__bg .ph, .hero__ctas, .hero__sub, .hr-hero__meta, .js .seal::after { animation: none !important; }
  .js .split-ready .split-word > span, .js .wipe, .js .wipe > img, .js .wipe > .ph, .js .gallery figure { transform: none !important; clip-path: none !important; opacity: 1 !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- Modo leve (computadores modestos ou economia de dados) ----------
   <html class="lite"> é ligado no <head> de cada página quando o aparelho tem até 4 GB de memória
   ou até 4 núcleos. Mantém o visual e tira o que mais custa para desenhar. */
.lite .wipe > img, .lite .wipe > .ph, .lite .wipe picture > img,
.lite .wipe.is-in > img, .lite .wipe.is-in > .ph, .lite .wipe.is-in picture > img { transform: none !important; animation: none !important; transition: none !important; }
.lite .hero-panel img, .lite .hero-panel.is-active img { transform: skewX(var(--sk)) scale(1.02); transition: none; }
.lite .hero__bg img, .lite .hero__bg .ph { animation: none; }
.lite .card__media::after, .lite .card__logo img, .lite .mtc__brand { filter: none; }
/* Página Projetos: sem animação na rolagem (classe ligada em motion.js) */
.calm .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
/* Faixa de grifes mais baixa (pedido do Adolfo em 02/10/2026): quase da altura dos próprios logos */
.marquee--logos { padding: 14px 0; }
.marquee--logos .marquee__item { align-items: center; }
.marquee--logos .logo-versace { height: clamp(44px, 5vw, 62px); }
.marquee--logos .logo-dg { height: clamp(30px, 3.6vw, 46px); }
.marquee--logos .logo-cl { height: clamp(26px, 3.4vw, 42px); }
