/* Nagi Sushi — tokens de design. Papel e tinta. */

/* Faces de fallback com métricas ajustadas para reduzir o salto de layout */
@font-face {
  font-family: "Shippori Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 103%;
  ascent-override: 96%;
  descent-override: 28%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Zen Fallback";
  src: local("Segoe UI"), local("Helvetica Neue"), local("Arial");
  size-adjust: 101%;
  ascent-override: 104%;
  descent-override: 30%;
  line-gap-override: 0%;
}

:root {
  /* Paleta */
  --papel: #F2EDE2;
  --papel-2: #E8E0D0;
  --papel-claro: #F8F5EE;
  --tinta: #1B2433;
  --nori: #26332B;
  --salmao: #E2725B;
  --salmao-claro: #EB8771;
  --lacre: #B3261E;
  --hinoki: #D8C3A0;
  --hinoki-escuro: #B89A6E;
  --pedra: #8C8678;

  /* Derivados (contraste validado AA) */
  --tinta-72: rgb(27 36 51 / 0.72);  /* texto secundário sobre papel: ~5,7:1 */
  --tinta-60: rgb(27 36 51 / 0.6);   /* borda de campos: ~3,9:1 (não texto) */
  --papel-72: rgb(242 237 226 / 0.72); /* texto secundário sobre tinta/nori: ~7:1 */
  --linha: rgb(140 134 120 / 0.45);   /* pedra: só linhas finas */

  /* Tipografia */
  --fonte-titulo: "Shippori Mincho", "Shippori Fallback", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --fonte-texto: "Zen Kaku Gothic New", "Zen Fallback", "Yu Gothic", "Hiragino Sans", system-ui, sans-serif;

  --t-hero: clamp(2.7rem, 1.1rem + 6.2vw, 7.4rem);
  --t-secao: clamp(2.1rem, 1.25rem + 3.3vw, 4.4rem);
  --t-sub: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  --t-corpo: 1rem;
  --t-p: 0.875rem;
  --t-rotulo: 0.75rem;

  /* Espaço e forma */
  --gutter: clamp(16px, 4.4vw, 56px);
  --max: 1380px;
  --secao: clamp(80px, 11vw, 168px);
  --raio-p: 2px;
  --raio: 4px;
  --raio-g: 6px;

  /* Topo fixo */
  --faixa-h: 30px;
  --topo-h: 64px;
  --topo-total: calc(var(--faixa-h) + var(--topo-h));

  /* Movimento: lento e preciso, nunca elástico */
  --ease-saida: cubic-bezier(0.16, 1, 0.3, 1);      /* ≈ expo.out */
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);        /* ≈ power3.inOut */
  --dur: 0.9s;

  /* Foco */
  --foco: var(--tinta);

  /* Texturas (SVG inline, sem requisições) */
  --tx-grao: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .27 0 0 0 0 .2 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --tx-fibras: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .16' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .43 0 0 0 0 .32 1.7 0 0 0 -1.06'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --tx-grao-claro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95 0 0 0 0 .92 0 0 0 0 .86 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --tx-kumiko: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23B89A6E' stroke-width='.8'%3E%3Cpath d='M0 0H56V56H0Z'/%3E%3Cpath d='M28 0L56 28L28 56L0 28Z'/%3E%3Cpath d='M0 0L56 56M56 0L0 56'/%3E%3Cpath d='M28 0V56M0 28H56' stroke-opacity='.45'/%3E%3C/g%3E%3C/svg%3E");
  --tx-kumiko-claro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23D8C3A0' stroke-width='.7'%3E%3Cpath d='M0 0H56V56H0Z'/%3E%3Cpath d='M28 0L56 28L28 56L0 28Z'/%3E%3Cpath d='M0 0L56 56M56 0L0 56'/%3E%3C/g%3E%3C/svg%3E");
  --tx-ripas: repeating-linear-gradient(90deg, #D8C3A0 0 26px, #CDB48C 26px 27px, #DCC8A6 27px 52px, #C6AA80 52px 53px);
  --tx-veio: repeating-linear-gradient(180deg, rgb(255 255 255 / 0.08) 0 1px, transparent 1px 4px);
}

@media (max-width: 639.98px) {
  :root {
    --faixa-h: 28px;
    --topo-h: 60px;
  }
}
