/* ===========================================================
   Dachō Sushi — global.css
   Sistema de design: cor, tipografia, espaço, motion.
   Base de todos os outros arquivos. Carregue-o primeiro.
   =========================================================== */

/* -----------------------------------------------------------
   1. Reset
   ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

img, svg, picture, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* -----------------------------------------------------------
   2. Tokens
   ----------------------------------------------------------- */
:root {
  /* --- Paleta oficial Dachō (não alterar) --- */
  --color-vinho:    #4C0000;
  --color-marrom:   #533223;
  --color-caramelo: #68513E;
  --color-bege:     #C9BFB5;
  --color-preto:    #0F0B09;
  --color-branco:   #F5F0EB;

  /* --- Camadas de profundidade ---
     A hierarquia vem de superfícies que sobem, não de bordas.
     Cada nível clareia um pouco em relação ao anterior. */
  --surface-0: #0B0807;   /* fundo da página, mais fundo que o preto da marca */
  --surface-1: #0F0B09;   /* preto oficial: seções */
  --surface-2: #161110;    /* elementos elevados */
  --surface-3: #1E1715;    /* hover de elementos elevados */

  /* --- Fios ---
     Quase invisíveis. Separam sem desenhar caixas. */
  --hairline:        rgba(245, 240, 235, 0.07);
  --hairline-strong: rgba(245, 240, 235, 0.13);

  /* --- Texto --- */
  --text-1: #F5F0EB;                  /* títulos e destaque    17.3:1 */
  --text-2: #BCAFA4;                  /* corpo                  9.1:1 */
  --text-3: #8A7C72;                  /* apoio e rótulos        4.7:1 */

  /* --- Acento ---
     O vinho oficial some no escuro (1.22:1). Para texto e traço
     sobre fundo escuro usamos a versão clareada. */
  --vinho:        #4C0000;
  --vinho-deep:   #380000;
  --vinho-bright: #C62828;   /* 3.48:1 — AA para texto grande */

  /* --- Tipografia --- */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Escala: títulos grandes pedem tracking negativo para não
     parecerem soltos; textos pequenos pedem o contrário. */
  --step-hero:  clamp(2.75rem, 7.5vw, 6rem);
  --step-1:     clamp(2rem, 4.5vw, 3.5rem);
  --step-2:     clamp(1.35rem, 2.2vw, 1.75rem);
  --step-body:  clamp(1rem, 1.1vw, 1.0625rem);
  --step-small: 0.875rem;
  --step-label: 0.6875rem;

  --track-tight:  -0.03em;
  --track-normal: -0.011em;
  --track-label:   0.16em;

  /* --- Espaço ---
     Ritmo variável: seções não têm todas o mesmo respiro. */
  --space-section:       clamp(5rem, 11vh, 9rem);
  --space-section-tight: clamp(3rem, 6vh, 4.5rem);
  --gutter:              clamp(1.25rem, 5vw, 2.5rem);
  --container:           1240px;
  --measure:             62ch;

  /* --- Forma --- */
  --radius:    10px;
  --radius-lg: 16px;

  /* --- Motion ---
     Curta e ease-out: começa rápido, transmite resposta imediata.
     Só transform e opacity, que rodam fora da main thread. */
  --dur-fast: 140ms;
  --dur:      220ms;
  --dur-slow: 420ms;
  --ease:     cubic-bezier(0.16, 1, 0.3, 1);

  --nav-height: 76px;
}

/* -----------------------------------------------------------
   3. Base
   ----------------------------------------------------------- */
body {
  font-family: var(--font-body);
  font-size: var(--step-body);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: var(--track-normal);
  background: var(--surface-0);
  color: var(--text-2);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

::selection { background: var(--vinho-bright); color: var(--color-branco); }

/* Qualquer alvo de âncora precisa escapar do cabeçalho fixo */
[id] { scroll-margin-top: calc(var(--nav-height) + 24px); }

/* -----------------------------------------------------------
   4. Tipografia utilitária
   ----------------------------------------------------------- */

/* Rótulo-guia: numeração/categoria acima dos títulos.
   É o que dá o ar editorial e substitui subtítulos redundantes. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: var(--step-label);
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--vinho-bright);
  flex: none;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.02;
  letter-spacing: var(--track-tight);
  color: var(--text-1);
  text-wrap: balance;
}

.lede {
  max-width: var(--measure);
  font-size: var(--step-2);
  line-height: 1.5;
  color: var(--text-2);
  text-wrap: pretty;
}

/* -----------------------------------------------------------
   5. Layout
   ----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-section);
  padding-inline: var(--gutter);
}
.section--tight { padding-block: var(--space-section-tight); }

.section__head {
  max-width: var(--container);
  margin-inline: auto;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* -----------------------------------------------------------
   6. Botões
   ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  font-size: var(--step-small);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  /* transform+opacity+color: composite, sem reflow */
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn:active { transform: scale(0.97); }   /* resposta tátil imediata */

.btn--primary {
  background: var(--vinho);
  color: var(--color-branco);
  box-shadow: inset 0 1px 0 rgba(245, 240, 235, 0.09);
}
.btn--primary:hover { background: #5E0000; }

.btn--ghost {
  background: rgba(245, 240, 235, 0.06);
  color: var(--text-1);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.btn--ghost:hover {
  background: rgba(245, 240, 235, 0.11);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}

.btn--block { width: 100%; }
.btn--sm { padding: 0.65rem 1rem; font-size: 0.8125rem; }

/* Link com seta que avança no hover */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--step-small);
  font-weight: 500;
  color: var(--text-1);
  transition: color var(--dur) var(--ease);
}
.link-arrow svg {
  width: 14px; height: 14px;
  transition: transform var(--dur) var(--ease);
}
.link-arrow:hover { color: var(--vinho-bright); }
.link-arrow:hover svg { transform: translateX(3px); }

/* -----------------------------------------------------------
   7. Acessibilidade
   ----------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -120%; left: 1rem;
  z-index: 2000;
  padding: 0.75rem 1rem;
  background: var(--vinho);
  color: var(--color-branco);
  border-radius: var(--radius);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--vinho-bright);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }
