/* ==========================================================================
   Bella Vie — base.css  (tokens, tipografia, botões, cabeçalho e rodapé)
   Compartilhado por index.html, agendar.html e painel.html
   Paleta original mantida: creme, areia, dourado e marrom-café.
   ========================================================================== */

:root {
  --cream: #fbf8f4;
  --sand: #f1e8dc;
  --sand-deep: #e6d8c5;
  --ink: #2a211c;
  --ink-soft: #5a4c42;
  --night: #221a15;          /* seções escuras (derivado do marrom) */
  --gold: #b08d57;
  --gold-deep: #8a6a3a;      /* dourado para texto pequeno: contraste AA no creme */
  --gold-light: #dcc59a;
  --line: rgba(42, 33, 28, 0.14);
  --ok: #3f6b4f;
  --danger: #9a3b30;

  --font-display: 'Bodoni Moda', 'Didot', 'Times New Roman', serif;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --header-h: 76px;
  --wrap: min(1180px, 100% - 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(176, 141, 87, 0.3); }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: calc(var(--header-h) - 8px); }

.wrap { width: var(--wrap); margin-inline: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h2 { font-size: clamp(2.2rem, 4.6vw, 3.9rem); }
p { text-wrap: pretty; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }
.muted { color: var(--ink-soft); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 4px;
}
.skip-link:focus { top: 12px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 28px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 500; font-size: 0.98rem; letter-spacing: 0.01em; line-height: 1;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.btn-solid { background: var(--ink); color: var(--cream); }
.btn-solid:hover { background: var(--gold-deep); }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--cream); }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: var(--gold-light); }
.btn-line-light { border-color: rgba(251, 248, 244, .55); color: var(--cream); }
.btn-line-light:hover { background: var(--cream); color: var(--ink); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-underline {
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px; transition: background-size .35s var(--ease);
}
.link-underline:hover { background-size: 0 1px; background-position: 100% 100%; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header.is-solid, .site-header.is-scrolled {
  background: rgba(251, 248, 244, .86);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.brand span { font: 400 1.55rem/1 var(--font-display); letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 34px; font-size: .95rem; color: var(--ink-soft); }
.nav-links a { position: relative; padding: 6px 0; transition: color .25s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav .btn { min-height: 44px; padding: 0 22px; font-size: .92rem; }

.menu-toggle { display: none; width: 44px; height: 44px; background: none; border: 0; position: relative; }
.menu-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .2s; }
.menu-toggle span:nth-child(1) { top: 16px; } .menu-toggle span:nth-child(2) { top: 22px; } .menu-toggle span:nth-child(3) { top: 28px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99; background: var(--cream);
  padding: 8px 24px 28px; border-bottom: 1px solid var(--line);
  display: none; flex-direction: column;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a { padding: 15px 0; border-bottom: 1px solid var(--line); font: 400 1.5rem/1.2 var(--font-display); }
.mobile-menu .btn { margin-top: 20px; font: 500 1rem var(--font-body); border-bottom: 0; color: var(--cream); }

@media (max-width: 900px) {
  .nav-links, .nav > .btn { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Rodapé ---------- */
.site-footer { background: var(--night); color: rgba(251, 248, 244, .78); padding: 84px 0 28px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.site-footer .brand span { color: var(--cream); }
.site-footer h3 { font: 500 .9rem/1.2 var(--font-body); letter-spacing: .02em; color: var(--gold-light); margin-bottom: 16px; }
.site-footer p { font-size: .98rem; max-width: 36ch; margin-top: 18px; }
.site-footer li { margin: 8px 0; }
.site-footer a:hover { color: var(--cream); }
.footer-bottom {
  margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(251, 248, 244, .14);
  display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; font-size: .88rem;
}
.dev-signature { display: inline-flex; align-items: center; gap: 10px; }
.dev-signature img { width: 24px; height: 24px; border-radius: 50%; }
@media (max-width: 800px) { .footer-top { grid-template-columns: 1fr; gap: 36px; } }

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