/* DESDOBRA · proposta para a NIU. Mesma direção de arte do site da NIU: papel, tinta, Instrument Serif + Geist. */
:root {
  --noite: #0d0d0c;
  --papel: #efece6;
  --tinta: #121211;
  --suave: #5f5b53;
  --linha: rgb(18 18 17 / .16);
  --acento: #8c7f69;
  --fonte-titulo: "Instrument Serif", Georgia, serif;
  --fonte-texto: "Geist", system-ui, sans-serif;
  --gutter: clamp(20px, 4.5vw, 72px);
  --largura: 1360px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 400 clamp(16px, 1.05vw, 18px)/1.65 var(--fonte-texto); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
p { margin: 0; color: var(--suave); text-wrap: pretty; }

.pagina { min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: 0 var(--gutter); max-width: calc(var(--largura) + 2 * var(--gutter)); margin: 0 auto; }

/* Topo */
.topo { display: flex; justify-content: space-between; align-items: baseline; padding: max(22px, env(safe-area-inset-top)) 0 0; opacity: 0; animation: surge 1.2s var(--ease) .2s forwards; }
.marca { font-family: var(--fonte-titulo); font-size: 30px; letter-spacing: .03em; text-transform: lowercase; line-height: 1; }
.tag { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--acento); }

/* Capa: título, texto e fotografia numa grade editorial */
.capa { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(20px, 3.6vw, 56px); row-gap: clamp(22px, 3.5vh, 44px); align-content: center; padding: clamp(28px, 6vh, 72px) 0; }
.titulo { grid-column: 1 / 11; margin: 0; font-family: var(--fonte-titulo); font-weight: 400; font-size: clamp(46px, 7.4vw, 124px); line-height: .98; letter-spacing: -.012em; }
.titulo .p { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-right: .22em; }
.titulo .p > span { display: inline-block; transform: translateY(108%); animation: sobe 1.2s var(--ease) forwards; animation-delay: calc(.35s + var(--i) * .09s); }
.lado { grid-column: 1 / 5; align-self: end; opacity: 0; animation: surge 1.2s var(--ease) 1.1s forwards; }
.apoio { font-size: clamp(15px, 1.15vw, 18px); margin-bottom: 26px; }

/* Botão: quadrado, tinta sobre papel, fio que se estende */
.botao { display: inline-flex; align-items: center; gap: 16px; font: 500 13px/1 var(--fonte-texto); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--papel); background: var(--tinta); padding: 19px 28px; transition: background .35s var(--ease), transform .45s var(--ease); -webkit-tap-highlight-color: transparent; }
.botao i { display: block; width: 28px; height: 1px; background: currentColor; transition: width .5s var(--ease); }
.botao:hover, .botao:focus-visible { background: #000; transform: translateY(-2px); }
.botao:hover i, .botao:focus-visible i { width: 48px; }
.botao:focus-visible { outline: 2px solid var(--acento); outline-offset: 4px; }
.botao[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.aviso-previa { margin-top: 14px; font-size: 13px; }

.foto { grid-column: 5 / -1; margin: 0; overflow: hidden; aspect-ratio: 2 / 1; background: #2a2926; clip-path: inset(0 0 100% 0); animation: revela 1.7s var(--ease) .75s forwards; }
.foto img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.16); animation: assenta 3s var(--ease) .75s forwards, respira 36s ease-in-out 3.8s infinite alternate; }

/* Rodapé: assinatura discreta */
.rodape { display: grid; gap: 8px; padding: 22px 0 max(26px, env(safe-area-inset-bottom)); border-top: 1px solid var(--linha); opacity: 0; animation: surge 1.2s var(--ease) 1.6s forwards; }
.assinatura { font-family: var(--fonte-titulo); font-style: italic; font-size: clamp(20px, 1.8vw, 26px); color: var(--tinta); }
.nota { font-size: 12px; max-width: 70ch; opacity: .85; }

/* Cortina: transição para o site (entra no escuro, como a abertura da NIU) */
.cortina { position: fixed; inset: 0; z-index: 10; background: var(--noite); opacity: 0; pointer-events: none; transition: opacity .8s var(--ease); }
.saindo .cortina { opacity: 1; pointer-events: auto; }
.saindo .pagina { transform: scale(.985); transition: transform .8s var(--ease); }

@keyframes sobe { to { transform: none; } }
@keyframes surge { to { opacity: 1; } }
@keyframes revela { to { clip-path: inset(0 0 0 0); } }
@keyframes assenta { to { transform: scale(1.02); } }
@keyframes respira { from { transform: scale(1.02); } to { transform: scale(1.07) translate3d(-1%, -.6%, 0); } }

@media (max-width: 860px) {
  .titulo { grid-column: 1 / -1; font-size: clamp(44px, 13.4vw, 84px); }
  .lado { grid-column: 1 / -1; order: 2; }
  .foto { grid-column: 1 / -1; order: 3; aspect-ratio: 4 / 3; }
  .botao { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .topo, .lado, .rodape { animation: none; opacity: 1; }
  .titulo .p > span { animation: none; transform: none; }
  .foto { animation: none; clip-path: none; }
  .foto img { animation: none; transform: none; }
  .cortina, .saindo .pagina { transition: none; }
}
