@property --mt { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --m0 { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --mb { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --ms { syntax: '<length>'; inherits: true; initial-value: 0px; }

:root {
  /* tinta, papel e concreto — um único acento: prata brilhante */
  --ink: #0c0c0b;
  --paper: #efede6;
  --concrete-900: #1b1b1a;
  --concrete-700: #2c2c2a;
  --concrete-300: #a9a8a2;
  --accent: #dfe4ea;
  --accent-glow: rgba(226, 233, 242, .7);
  /* prata metálica pra fundos de botão/realces: brilho em faixa diagonal */
  --silver: linear-gradient(115deg, #8d939b 0%, #e9edf1 22%, #a9b0b8 40%, #ffffff 55%, #b7bdc4 72%, #f2f4f6 88%, #8d939b 100%);
  /* fontes: trocadas pelo tema do PDF em css/theme-pdf.css */
  --f-display: var(--f-display);
  --f-script: var(--f-script);
  --f-body: 'Inter Tight', system-ui, sans-serif;
  --works-bg: #0c0c0b;
  --photo-bg: #000; /* o filtro P&B com contraste leva o fundo da foto a preto puro */
  /* posição da foto do hero no frame 1440×810 (unidades do frame) */
  --photo-w: 853px;
  --photo-h: 1100px;
  --photo-left: 293px;
  --photo-top: -120px;
  --photo-filter: grayscale(1) contrast(1.18) brightness(.96);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.4 -.2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  --n: min(calc(100vw / 1440), calc(100vh / 900));
  --glide: 1.6s;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--photo-bg);
  color: var(--paper);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
/* Documento preso: no celular o iOS não deixa mais "arrastar"/quicar a página inteira junto com o fundo */
body {
  position: fixed;
  inset: 0;
  width: 100%;
}
/* Camadas de tela cheia não respondem a gestos de rolagem; só as cenas com texto (bio, galeria) rolam */
.stage, .works, .shutter { touch-action: none; }
.bio, .gallery { touch-action: pan-y; -webkit-overflow-scrolling: touch; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }

/* Elementos escondidos até a entrada rodar */
.js:not(.in) .pre { opacity: 0; }

/* Granulação de filme sobre tudo */
/* camada maior que a tela que se desloca com transform (GPU) em vez de repintar o fundo a cada quadro */
body::after {
  content: '';
  position: fixed;
  inset: -120px;
  z-index: 40;
  pointer-events: none;
  background-image: var(--grain);
  opacity: .22;
  mix-blend-mode: overlay;
  will-change: transform;
  animation: grain .9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-70px, 40px, 0); }
  50% { transform: translate3d(50px, -80px, 0); }
  75% { transform: translate3d(-30px, -25px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.shutter {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* fundo de cena (só aparece com o tema do PDF) */
.scene-bg { display: none; }
