/* ═══════════════════════════════════════════════════════════════
   CLAU CARVALHO — DESIGN SYSTEM v2 (2026)
   Fonte única de tokens + componentes compartilhados.
   Baseado no Brand Kit oficial (BRAND-KIT.md).
   Carregar ANTES do <style> específico de cada página.
   ═══════════════════════════════════════════════════════════════ */

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── TOKENS ────────────────────────────────────────────────── */
:root {
  /* Paleta oficial */
  --cream-pale: #F6E9D8;
  --cream: #DBC1A9;
  --terracotta-light: #BA8565;
  --terracotta: #8D5B3A;
  --deep-brown: #2B1710;
  --burgundy: #8E230B;
  --gray: #D9D9D9;
  --white: #FFFFFF;

  /* Semânticos */
  --bg-deep: var(--cream-pale);
  --bg-section: var(--white);
  --bg-dark: var(--deep-brown);
  --bg-card: rgba(255, 255, 255, 0.7);
  --accent: var(--terracotta);
  --accent-glow: var(--terracotta-light);
  --accent-soft: rgba(141, 91, 58, 0.12);
  --accent-hover: #6F4528;
  --accent-wine: var(--burgundy);
  --text-primary: var(--deep-brown);
  --text-secondary: rgba(43, 23, 16, 0.72);
  --text-muted: rgba(43, 23, 16, 0.5);
  --text-on-dark: var(--cream-pale);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(141, 91, 58, 0.15);
  --glass-hover: rgba(255, 255, 255, 0.85);

  /* Sombras & brilhos — minimalista premium: sombras difusas e discretas */
  --glow-gold: 0 0 50px rgba(141, 91, 58, 0.12);
  --glow-soft: 0 8px 40px rgba(141, 91, 58, 0.07);
  --shadow-card: 0 1px 2px rgba(43, 23, 16, 0.04), 0 8px 32px rgba(43, 23, 16, 0.05);
  --shadow-card-hover: 0 2px 4px rgba(43, 23, 16, 0.05), 0 20px 48px rgba(43, 23, 16, 0.09);
  --shadow-btn: 0 2px 8px rgba(43, 23, 16, 0.12);
  --shadow-btn-hover: 0 8px 24px rgba(43, 23, 16, 0.18);

  /* Tipografia — Ginger (oficial, premium) com fallbacks Google Fonts */
  --font-display: 'Italiana', 'Marcellus', 'Cormorant Garamond', Georgia, serif;
  --font-serif: 'Marcellus', 'Cormorant Garamond', 'Italiana', Georgia, serif;
  --font-sans: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Escalas — mais respiro e raios generosos (estética premium) */
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 50px;
  --section-pad: clamp(80px, 12vw, 160px);
  --container: min(1200px, 90vw);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.25s;
  --dur-med: 0.4s;
}

/* ── BASE ──────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Grão sutil premium */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--terracotta);
  color: var(--cream-pale);
}

/* Scrollbar discreta na paleta */
@media (min-width: 900px) {
  ::-webkit-scrollbar { width: 12px; }
  ::-webkit-scrollbar-track { background: var(--cream-pale); }
  ::-webkit-scrollbar-thumb {
    background: var(--cream);
    border-radius: 6px;
    border: 3px solid var(--cream-pale);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--terracotta-light); }
}

/* Acessibilidade: foco visível consistente */
:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Acessibilidade: respeitar redução de movimento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

img { max-width: 100%; height: auto; }

/* Títulos com quebra equilibrada (progressive enhancement) */
h1, h2, h3 { text-wrap: balance; }

/* ── UTILITIES ─────────────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(43, 23, 16, 0.07);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: background var(--dur-med) var(--ease-out),
              border-color var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out),
              transform var(--dur-med) var(--ease-out);
}

.glass:hover {
  background: var(--white);
  border-color: rgba(43, 23, 16, 0.12);
  box-shadow: var(--shadow-card-hover);
}

.glow-text { text-shadow: 0 2px 20px rgba(141, 91, 58, 0.2); }

/* Divisor minimalista (sem ornamentos nem glow) */
.glow-line {
  width: 48px;
  height: 1px;
  background: var(--terracotta-light);
  opacity: 0.7;
  margin: 24px auto;
  box-shadow: none;
  position: relative;
}

.glow-line::before,
.glow-line::after { content: none; }

/* Moldura "pétala" do MIV: cantos arredondados em um lado só */
.petal-frame {
  border-radius: 60px 24px 60px 24px;
  overflow: hidden;
}
.petal-frame--alt { border-radius: 24px 60px 24px 60px; }

