/* Preload da marca (tela de abertura). Independe de tokens.css para pintar no primeiro frame. */
.re-preload {
  --pl-bg: #FAF7F2; --pl-ink: #1F1B18; --pl-accent: #C05621; --pl-track: rgba(31, 27, 24, 0.1);
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: var(--pl-bg); color: var(--pl-ink);
  font-family: Georgia, 'Times New Roman', serif;
  opacity: 1; visibility: visible;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}
:root[data-theme="dark"] .re-preload { --pl-bg: #14110F; --pl-ink: #F3EDE4; --pl-accent: #F08A52; --pl-track: rgba(243, 237, 228, 0.14); }
.re-preload.is-done { opacity: 0; visibility: hidden; }

.re-preload-mark { width: 92px; height: 92px; overflow: visible; animation: pl-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.re-preload-tile { fill: #C05621; }
.re-preload-e { fill: #FAF7F2; font-family: Georgia, 'Times New Roman', serif; font-size: 46px; font-style: italic; font-weight: 700; animation: pl-fade 0.4s ease 0.25s both; }
.re-preload-dot { fill: #FAF7F2; animation: pl-drop 0.9s cubic-bezier(0.28, 0.84, 0.42, 1) 0.45s both; transform-box: fill-box; transform-origin: center; }

.re-preload-name { margin: 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.01em; animation: pl-rise 0.6s ease 0.8s both; }
.re-preload-name em { color: var(--pl-accent); }

.re-preload-bar { width: 132px; height: 3px; border-radius: 3px; background: var(--pl-track); overflow: hidden; animation: pl-fade 0.4s ease 0.9s both; }
.re-preload-bar::after { content: ""; display: block; width: 42%; height: 100%; border-radius: 3px; background: var(--pl-accent); animation: pl-run 1.1s ease-in-out 1s infinite; }

@keyframes pl-pop { from { transform: scale(0.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pl-drop {
  0% { transform: translateY(-34px) scale(0.6); opacity: 0; }
  55% { transform: translateY(0) scale(1, 0.8); opacity: 1; }
  75% { transform: translateY(-7px) scale(1); }
  100% { transform: none; opacity: 1; }
}
@keyframes pl-rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pl-run { from { transform: translateX(-100%); } to { transform: translateX(240%); } }

@media (prefers-reduced-motion: reduce) {
  .re-preload, .re-preload * { animation: none !important; transition-duration: 0.01s !important; }
}
@media print { .re-preload { display: none !important; } }

/* ===== Modelo B: contorno que se desenha, "e" escrito à mão, nome letra a letra, cortina sobe ===== */
.re-preload--b {
  --pl-bg: #C05621; --pl-ink: #FAF7F2; --pl-accent: #FAF7F2; --pl-track: rgba(250, 247, 242, 0.28);
  transition: transform 0.7s cubic-bezier(0.76, 0, 0.24, 1), visibility 0s linear 0.7s; opacity: 1;
}
:root[data-theme="dark"] .re-preload--b { --pl-bg: #C05621; --pl-ink: #FAF7F2; --pl-accent: #FAF7F2; --pl-track: rgba(250, 247, 242, 0.28); }
.re-preload--b.is-done { opacity: 1; transform: translateY(-100%); visibility: hidden; }
.re-preload--b .re-preload-mark { animation: none; width: 104px; height: 104px; }
.re-preload--b .re-preload-tile { fill: #FAF7F2; fill-opacity: 0; stroke: #FAF7F2; stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: 1; animation: plb-draw 0.9s ease-in-out 0.1s forwards, plb-fill 0.45s ease 1s forwards; }
.re-preload--b .re-preload-e { fill: #C05621; animation: plb-write 0.8s ease-in-out 1s both; }
.re-preload--b .re-preload-dot { fill: #C05621; animation: plb-dot 1.1s ease-in-out 1.8s infinite both; }
.re-preload--b .re-preload-name { animation: none; color: #FAF7F2; }
.re-preload--b .re-preload-name em { color: #FAF7F2; }
.re-preload--b .re-preload-name span { display: inline-block; opacity: 0; transform: translateY(0.5em); animation: pl-rise 0.45s ease forwards; animation-delay: calc(1.3s + var(--i) * 0.045s); white-space: pre; }
.re-preload--b .re-preload-bar { animation: pl-fade 0.3s ease 2s both; }

@keyframes plb-draw { to { stroke-dashoffset: 0; } }
@keyframes plb-fill { to { fill-opacity: 1; } }
@keyframes plb-write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes plb-dot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) {
  .re-preload--b .re-preload-tile { stroke-dashoffset: 0; fill-opacity: 1; }
  .re-preload--b .re-preload-name span { opacity: 1; transform: none; }
}

/* ===== Modelo C: anel orbital ao redor do ícone, ponto que gira, nome com reticências animadas ===== */
.re-preload--c { gap: 26px; transition: opacity 0.6s ease 0.1s, visibility 0s linear 0.7s; }
.re-orbit { position: relative; width: 156px; height: 156px; display: grid; place-items: center; animation: pl-fade 0.5s ease both; }
.re-orbit-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.re-orbit-ring .base { fill: none; stroke: var(--pl-track); stroke-width: 2; }
.re-orbit-ring .arc { fill: none; stroke: var(--pl-accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 90 350; transform-origin: 50% 50%; animation: plc-spin 1.6s cubic-bezier(0.55, 0.15, 0.4, 0.85) infinite; }
.re-orbit-spin { position: absolute; inset: 0; animation: plc-spin 2.4s linear infinite reverse; }
.re-orbit-spin::after { content: ""; position: absolute; top: -5px; left: calc(50% - 5px); width: 10px; height: 10px; border-radius: 50%; background: var(--pl-accent); }
.re-preload--c .re-preload-mark { width: 88px; height: 88px; animation: plc-breathe 2.2s ease-in-out infinite; }
.re-preload--c .re-preload-dot { animation: none; }
.re-preload--c .re-preload-name { animation: pl-rise 0.6s ease 0.3s both; }
.re-preload-caption { margin: -6px 0 0; font: 700 0.6875rem/1 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pl-ink); opacity: 0.6; animation: pl-fade 0.4s ease 0.6s both; }
.re-preload-caption i { font-style: normal; display: inline-block; animation: plc-blink 1.2s infinite both; }
.re-preload-caption i:nth-child(2) { animation-delay: 0.2s; }
.re-preload-caption i:nth-child(3) { animation-delay: 0.4s; }
.re-preload--c.is-done .re-preload-mark { transform: scale(1.5); transition: transform 0.7s cubic-bezier(0.5, 0, 0.2, 1); animation: none; }
.re-preload--c.is-done .re-orbit { opacity: 0; transition: opacity 0.3s ease; }

@keyframes plc-spin { to { transform: rotate(360deg); } }
@keyframes plc-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes plc-blink { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .re-orbit-spin, .re-orbit-ring .arc { animation: none !important; } }

/* ===== Modelo D: clean — ícone e nome surgem com um fade suave, linha fina de progresso ===== */
.re-preload--d { gap: 18px; transition: opacity 0.5s ease, visibility 0s linear 0.5s; }
.re-preload--d .re-preload-mark { width: 60px; height: 60px; animation: pl-fade 0.8s ease both; }
.re-preload--d .re-preload-e, .re-preload--d .re-preload-dot { animation: none; }
.re-preload--d .re-preload-name { font-size: 1.375rem; animation: pl-fade 0.8s ease 0.25s both; }
.re-preload--d .re-preload-bar { width: 96px; height: 1px; border-radius: 0; margin-top: 6px; animation: pl-fade 0.6s ease 0.5s both; }
.re-preload--d .re-preload-bar::after { width: 100%; border-radius: 0; transform-origin: left; animation: pld-fill 2s ease-in-out 0.5s both; }
@keyframes pld-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .re-preload--d .re-preload-bar::after { transform: none; } }

/* ===== Modelo E: clean com barra de progresso e ingredientes que "acendem" conforme carrega ===== */
.re-preload--e { gap: 16px; transition: opacity 0.5s ease, visibility 0s linear 0.5s; }
.re-preload--e .re-preload-mark { width: 56px; height: 56px; animation: pl-fade 0.7s ease both; }
.re-preload--e .re-preload-e, .re-preload--e .re-preload-dot { animation: none; }
.re-preload--e .re-preload-name { font-size: 1.375rem; animation: pl-fade 0.7s ease 0.2s both; }
.re-foods { display: flex; gap: 26px; margin-top: 12px; color: var(--pl-ink); }
.re-foods svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.18; animation: ple-on 0.5s ease forwards; animation-delay: calc(0.5s + var(--i) * 0.4s); }
.re-foods svg:nth-child(odd) { color: var(--pl-accent); }
.re-preload--e .re-preload-bar { width: 220px; height: 4px; margin-top: 2px; animation: pl-fade 0.5s ease 0.4s both; }
.re-preload--e .re-preload-bar::after { width: 100%; transform-origin: left; animation: pld-fill 2.4s cubic-bezier(0.45, 0.05, 0.4, 1) 0.5s both; }
.re-preload-caption--e { margin: 0; font: 700 0.6875rem/1 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pl-ink); opacity: 0; animation: ple-cap 0.5s ease 0.7s forwards; }
@keyframes ple-on { to { opacity: 1; } }
@keyframes ple-cap { to { opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) { .re-foods svg { opacity: 1; animation: none; } .re-preload--e .re-preload-bar::after { transform: none; } .re-preload-caption--e { opacity: 0.6; animation: none; } }

/* ===== Modelo F: ingredientes que pulam em onda (sem logomarca) ===== */
.re-preload--f { gap: 30px; transition: opacity 0.5s ease, visibility 0s linear 0.5s; }
.re-hops { display: flex; gap: 20px; align-items: flex-end; color: var(--pl-ink); animation: pl-fade 0.5s ease both; }
.re-hop { position: relative; display: block; padding-bottom: 10px; }
.re-hop::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 22px; height: 4px; margin-left: -11px; border-radius: 50%; background: var(--pl-ink); opacity: 0.12; animation: plf-shadow 1.5s ease-in-out infinite; animation-delay: calc(var(--i) * 0.14s); }
.re-hop svg { display: block; width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; animation: plf-hop 1.5s cubic-bezier(0.3, 0, 0.3, 1) infinite; animation-delay: calc(var(--i) * 0.14s); }
.re-hop:nth-child(odd) svg { color: var(--pl-accent); }
.re-preload-caption--f { margin: 0; font: 700 0.6875rem/1 system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pl-ink); opacity: 0.6; animation: pl-fade 0.5s ease 0.3s both; }
@keyframes plf-hop { 0%, 55%, 100% { transform: translateY(0); } 25% { transform: translateY(-16px); } 40% { transform: translateY(0); } 47% { transform: translateY(-3px); } }
@keyframes plf-shadow { 0%, 55%, 100% { transform: scaleX(1); opacity: 0.12; } 25% { transform: scaleX(0.55); opacity: 0.05; } }
@media (prefers-reduced-motion: reduce) { .re-hop svg, .re-hop::after { animation: none; } }

/* Tokens de design — única fonte de cores, espaçamentos e tipografia.
   Valores herdados de referencias/receitas_essenciais (18).html. */
:root {
  color-scheme: light;
  /* Cores */
  --bg-canvas: #FAF7F2;
  --bg-surface: #FFFFFF;
  --bg-warm: #F4EFE6;
  --bg-sage-soft: #EDF3F1;
  --bg-terracotta-soft: #FDF3ED;

  --ink-primary: #1F1B18;
  --ink-secondary: #5C534A;
  --ink-muted: #72685D;

  --accent-terracotta: #C05621;
  --accent-terracotta-dark: #9C4215;
  --accent-sage: #2F5D50;
  --accent-sage-dark: #23473D;
  --accent-gold: #B7791F;

  --bg-chip: #F3EEE6;
  --ink-ui: #1F1B18;
  --tint-sage: #EEF3F0;

  --border-light: #E6DFD5;
  --border-medium: #D4C9BA;

  /* Cor de destaque por categoria (barra superior dos cards) */
  --cat-pratos-principais: #C05621;
  --cat-padaria-e-lanches: #B7791F;
  --cat-caldos-e-sopas: #2F5D50;
  --cat-doces-e-sobremesas: #7A2E45;
  --cat-sobremesas: #7A2E45;
  --cat-massas: #6B7A2F;
  --cat-peixes-e-frutos-do-mar: #2F6575;

  --accent-navy: #1E3A8A;
  --state-error: #B42318;
  --state-error-soft: #FEF3F2;
  --bg-notes: #F3EFE8;

  --focus-ring: var(--accent-sage);

  /* Papéis de cor que mudam por tema */
  --accent-text: #AE4C1B;          /* terracotta usado como texto */
  --accent-text-strong: #9C4215;   /* terracotta escuro usado como texto */
  --sage-fill: #2F5D50;            /* verde usado como fundo com texto branco */
  --sage-fill-dark: #23473D;
  --on-ink: #FFFFFF;               /* texto sobre --ink-ui */
  --ink-hover: #3A342E;
  --ink-body: #3A342E;
  --ink-hint: #6B6259;

  /* Tipografia */
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --font-card: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --font-mono: ui-monospace, 'Cascadia Mono', Consolas, 'Courier New', monospace;

  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.625rem;
  --text-2xl: 2.125rem;
  --text-3xl: 2.75rem;

  --leading-tight: 1.15;
  --leading-normal: 1.6;
  --leading-reading: 1.75;

  /* Espaçamento (escala de 4 px) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  /* Raios e sombras */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 10px rgba(31, 27, 24, 0.04);
  --shadow-md: 0 10px 28px rgba(31, 27, 24, 0.07);
  --shadow-lg: 0 22px 48px rgba(31, 27, 24, 0.16);

  /* Layout */
  --container-max: 72rem;
  --container-reading: 44rem;
  --container-wide: 87.5rem;
  --gutter-wide: clamp(1rem, 3.2vw, 3rem);
  --container-pad: var(--space-4);
  --tap-min: 44px;

  /* Movimento */
  --transition: 180ms ease;
}

/* Pontos de quebra Mobile First (variáveis CSS não funcionam em @media;
   usar sempre estes valores): 40em (640px) · 48em (768px) · 64em (1024px) · 80em (1280px). */
@media (min-width: 48em) {
  :root { --container-pad: var(--space-5); }
}

/* Tema escuro */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-canvas: #14110F;
  --bg-surface: #1D1916;
  --bg-warm: #28221D;
  --bg-sage-soft: #1C2824;
  --bg-terracotta-soft: #2B1D15;
  --bg-chip: #2A241F;
  --bg-notes: #1F232E;
  --tint-sage: #1C2824;

  --ink-primary: #F3EDE4;
  --ink-secondary: #C9BFB3;
  --ink-muted: #A09588;
  --ink-ui: #F3EDE4;
  --on-ink: #14110F;
  --ink-hover: #D8CFC3;
  --ink-body: #DDD4C8;
  --ink-hint: #A09588;

  --accent-sage: #7DBDA8;
  --accent-sage-dark: #A8D8C7;
  --accent-gold: #D69A3A;
  --accent-navy: #8FA9F0;
  --accent-text: #F08A52;
  --accent-text-strong: #F4A273;
  --state-error: #F97066;
  --state-error-soft: #2E1715;

  --border-light: #35302A;
  --border-medium: #4A4239;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 22px 48px rgba(0, 0, 0, 0.55);
}

/* Reset, tipografia e utilitários globais. Usa apenas tokens de tokens.css. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg-canvas);
  color: var(--ink-primary);
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--ink-primary);
}
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
@media (min-width: 48em) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
}

p { max-width: var(--container-reading); line-height: var(--leading-reading); }
img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { padding-left: var(--space-5); }
a { color: var(--accent-sage); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-sage-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::placeholder { color: var(--ink-muted); opacity: 1; }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Texto ampliado: palavras longas quebram em vez de estourar a coluna */
h1, h2, h3, h4, p, li, dt, dd, label { overflow-wrap: anywhere; }

main:focus { outline: none; } /* alvo do link "pular para o conteúdo" */

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

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

.skip-link {
  position: absolute; left: var(--space-3); top: -100%;
  z-index: 1000; padding: var(--space-2) var(--space-4);
  background: var(--sage-fill-dark); color: #fff;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-3); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Estrutura de página: contêiner largo, cabeçalho, rodapé. Mobile First. */
.container-wide { width: 100%; max-width: var(--container-wide); margin-inline: auto; padding-inline: var(--gutter-wide); }

.masthead { background: var(--bg-canvas); border-bottom: 1px solid var(--border-light); }
.masthead-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); padding-block: var(--space-4); }
.brand-link { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--ink-primary); }
.brand-link:hover { color: var(--ink-primary); }
.brand-title { font-family: var(--font-serif); font-weight: 700; font-size: 1.75rem; line-height: 1.1; letter-spacing: -0.01em; }
.brand-title em { font-weight: 700; color: var(--accent-text); }
.brand-tagline { margin-top: 4px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.nav-group { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.nav-btn { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap-min); padding: 0 var(--space-5); border: 1px solid var(--border-medium); border-radius: var(--radius-pill); background: var(--bg-surface); color: var(--ink-ui); font-size: var(--text-sm); font-weight: 600; text-decoration: none; transition: background var(--transition); }
.nav-btn:hover { background: var(--bg-warm); color: var(--ink-ui); }
.nav-btn.is-primary { background: var(--ink-ui); border-color: var(--ink-ui); color: var(--on-ink); }
.nav-btn.is-primary:hover { background: var(--ink-hover); color: var(--on-ink); }
.count-pill { min-width: 1.5rem; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--bg-chip); color: var(--ink-secondary); font-size: var(--text-xs); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
@media (min-width: 48em) {
  .masthead-inner { padding-block: var(--space-5); }
  .brand-title { font-size: 2.25rem; }
  .brand-tagline { font-size: 0.75rem; }
}

/* Navegação: menu em ícone (< 64em) e botões (>= 64em) */
.masthead { position: relative; z-index: 50; }
.nav-desktop { display: none; }
.menu-toggle { display: grid; place-items: center; width: var(--tap-min); height: var(--tap-min); border: 1px solid var(--border-medium); border-radius: 50%; background: var(--bg-surface); color: var(--ink-ui); }
.menu-toggle:hover { background: var(--bg-warm); }
.menu-toggle .icon-close, .menu-toggle[aria-expanded="true"] .icon-bars { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-panel { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-canvas); border-bottom: 1px solid var(--border-light); box-shadow: var(--shadow-md); }
.menu-panel ul { list-style: none; padding: var(--space-2) var(--gutter-wide); max-width: var(--container-wide); margin-inline: auto; }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: 100%; min-height: 3.25rem; padding: 0; border: 0; border-bottom: 1px solid var(--border-light); background: none; color: var(--ink-ui); font-size: var(--text-base); font-weight: 600; text-align: left; text-decoration: none; }
.menu-panel li:last-child .menu-item { border-bottom: 0; }
.menu-item:hover { color: var(--accent-text-strong); }
@media (max-width: 40em) { .brand-title { font-size: 1.375rem; } }
@media (min-width: 64em) {
  .nav-desktop { display: flex; gap: var(--space-3); }
  .menu-toggle, .menu-panel { display: none !important; }
}

main { padding-block: var(--space-6) var(--space-8); }
.site-footer { border-top: 1px solid var(--border-light); padding-block: var(--space-6) var(--space-7); color: var(--ink-muted); font-size: var(--text-sm); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5); }
.site-footer strong { color: var(--ink-secondary); }

/* Ações do cabeçalho e alternância de tema */
.masthead-actions { display: flex; align-items: center; gap: var(--space-3); }
.theme-toggle { display: grid; place-items: center; width: var(--tap-min); height: var(--tap-min); border: 1px solid var(--border-medium); border-radius: 50%; background: var(--bg-surface); color: var(--ink-ui); }
.theme-toggle:hover { background: var(--bg-warm); }
.theme-toggle .icon-sun, .theme-toggle[aria-pressed="true"] .icon-moon { display: none; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
@media (max-width: 40em) {
  .masthead-actions { gap: var(--space-2); }
  .brand-tagline { font-size: 0.625rem; letter-spacing: 0.08em; }
}
@media (max-width: 30em) { .brand-tagline { display: none; } }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.footer-links a { color: var(--ink-secondary); }

/* Símbolo da logomarca no topo */
.brand-text { display: flex; flex-direction: column; }
.brand-mark { --mk-tile: #C05621; --mk-e: #FAF7F2; flex: none; width: 2.25rem; height: 2.25rem; }
@media (min-width: 48em) { .brand-mark { width: 2.75rem; height: 2.75rem; } }
@media (max-width: 30em) { .brand-mark { width: 2rem; height: 2rem; } }

/* Escolha do visitante: animação de abertura (desligada por padrão) */

/* Reserva a altura do cabeçalho (montado por JS) para não empurrar o conteúdo ao carregar */
#app-header:empty { min-height: 4.8rem; }
@media (max-width: 23.5em) { #app-header:empty { min-height: 7.6rem; } }
@media (min-width: 48em) { #app-header:empty { min-height: 7rem; } }



/* Componentes reutilizáveis. */
.muted { color: var(--ink-muted); font-size: var(--text-sm); }

/* Capas das receitas (só aparecem quando há imagem cadastrada) */
.card-cover { position: absolute; inset: 0; z-index: 0; display: block; margin: 0; overflow: hidden; background: var(--bg-muted, #efe9df); }
.card-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15, 10, 6, 0.9) 0%, rgba(15, 10, 6, 0.62) 42%, rgba(15, 10, 6, 0.3) 100%); pointer-events: none; }
.card-img, .card-img img, .hero-cover, .hero-cover img, .recipe-cover-pic, .recipe-cover-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-img img { transition: transform 0.5s ease; }
.recipe-card:hover .card-img img, .recipe-card:focus-within .card-img img { transform: scale(1.05); }
/* Card com capa: a foto fica por trás do texto */
.recipe-card:has(.card-cover), .recipe-card:has(.card-cover):hover, .recipe-card:has(.card-cover):focus-within { min-height: 26rem; background: #1f1812; border-color: transparent; color: #fff; }
.recipe-card:has(.card-cover) > :not(.card-cover) { z-index: 1; }   /* itens flex: z-index vale sem position (o botão de salvar continua absoluto) */
.recipe-card:has(.card-cover) .card-foot { margin-top: 0; }
.recipe-card:has(.card-cover) .card-top { min-height: 56px; padding-right: 52px; border-color: rgba(255, 255, 255, 0.28); }
.recipe-card:has(.card-cover) .card-body { flex: 0 0 auto; margin-top: auto; padding: var(--space-6) 0 var(--space-4); }
.recipe-card:has(.card-cover) .card-num-cat, .recipe-card:has(.card-cover) .card-num { color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55); }
.recipe-card:has(.card-cover) .card-title, .recipe-card:has(.card-cover) .card-title a { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.recipe-card:has(.card-cover) .card-excerpt { color: rgba(255, 255, 255, 0.9); text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.recipe-card:has(.card-cover) .card-tags li { color: #fff; background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.35); backdrop-filter: blur(2px); }
.recipe-card:has(.card-cover) .card-foot { border-color: rgba(255, 255, 255, 0.28); }
.recipe-card:has(.card-cover) .card-meta, .recipe-card:has(.card-cover) .card-open { color: #fff; }
.recipe-card:has(.card-cover) .card-save { z-index: 2; color: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6)); }
.recipe-card:has(.card-cover) .card-save:hover, .recipe-card:has(.card-cover) .card-save[aria-pressed="true"] { color: #ffd9bf; }
.hero-cover { aspect-ratio: 16 / 10; height: auto; margin-bottom: var(--space-4); border-radius: var(--radius-lg); overflow: hidden; }
/* Página da receita: a foto fica por trás do cabeçalho */
.recipe-head--cover { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; min-height: clamp(20rem, 46vw, 30rem); margin-bottom: var(--space-6); padding: var(--space-7) var(--space-5) var(--space-6); border-radius: var(--radius-xl); overflow: hidden; background: #1f1812; color: #fff; }
.recipe-head-bg, .recipe-head-bg img { position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%; object-fit: cover; }
.recipe-head--cover::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(15, 10, 6, 0.9) 0%, rgba(15, 10, 6, 0.62) 50%, rgba(15, 10, 6, 0.3) 100%); }
.recipe-head--cover .recipe-eyebrow, .recipe-head--cover .recipe-title, .recipe-head--cover .recipe-sub { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.recipe-head--cover .recipe-eyebrow { margin-top: 0; }
@media (min-width: 48em) { .recipe-head--cover { padding: var(--space-8) var(--space-7) var(--space-7); } }
@media (prefers-reduced-motion: reduce) { .card-img img { transition: none; } .recipe-card:hover .card-img img { transform: none; } }
@media print { .card-cover, .hero-cover, .recipe-head-bg { display: none; } .recipe-head--cover { min-height: 0; padding: 0; background: none; color: inherit; } .recipe-head--cover::after { display: none; } .recipe-head--cover .recipe-eyebrow, .recipe-head--cover .recipe-title, .recipe-head--cover .recipe-sub { color: inherit; text-shadow: none; } }
.breadcrumb + .recipe-head--cover { margin-top: var(--space-3); }

/* Login, cadastro e recuperação de senha — painel dividido. Mobile First. */
.auth-wrap { display: grid; max-width: 70rem; margin-block: var(--space-6) var(--space-8); padding: 0; overflow: hidden; background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }

/* painel terracotta (cor de destaque do site) */
.auth-aside { position: relative; padding: var(--space-6) var(--space-5); background: var(--accent-terracotta-dark); color: #FFF8F1; }
.auth-aside::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--accent-gold); }
.auth-eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #FBD9A8; }
.auth-aside-title { margin-top: var(--space-3); font-family: var(--font-card); font-size: clamp(1.625rem, 5vw, 2.5rem); line-height: 1.15; color: #fff; }
.auth-aside-title em { font-style: italic; color: #FBD9A8; }
.auth-aside-text { display: none; margin-top: var(--space-5); font-size: var(--text-base); line-height: 1.75; color: #FCE9DA; }

/* formulário */
.auth-card { padding: var(--space-6) var(--space-5) var(--space-7); }
.auth-card h1 { font-family: var(--font-card); font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.15; }
.auth-lead { margin-top: var(--space-2); color: var(--ink-secondary); }
.auth-form { display: grid; gap: var(--space-5); margin-top: var(--space-6); }

.auth-field label { display: block; margin-bottom: var(--space-1); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-secondary); }
.auth-input { width: 100%; min-height: 3rem; padding: 0; border: 0; border-bottom: 1.5px solid var(--border-medium); border-radius: 0; background: transparent; color: var(--ink-primary); font: inherit; font-size: var(--text-lg); transition: border-color var(--transition); }
.auth-input:hover { border-bottom-color: var(--ink-muted); }
.auth-input:focus-visible { outline: 2px solid var(--accent-sage); outline-offset: 2px; border-bottom-color: var(--accent-terracotta); }
.auth-input[aria-invalid="true"] { border-bottom-color: var(--state-error); }
.pw-wrap { position: relative; }
.pw-wrap .auth-input { padding-right: 5rem; }
.pw-toggle { position: absolute; inset-block: 4px; right: 0; min-width: 4.5rem; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-sm); background: none; color: var(--accent-text-strong); font-size: var(--text-sm); font-weight: 600; }
.pw-toggle:hover { text-decoration: underline; }
.pw-toggle:focus-visible { outline: 2px solid var(--accent-sage); outline-offset: 0; }
.auth-hint { margin-top: var(--space-2); font-size: var(--text-xs); color: var(--ink-muted); }
.auth-error { margin-top: var(--space-2); font-size: var(--text-sm); font-weight: 500; color: var(--state-error); }
.auth-error[hidden], .auth-alert[hidden], .auth-status[hidden] { display: none; }

.auth-check { display: grid; grid-template-columns: auto 1fr; gap: 0 var(--space-3); align-items: start; }
.auth-check input { appearance: none; width: 1.5rem; height: 1.5rem; margin: 0; border: 1.5px solid var(--border-medium); border-radius: 6px; background: var(--bg-surface); cursor: pointer; }
.auth-check input:checked { border-color: var(--accent-terracotta); background: var(--accent-terracotta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 80% no-repeat; }
.auth-check input:focus-visible { outline: 2px solid var(--accent-sage); outline-offset: 2px; }
.auth-check input[aria-invalid="true"] { border-color: var(--state-error); }
.auth-check label { margin: 0; font-size: var(--text-sm); font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.5; color: var(--ink-primary); }
.auth-check .auth-error { grid-column: 2; }

.auth-row { font-size: var(--text-sm); }
.auth-submit { display: flex; align-items: center; justify-content: space-between; min-height: 3.25rem; padding: 0 var(--space-5); border: 0; border-radius: var(--radius-md); background: var(--ink-ui); color: var(--on-ink); font-size: var(--text-base); font-weight: 700; transition: background var(--transition); }
.auth-submit::after { content: "→"; font-size: 1.25rem; }
.auth-submit:hover { background: var(--accent-terracotta); color: #fff; }
.auth-submit:focus-visible { outline: 2px solid var(--accent-sage); outline-offset: 3px; }
.auth-alert { padding: var(--space-3) var(--space-4); background: var(--state-error-soft); border-left: 3px solid var(--state-error); border-radius: var(--radius-sm); font-size: var(--text-sm); color: var(--state-error); }
.auth-status { padding: var(--space-3) var(--space-4); background: var(--bg-notes); border-left: 3px solid var(--accent-navy); border-radius: var(--radius-sm); font-size: var(--text-sm); line-height: 1.6; }
.auth-switch { margin-top: var(--space-6); font-size: var(--text-sm); color: var(--ink-secondary); }
.auth-card a { font-weight: 600; }

@media (min-width: 40em) { .auth-aside, .auth-card { padding-inline: var(--space-7); } .auth-card { padding-block: var(--space-7); } }
@media (min-width: 64em) {
  .auth-wrap { grid-template-columns: 5fr 6fr; min-height: 36rem; }
  .auth-aside { display: flex; flex-direction: column; justify-content: center; padding: var(--space-8); }
  .auth-aside-text { display: block; }
  .auth-card { display: flex; flex-direction: column; justify-content: center; max-width: 34rem; padding: var(--space-8); }
}

