/* Nagi Sushi — base: reset, papel, tipografia, botões, campos. */

*, *::before, *::after { box-sizing: border-box; }

/* O atributo hidden sempre vence classes com display próprio (ex.: .btn). */
[hidden] { display: none !important; }

/* Palcos sticky quebram com overflow: hidden em ancestrais: usar clip. */
html, body { overflow-x: clip; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topo-total) + 12px);
}
html.travado { overflow: hidden; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--papel);
  background-image: var(--tx-fibras), var(--tx-grao);
  color: var(--tinta);
  font-family: var(--fonte-texto);
  font-size: var(--t-corpo);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}
@media (min-width: 1280px) {
  body { font-size: 1.0625rem; }
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
p, h1, h2, h3, h4, dl, dd, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }

/* Sem itálico em lugar nenhum: em vira destaque por peso ou cor */
em, i, cite, address, dfn { font-style: normal; }
em { font-weight: 700; }
.textura-escura em { color: var(--salmao); }

h1, h2, h3, h4 {
  font-family: var(--fonte-titulo);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.005em;
  font-feature-settings: "palt" 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pular {
  position: fixed;
  left: 12px; top: 12px;
  z-index: 300;
  padding: 12px 18px;
  background: var(--tinta);
  color: var(--papel);
  border-radius: var(--raio);
  transform: translateY(-200%);
  transition: transform 0.3s var(--ease-saida);
}
.pular:focus { transform: none; }

:focus-visible {
  outline: 2px solid var(--foco);
  outline-offset: 3px;
  border-radius: var(--raio-p);
}
.textura-escura { --foco: var(--papel); }
dialog { --foco: var(--tinta); }

/* Superfícies */
.textura-papel { background-color: var(--papel); background-image: var(--tx-fibras), var(--tx-grao); }
.textura-papel-2 { background-color: var(--papel-2); background-image: var(--tx-fibras), var(--tx-grao); }
.textura-escura { background-color: var(--tinta); background-image: var(--tx-grao-claro); color: var(--papel); }

.envoltorio {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Rótulos e títulos de seção */
.sobretitulo {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  font-size: var(--t-rotulo);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tinta-72);
  margin-bottom: 1.1rem;
}
.sobretitulo::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  opacity: 0.8;
}
.sobretitulo .sep { display: none; }
.sobretitulo-claro { color: var(--papel-72); }

.titulo-secao {
  font-size: var(--t-secao);
  font-weight: 700;
  line-height: 1.12;
  max-width: 18ch;
}
.revela-linha > span { display: block; }
.revela-linha > span > .li { display: block; }

/* Preços: tabulares e sempre com espaço não separável (ver util.js) */
.preco {
  font-family: var(--fonte-texto);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Botões firmes, raios pequenos */
.btn {
  --altura: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: var(--altura);
  padding: 0 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--raio);
  font-family: var(--fonte-texto);
  font-size: 0.975rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  transition: background-color 0.35s var(--ease-saida), color 0.35s var(--ease-saida), border-color 0.35s var(--ease-saida);
}
.btn .ico { width: 1.15em; height: 1.15em; transition: translate 0.5s var(--ease-saida); }
.btn:hover .ico { translate: 3px 0; }
.btn:disabled { cursor: not-allowed; opacity: 0.55; }
.btn-p { --altura: 44px; padding: 0 1rem; font-size: 0.875rem; }
.btn-bloco { width: 100%; }

.btn-salmao { background: var(--salmao); color: var(--tinta); }
.btn-salmao:hover:not(:disabled) { background: var(--salmao-claro); }
.btn-tinta { background: var(--tinta); color: var(--papel); }
.btn-tinta:hover:not(:disabled) { background: #2A3850; }
.btn-linha { border-color: var(--tinta); color: var(--tinta); }
.btn-linha:hover:not(:disabled) { background: var(--tinta); color: var(--papel); }
.btn-linha-claro { border-color: var(--papel-72); color: var(--papel); }
.btn-linha-claro:hover:not(:disabled) { background: var(--papel); color: var(--tinta); border-color: var(--papel); }

.btn-fechar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--linha);
  border-radius: 50%;
  background: var(--papel-claro);
  color: var(--tinta);
  transition: background-color 0.3s, border-color 0.3s;
}
.btn-fechar:hover { border-color: var(--tinta); }

/* Hanko (logo-mark decorativo; o nome "Nagi" está sempre em texto) */
.hanko {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  background: var(--lacre);
  color: var(--papel);
  border-radius: 3px;
  font-family: var(--fonte-titulo);
  font-weight: 800;
  font-size: 23px;
  line-height: 1;
  background-image: var(--tx-grao-claro);
  box-shadow: inset 0 0 0 2px var(--lacre), inset 0 0 0 3.5px rgb(242 237 226 / 0.85);
}
.hanko > span { translate: 0 -0.04em; }
.hanko-g { width: 64px; height: 64px; font-size: 40px; box-shadow: inset 0 0 0 3px var(--lacre), inset 0 0 0 5px rgb(242 237 226 / 0.85); }