/* Fundo com raios sunburst discretos (elemento gráfico do MIV) */
.sunburst-bg {
  position: relative;
}
.sunburst-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background: repeating-conic-gradient(
    from 0deg at 50% 120%,
    var(--terracotta) 0deg 1deg,
    transparent 1deg 9deg
  );
}

/* ── NAVIGATION ────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--dur-med) ease;
}

nav.scrolled {
  background: rgba(246, 233, 216, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 20px rgba(43, 23, 16, 0.06);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 1.2px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color var(--dur-fast);
  position: relative;
}

.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-med) var(--ease-out);
}

.nav-links a:not(.nav-cta):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-links a:hover { color: var(--accent); }

.nav-cta {
  padding: 10px 22px;
  background: var(--terracotta);
  color: var(--cream-pale) !important;
  border-radius: var(--radius-pill);
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 0.78rem !important;
  letter-spacing: 1px !important;
  box-shadow: var(--shadow-btn);
  transition: all var(--dur-fast);
}

.nav-cta:hover {
  transform: translateY(-2px);
  background: var(--accent-hover);
  box-shadow: var(--shadow-btn-hover);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--dur-fast);
}

/* ── BOTÕES ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--terracotta);
  color: var(--cream-pale);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  text-transform: none;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--accent-hover);
  box-shadow: var(--shadow-btn-hover);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  text-transform: none;
  text-decoration: none;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(43, 23, 16, 0.18);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.btn-secondary:hover {
  border-color: var(--deep-brown);
  color: var(--deep-brown);
  background: rgba(43, 23, 16, 0.04);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast);
}

.btn-ghost:hover { border-bottom-color: var(--accent); }

/* ── SEÇÕES ────────────────────────────────────────────────── */
section {
  padding: var(--section-pad) 0;
  position: relative;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--terracotta-light);
  text-align: center;
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  font-weight: 400;
  text-align: center;
  line-height: 1.06;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.section-subtitle {
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  color: var(--text-secondary);
  text-align: center;
  max-width: 580px;
  margin: 0 auto 72px;
  line-height: 1.8;
}

/* ── CARDS ─────────────────────────────────────────────────── */
.card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(43, 23, 16, 0.07);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out),
              border-color var(--dur-med) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(141, 91, 58, 0.25);
}

/* Linha superior em gradiente que acende no hover */
.card--lined::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--dur-med);
}

.card--lined:hover::before { opacity: 1; }

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 24px;
  box-shadow: 0 0 30px rgba(186, 133, 101, 0.12);
}

/* ── BADGES ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-pill);
  background: rgba(141, 91, 58, 0.05);
}

/* Sunburst circular oficial (selo giratório) */
.brand-badge {
  width: 120px;
  height: 120px;
  position: relative;
  display: inline-block;
}
.brand-badge svg { width: 100%; height: 100%; display: block; }
.brand-badge .badge-rotate {
  animation: rotateBadge 30s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes rotateBadge {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── FORMULÁRIOS ───────────────────────────────────────────── */
.form-field label,
.captura-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-field input,
.form-field select,
.form-field textarea,
.captura-form input {
  width: 100%;
  padding: 14px 18px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--cream-pale);
  border: 1px solid rgba(141, 91, 58, 0.22);
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast);
  outline: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.captura-form input:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(141, 91, 58, 0.1);
}

.form-field input::placeholder,
.captura-form input::placeholder {
  color: rgba(43, 23, 16, 0.4);
}

/* ── FLOATING WHATSAPP ─────────────────────────────────────── */
.floating-whatsapp {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all var(--dur-fast);
  text-decoration: none;
  animation: floatPulse 3s infinite;
}

.floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp svg {
  width: 28px;
  height: 28px;
  fill: white;
}

@keyframes floatPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6); }
}

/* ── BACK TO TOP ───────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur-fast);
  color: var(--accent);
  font-size: 1.2rem;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ── FOOTER ────────────────────────────────────────────────── */
footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover { text-decoration: underline; }

/* ── ANIMAÇÕES ─────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

/* Fallback: se JS não rodar, conteúdo continua visível */
.no-js .reveal { opacity: 1; transform: none; }

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ── RESPONSIVO (nav mobile compartilhado) ─────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(246, 233, 216, 0.97);
    backdrop-filter: blur(20px);
    padding: 32px;
    gap: 24px;
    border-bottom: 1px solid var(--glass-border);
  }
}
