/* Camada "premium" compartilhada pelas aberturas de exemplo.
   Padrões comuns em sites premiados: texto revelado por máscara, foto revelada por cortina,
   cursor próprio, botões magnéticos, granulação sutil, linhas finas de grade.
   A identidade (cores, fontes, layout) fica em cada página. */

/* ---------- granulação de filme (bem sutil) ---------- */
.grao::after {
  content: ""; position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: var(--grao, .06); mix-blend-mode: multiply;
}

/* ---------- cortina de entrada ---------- */
.cortina {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--cortina-fundo, #111); color: var(--cortina-tinta, #fff);
  transition: transform 1s cubic-bezier(.76, 0, .24, 1);
}
.cortina span { overflow: hidden; display: block; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; }
.cortina span i { display: block; font-style: normal; animation: p-sobe .8s cubic-bezier(.22, 1, .36, 1) both .1s; }
.pronto .cortina { transform: translateY(-100%); }

/* ---------- texto revelado por máscara ---------- */
.p-m { display: inline-block; overflow: hidden; vertical-align: top; padding: .14em 0 .08em; margin: -.14em 0 -.08em; }
.p-i { display: inline-block; transform: translateY(110%); }
.pronto .p-i { animation: p-sobe 1.1s cubic-bezier(.22, 1, .36, 1) forwards; }
@keyframes p-sobe { from { transform: translateY(110%); } to { transform: none; } }

[data-sobe] { opacity: 0; transform: translateY(24px); }
.pronto [data-sobe] { animation: p-aparece 1s cubic-bezier(.22, 1, .36, 1) forwards; }
@keyframes p-aparece { to { opacity: 1; transform: none; } }

/* ---------- foto revelada por cortina ---------- */
[data-revela] { clip-path: inset(100% 0 0 0); overflow: hidden; }
[data-revela] img { transform: scale(1.25); }
.pronto [data-revela] { animation: p-cortina 1.4s cubic-bezier(.76, 0, .24, 1) forwards; }
.pronto [data-revela] img { animation: p-zoom 2s cubic-bezier(.22, 1, .36, 1) forwards; animation-delay: inherit; }
@keyframes p-cortina { to { clip-path: inset(0 0 0 0); } }
@keyframes p-zoom { to { transform: scale(1.04); } }
img { display: block; max-width: 100%; }
.foto { position: relative; overflow: hidden; }
.foto img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- cursor próprio ---------- */
.cursor, .cursor-ponto { position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none; border-radius: 50%; }
.cursor {
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1px solid var(--cursor, currentColor); display: grid; place-items: center;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  transition: width .35s cubic-bezier(.22, 1, .36, 1), height .35s cubic-bezier(.22, 1, .36, 1), margin .35s cubic-bezier(.22, 1, .36, 1), background .3s, border-color .3s;
  color: var(--cursor-texto, #fff);
}
.cursor span { opacity: 0; transition: opacity .2s; }
.cursor.sobre { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
.cursor.rotulo { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--cursor, #111); border-color: transparent; }
.cursor.rotulo span { opacity: 1; }
.cursor-ponto { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--cursor, currentColor); }
@media (hover: none), (prefers-reduced-motion: reduce) { .cursor, .cursor-ponto { display: none; } }

[data-magnetico] { transition: transform .4s cubic-bezier(.22, 1, .36, 1); will-change: transform; }

/* ---------- movimento reduzido: tudo pronto e parado ---------- */
@media (prefers-reduced-motion: reduce) {
  .cortina { display: none; }
  .p-i, [data-sobe], [data-revela], [data-revela] img { animation: none !important; transform: none !important; opacity: 1 !important; clip-path: none !important; }
}