/* Ripas de madeira hinoki */
.ripas {
  height: 14px;
  background-image: var(--tx-veio), var(--tx-ripas);
  box-shadow: inset 0 -1px 0 rgb(27 36 51 / 0.18);
}
.ripas-finas { height: 6px; }

/* Grade de kumiko decorativa */
.kumiko {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--tx-kumiko);
  background-size: 56px 56px;
  opacity: 0.22;
}
.kumiko-escuro { background-image: var(--tx-kumiko-claro); opacity: 0.06; }

/* Texto vertical decorativo */
.texto-vertical {
  writing-mode: vertical-rl;
  font-family: var(--fonte-titulo);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.32em;
  color: var(--tinta-72);
  white-space: nowrap;
}

/* Ensō mini (círculo de pincel) */
.enso-mini {
  display: block;
  width: 96px;
  height: 96px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M72 16 C 56 6, 30 8, 17 23 C 3 39, 6 66, 23 80 C 40 94, 68 91, 82 74 C 94 59, 92 37, 81 26' fill='none' stroke='%231B2433' stroke-width='5' stroke-linecap='round' opacity='.85'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Campos de formulário: 16px e no mínimo 56px de altura */
.campo { display: grid; gap: 6px; margin-bottom: 18px; }
.campo label, .grupo-titulo, .revisao-rotulo {
  font-weight: 500;
  font-size: 0.95rem;
}
.opcional { font-weight: 400; color: var(--tinta-72); }
.campo input, .campo textarea {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.4;
  background: var(--papel-claro);
  border: 1px solid var(--tinta-60);
  border-radius: var(--raio);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.campo textarea { resize: vertical; min-height: 80px; }
.campo input::placeholder, .campo textarea::placeholder { color: rgb(27 36 51 / 0.55); }
.campo input:focus-visible, .campo textarea:focus-visible {
  outline: none;
  border-color: var(--tinta);
  box-shadow: 0 0 0 1px var(--tinta), 0 0 0 4px rgb(27 36 51 / 0.14);
}
.campo [aria-invalid="true"] { border-color: var(--lacre); box-shadow: 0 0 0 1px var(--lacre); }
.campo-ajuda { font-size: var(--t-p); color: var(--tinta-72); line-height: 1.5; }
.campo-erro { font-size: var(--t-p); color: var(--lacre); font-weight: 500; line-height: 1.45; }
.campo-erro:empty { display: none; }
.campo-erro::before { content: "— "; }
.campos-linha { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }

/* Checkbox customizado (o input real continua acessível) */
.check, .opcao {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  cursor: pointer;
  line-height: 1.45;
}
.check input, .opcao input {
  position: absolute;
  opacity: 0;
  width: 24px; height: 24px;
  margin: 0;
  left: 0;
}
.check-caixa {
  position: relative;
  width: 24px;
  height: 24px;
  flex: none;
  border: 1px solid var(--tinta-60);
  border-radius: var(--raio-p);
  background: var(--papel-claro);
  transition: background-color 0.25s, border-color 0.25s;
}
.check-caixa::after {
  content: "";
  position: absolute;
  left: 8px; top: 3px;
  width: 6px; height: 12px;
  border: solid var(--papel);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.3s var(--ease-saida);
}
input:checked + .check-caixa { background: var(--tinta); border-color: var(--tinta); }
input:checked + .check-caixa::after { transform: rotate(45deg) scale(1); }
input:focus-visible + .check-caixa { outline: 2px solid var(--tinta); outline-offset: 3px; }
input[aria-invalid="true"] + .check-caixa { border-color: var(--lacre); box-shadow: 0 0 0 1px var(--lacre); }
input:disabled + .check-caixa { opacity: 0.4; }
.opcao:has(input:disabled) { cursor: not-allowed; color: var(--tinta-72); }

/* Quantidade */
.qtd {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--tinta-60);
  border-radius: var(--raio);
  background: var(--papel-claro);
}
.qtd-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 52px;
  border: 0;
  background: none;
  color: var(--tinta);
}
.qtd-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.qtd-btn:hover:not(:disabled) { background: var(--papel-2); }
.qtd-valor {
  min-width: 2ch;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.qtd-p .qtd-btn { width: 44px; height: 44px; }

/* Selos */
.selo {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: var(--raio-p);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  background: var(--papel);
  color: var(--tinta);
}
.selo-mais-pedido { background: var(--lacre); color: var(--papel); }
.selo-novo { background: var(--tinta); color: var(--papel); }
.selo-vegetariano { background: var(--nori); color: var(--papel); }
.selo-picante { background: var(--papel); color: var(--lacre); }
.selo-18\+ { background: var(--tinta); color: var(--papel); }
.selo-esgotado {
  background: var(--papel);
  color: var(--lacre);
  box-shadow: inset 0 0 0 2px var(--lacre);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nota-info {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--raio);
  background: var(--papel-2);
  font-size: var(--t-p);
  line-height: 1.5;
}
.nota-info .ico { margin-top: 1px; }
