/* ─────────────────────────────────────────────
   Pastelaria Bérgamo · Design tokens & base
   Aesthetic: editorial italiano-rústico,
   tipografia Fraunces (display) + Bricolage (UI).
   ───────────────────────────────────────────── */

:root {
  /* Marca */
  --c-wine: #8B1E1E;
  --c-wine-deep: #6E1313;
  --c-wine-ink: #4A0C0C;
  --c-forest: #1F4D2B;
  --c-forest-deep: #143620;
  --c-whatsapp: #25D366;
  --c-whatsapp-deep: #128C7E;
  --c-gold: #F2B84B;
  --c-gold-soft: #F7C65A;
  --c-amber: #D88F2E;
  --c-wood: #5A2E1B;
  --c-paper: #F5E6C8;
  --c-cream: #FFF8EC;
  --c-ink: #2B1B12;
  --c-ink-muted: #6B5440;
  --c-rule: #d8c6a1;

  /* Tipografia */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-ui: 'Bricolage Grotesque', system-ui, sans-serif;

  /* Espaços e raios */
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Sombras quentes */
  --shadow-card: 0 1px 0 rgba(74, 12, 12, .04), 0 12px 28px -16px rgba(74, 12, 12, .25);
  --shadow-soft: 0 1px 0 rgba(74, 12, 12, .05), 0 6px 18px -10px rgba(74, 12, 12, .2);
  --shadow-deep: 0 30px 60px -30px rgba(74, 12, 12, .55);

  --grain-url: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.2 0 0 0 0 0.08 0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

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

[hidden] { display: none !important; }

html, body, #app { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: var(--grain-url);
  opacity: .35;
  mix-blend-mode: multiply;
  z-index: 0;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--c-gold) 80%, #fff);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--c-wine-ink);
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: 0; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--c-wood);
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
  position: relative;
  z-index: 1;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--c-wine);
  color: var(--c-cream);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--c-wine-deep); transform: translateY(-1px); }
.btn-whatsapp {
  background: var(--c-whatsapp);
  color: #ffffff;
  box-shadow: 0 1px 0 rgba(18, 140, 126, .15), 0 10px 22px -12px rgba(18, 140, 126, .55);
}
.btn-whatsapp:hover { background: var(--c-whatsapp-deep); transform: translateY(-1px); }
.btn-gold { background: var(--c-gold); color: var(--c-wine-ink); box-shadow: var(--shadow-soft); }
.btn-gold:hover { background: var(--c-gold-soft); transform: translateY(-1px); }
.btn-ghost {
  border: 1.5px solid var(--c-wine);
  color: var(--c-wine);
}
.btn-ghost:hover { background: rgba(139, 30, 30, .06); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--c-paper);
  color: var(--c-wood);
  border: 1px solid var(--c-rule);
}
.tag-gold { background: var(--c-gold); color: var(--c-wine-ink); border-color: transparent; }
.tag-forest { background: var(--c-forest); color: var(--c-cream); border-color: transparent; }
.tag-wine { background: var(--c-wine); color: var(--c-cream); border-color: transparent; }

/* Divisor handmade */
.rule-fancy {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--c-wood);
  font-family: var(--font-display);
  font-style: italic;
  font-size: .95rem;
}
.rule-fancy::before, .rule-fancy::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--c-rule), transparent);
}

/* Status dot */
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-forest);
  box-shadow: 0 0 0 4px rgba(31, 77, 43, .14);
  animation: pulse 2.4s ease-out infinite;
}
.status-dot.closed { background: #b04040; box-shadow: 0 0 0 4px rgba(176, 64, 64, .14); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 77, 43, .35); }
  100% { box-shadow: 0 0 0 12px rgba(31, 77, 43, 0); }
}

/* Inputs */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-wood);
}
.field input, .field textarea, .field select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: var(--c-cream);
  border: 1.5px solid var(--c-rule);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: .95rem;
  color: var(--c-ink);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--c-wine);
  box-shadow: 0 0 0 4px rgba(139, 30, 30, .12);
}
.field textarea { min-height: 110px; resize: vertical; }

/* Cards genéricos */
.card {
  background: var(--c-cream);
  border: 1px solid var(--c-rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, #efe0bd 0%, #f7e8c4 50%, #efe0bd 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Util scroll */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; }

/* Entrada suave em hero */
.fade-up {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) forwards;
}
.fade-up.delay-1 { animation-delay: .08s; }
.fade-up.delay-2 { animation-delay: .18s; }
.fade-up.delay-3 { animation-delay: .28s; }
.fade-up.delay-4 { animation-delay: .38s; }
@keyframes fadeUp {
  to { opacity: 1; transform: none; }
}

/* WhatsApp icon glyph baseado em CSS */
.wa-glyph::before {
  content: '';
  display: inline-block;
  width: 18px; height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20.5 3.5A11.4 11.4 0 0 0 12 0C5.6 0 .3 5.2.3 11.6c0 2 .5 3.9 1.5 5.6L0 24l7-1.8a11.5 11.5 0 0 0 5 1.2c6.4 0 11.7-5.2 11.7-11.6 0-3.1-1.2-6-3.2-8.3zM12 21.4c-1.6 0-3.2-.4-4.6-1.2l-.3-.2-4 1 1.1-4-.2-.3a9.6 9.6 0 0 1-1.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-.5-.5-.7-.5h-.6c-.2 0-.5.1-.7.4-.3.3-1 .9-1 2.3 0 1.4 1 2.7 1.2 2.9.1.2 2 3.1 4.9 4.3 2.4 1 2.9.8 3.4.8.5 0 1.7-.7 1.9-1.4.2-.7.2-1.3.2-1.4-.1-.1-.3-.2-.6-.3z'/></svg>") center/contain no-repeat;
}

/* Responsive helpers */
@media (max-width: 720px) {
  h1 { font-size: clamp(2rem, 9vw, 3rem); }
}

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