/* =========================================================
   Cartão Digital — Monica Komora · Psicóloga Clínica
   Direção: Glassmorphism (design-spec-monica-komora.md)
   ========================================================= */

/* 1. Tokens ------------------------------------------------- */
:root {
  /* Marca (brandbook oficial) */
  --color-blue-dark: #2A437A;   /* Azul 1 — headline, CTA sólido, wordmark */
  --color-blue: #668DC6;        /* Azul 2 — accent: ícones ativos, links, blob */
  --color-blue-tint: #E4ECF7;   /* fundo de badges/chips azuis */
  --color-green: #586554;       /* accent secundário pontual */
  --color-terracota: #A16A56;   /* accent quente pontual, 2º blob */
  --color-bege: #E6D9C8;        /* neutro quente — fundos de card internos */
  --color-offwhite: #FCF4ED;    /* "paper" do cartão — nunca branco puro */

  /* Base neutra */
  --color-graphite: #2B2A28;    /* texto principal — nunca preto puro */
  --color-graphite-soft: #5C5A57;

  /* Sombra em camadas */
  --shadow-soft: 0 1px 2px rgba(42, 67, 122, 0.06), 0 8px 24px rgba(42, 67, 122, 0.10);
  --shadow-hover: 0 2px 4px rgba(42, 67, 122, 0.08), 0 12px 32px rgba(102, 141, 198, 0.20);

  /* Tipografia — Black Mango indisponível: fallback p/ Assistant forte */
  --font-display: 'Black Mango', 'Assistant', serif;
  --font-body: 'Assistant', sans-serif;

  /* Raios — 28 (card) -> 20 (cards internos) -> 999 (pills) */
  --radius-card: 28px;
  --radius-inner: 20px;
  --radius-pill: 999px;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;

  --fs-micro: 11px;
  --fs-body: 16px;
  --fs-h2: clamp(23px, 4.5vw, 30px);
  --fs-h1: clamp(27px, 6vw, 40px);

  --border-hair: 1px solid rgba(102, 141, 198, 0.22);
  --border-hair-strong: 1px solid var(--color-blue-dark);
}

/* 2. Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 76px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
ul { list-style: none; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--color-graphite-soft);
  line-height: 1.7;
  background: linear-gradient(180deg, var(--color-offwhite) 0%, var(--color-bege) 100%);
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, .headline {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-blue-dark);
  line-height: 1.2;
}

.micro-label {
  font-family: var(--font-body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--color-blue);
}

:focus-visible { outline: 2px solid var(--color-blue-dark); outline-offset: 2px; }

/* 3. Moldura decorativa (só desktop) ---------------------- */
.butterfly-watermark {
  position: fixed;
  width: min(88vw, 760px); aspect-ratio: 1;
  top: 46%; left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
.butterfly-watermark img { width: 100%; height: 100%; object-fit: contain; opacity: 0.06; }

/* 4. Menu fixo (Seção 0) ---------------------------------- */
.header-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  height: 60px;
  padding: 0 20px;
  background: rgba(252, 244, 237, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(102, 141, 198, 0.18);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header-sticky { background: rgba(252, 244, 237, 0.82); }
}
.header-logo { display: inline-flex; align-items: center; min-width: 0; }
.header-logo img { height: 40px; width: auto; flex-shrink: 0; }
.header-sticky .btn-save-contact { padding: 8px 16px; font-size: 13px; flex-shrink: 0; }
@media (max-width: 400px) {
  .header-sticky .btn-save-contact span { display: none; }
  .header-sticky .btn-save-contact { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
  .header-sticky .btn-save-contact i { margin: 0; }
}

/* 5. Card shell (mobile-first: 100% largura, sem moldura) - */
.card-container { width: 100%; position: relative; z-index: 1; }
.card {
  position: relative;
  overflow: hidden;
  background: var(--color-offwhite);
  padding: var(--space-md);
}
.card > * { position: relative; z-index: 1; }

/* 6. Botões ---------------------------------------------- */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
}
.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--color-blue-dark);
  color: var(--color-offwhite);
  padding: 14px 28px;
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-primary::after {
  content: "";
  position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.30), transparent);
  transform: skewX(-20deg);
  transition: left 1.4s ease;
}
.btn-primary:hover::after { left: 130%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(102, 141, 198, 0.35);
  color: var(--color-graphite-soft);
  padding: 12px 22px;
  transition: border-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
.btn-secondary:hover {
  border-color: var(--color-blue-dark);
  color: var(--color-blue-dark);
  transform: translateY(-2px);
}

/* 7. Badges -------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  padding: 7px 14px;
}
.badge-neutral {
  background: var(--color-blue-tint);
  color: var(--color-blue-dark);
  font-weight: 600;
}

/* 8. Seção 1 — Hero ----------------------------------- */
.hero { padding-top: var(--space-lg); }
.hero-headline { font-size: var(--fs-h1); margin: var(--space-sm) 0; }
.hero-subheadline { margin-bottom: var(--space-md); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); }

/* 9. Seção 2 — Endereço (link) ------------------------ */
.address-inline-section { margin-top: var(--space-lg); }
.address-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 14px;
}
.address-inline > i { color: var(--color-blue); }
.address-link {
  color: var(--color-blue-dark);
  font-weight: 600;
  border-bottom: 1px solid rgba(42, 67, 122, 0.35);
  padding-bottom: 1px;
}
.address-link:hover { border-bottom-color: var(--color-blue-dark); }

/* 10. Seção 3 — Foto circular + aros ------------------ */
.identity-section {
  margin-top: var(--space-xl);
  text-align: center;
}
.photo-frame {
  position: relative;
  width: 220px; height: 220px;
  margin: 0 auto var(--space-md);
}
.photo-frame img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  position: relative;
  z-index: 2;
  background: var(--color-blue-tint);
}
.photo-frame svg {
  position: absolute;
  inset: -28px;
  width: calc(100% + 56px);
  height: calc(100% + 56px);
  z-index: 1;
  overflow: visible;
}
.photo-frame circle {
  fill: none;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-dasharray: 760;
  stroke-dashoffset: 760;
  opacity: 0;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 1s ease, opacity 0.6s ease;
}
.photo-frame.is-visible .ring-outer {
  stroke: var(--color-blue-dark);
  stroke-dashoffset: 0;
  opacity: 0.9;
  transition-delay: 0s;
}
.photo-frame.is-visible .ring-inner {
  stroke: var(--color-blue);
  stroke-dashoffset: 0;
  opacity: 0.9;
  transition-delay: 0.3s;
}
.identity-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 5vw, 30px);
  color: var(--color-blue-dark);
  line-height: 1.15;
}
.identity-role {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-graphite-soft);
  margin-top: 6px;
}
.badge-crp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-sm);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--color-blue-tint);
  color: var(--color-blue-dark);
  font-size: 13px;
  font-weight: 600;
}

/* 11. Seção 4 — Accordion ---------------------------- */
.services-section { margin-top: var(--space-xl); }
.services-section h2 { font-size: var(--fs-h2); margin: var(--space-xs) 0 var(--space-md); }
.accordion-item {
  border: var(--border-hair);
  border-radius: var(--radius-inner);
  margin-bottom: var(--space-sm);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.35);
  transition: border-color 0.3s ease;
}
.accordion-item.open { border-color: rgba(102, 141, 198, 0.45); }
.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) 20px;
  text-align: left;
  color: var(--color-blue-dark);
  font-weight: 600;
}
.accordion-header span { display: inline-flex; align-items: center; gap: 10px; }
.accordion-header span i { color: var(--color-blue); flex-shrink: 0; }
.accordion-header > i:last-child {
  color: var(--color-blue);
  flex-shrink: 0;
  transition: transform 0.35s ease, color 0.3s ease;
}
.accordion-item.open .accordion-header > i:last-child {
  transform: rotate(180deg);
  color: var(--color-blue-dark);
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  font-size: 14px;
  transition: max-height 0.4s ease, padding 0.4s ease, visibility 0.4s ease;
}
.accordion-item.open .accordion-body {
  max-height: 320px;
  padding: 0 20px 18px;
  visibility: visible;
}

/* 12. Seção 5 — Depoimentos (carrossel) -------------- */
.testimonials-section { margin-top: var(--space-xl); }
.testimonials-section h2 { font-size: var(--fs-h2); margin: var(--space-xs) 0 var(--space-md); }
.carousel { --fill-duration: 3000ms; }
.carousel-track { position: relative; min-height: 260px; }
.testimonial-card {
  position: relative;
  overflow: hidden;
  display: none;
  border: var(--border-hair);
  border-radius: var(--radius-inner);
  background: var(--color-blue-tint);
  padding: var(--space-md);
  font-size: 14px;
}
.testimonial-card.is-active { display: block; }
.testimonial-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--color-blue);
}
.testimonial-card.is-filling::before {
  animation: testimonial-fill var(--fill-duration, 3000ms) linear forwards;
}
.testimonial-card.is-filling.is-paused::before { animation-play-state: paused; }
@keyframes testimonial-fill {
  from { width: 0%; }
  to { width: 100%; }
}
.testimonial-stars { color: var(--color-blue); margin-bottom: var(--space-xs); letter-spacing: 2px; }
.testimonial-card p:not(.testimonial-author) { color: var(--color-graphite); }
.testimonial-author { margin-top: var(--space-sm); font-weight: 600; color: var(--color-blue-dark); }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
}
.carousel-arrow {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--color-blue-dark);
  border: 1px solid rgba(102, 141, 198, 0.35);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.carousel-arrow:hover { background: var(--color-blue); color: var(--color-offwhite); border-color: var(--color-blue); }
.carousel-dots { display: flex; gap: var(--space-xs); }
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(102, 141, 198, 0.35);
  transition: background 0.3s ease, transform 0.3s ease;
}
.carousel-dot.active { background: var(--color-blue-dark); transform: scale(1.25); }

/* 13. Seção 6 — Localização (card) ------------------- */
.location-section { margin-top: var(--space-xl); }
.location-card {
  border: var(--border-hair);
  border-radius: var(--radius-inner);
  background: rgba(255, 255, 255, 0.35);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.location-address { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--color-graphite); }
.location-address i { color: var(--color-blue); flex-shrink: 0; margin-top: 4px; }
.location-note { font-size: 13px; }
.location-card .btn-primary { margin-top: var(--space-xs); align-self: flex-start; }

/* 14. Seção 7 — Contato final ----------------------- */
.contact-final-section { margin-top: var(--space-xl); text-align: center; position: relative; }
.signature-butterfly {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 1s ease, transform 1s ease;
}
.signature-butterfly.is-visible { opacity: 0.9; transform: scale(1); }
.signature-butterfly img { width: 76px; height: 76px; object-fit: contain; }
.contact-final-section h2 { font-size: var(--fs-h2); margin: var(--space-xs) 0 var(--space-sm); }
.contact-final-subheadline { margin-bottom: var(--space-md); }

.contact-grid {
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  text-align: left;
}
.contact-item {
  border: var(--border-hair);
  border-radius: var(--radius-inner);
  background: rgba(255, 255, 255, 0.35);
  padding: var(--space-sm) var(--space-md);
}
.contact-item-label {
  font-size: var(--fs-micro);
  letter-spacing: 0.12em;
  color: var(--color-blue);
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 6px;
}
.contact-item-value { font-weight: 600; color: var(--color-blue-dark); word-break: break-word; }
.contact-item-desc { font-size: 13px; margin-top: 4px; }
.contact-final-section .save-contact-btn { margin: var(--space-lg) auto 0; }

/* 15. Seção 9 — Rodapé ----------------------------- */
.site-footer {
  margin: var(--space-xl) calc(-1 * var(--space-md)) calc(-1 * var(--space-md));
  background: var(--color-blue-dark);
  padding-top: 40px;
  padding-bottom: 64px;
}
.footer-inner { max-width: 100%; margin: 0 auto; padding: 0 var(--space-md); text-align: center; }
.footer-logo-circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--color-offwhite);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-md);
}
.footer-logo-circle img { width: 44px; height: 44px; object-fit: contain; }
.footer-name { font-family: var(--font-display); font-weight: 600; color: var(--color-offwhite); font-size: 20px; }
.footer-title { color: rgba(252, 244, 237, 0.75); font-size: 14px; margin-top: 4px; }
.footer-city { color: rgba(252, 244, 237, 0.5); font-size: 12px; letter-spacing: 0.12em; margin-top: var(--space-sm); }
.footer-contacts { color: rgba(252, 244, 237, 0.75); font-size: 13px; margin-top: var(--space-sm); }
.footer-contacts a { border-bottom: 1px solid transparent; }
.footer-contacts a:hover { color: var(--color-offwhite); border-bottom-color: rgba(252, 244, 237, 0.5); }
.footer-copyright { color: rgba(252, 244, 237, 0.55); font-size: 12px; margin-top: var(--space-md); }
.footer-credit { color: rgba(252, 244, 237, 0.55); font-size: 11px; margin-top: 6px; }
.footer-credit a { border-bottom: 1px solid rgba(252, 244, 237, 0.35); }

/* 16. FABs + QR modal ----------------------------- */
.whatsapp-fab {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 25;
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--color-blue-dark);
  color: var(--color-offwhite);
  font-size: 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.whatsapp-fab::before {
  content: "";
  position: absolute; inset: -6px; border-radius: 50%;
  border: 1.5px solid rgba(102, 141, 198, 0.45);
  animation: fab-pulse 2.8s ease-out infinite;
}
.whatsapp-fab:hover { transform: scale(1.08); box-shadow: var(--shadow-hover); }
@keyframes fab-pulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  100% { transform: scale(1.35); opacity: 0;   }
}

.qr-fab {
  position: fixed;
  bottom: var(--space-md);
  left: var(--space-md);
  z-index: 25;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(252, 244, 237, 0.9);
  color: var(--color-blue-dark);
  border: 1px solid rgba(102, 141, 198, 0.3);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.qr-fab:hover { transform: scale(1.08); box-shadow: var(--shadow-hover); }

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: rgba(42, 67, 122, 0.55);
}
.qr-modal.is-open { display: flex; }
.qr-modal-content {
  position: relative;
  background: var(--color-offwhite);
  border-radius: var(--radius-inner);
  padding: var(--space-lg) var(--space-md) var(--space-md);
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-hover);
}
.qr-modal-content h2 { font-size: 16px; margin-bottom: var(--space-md); color: var(--color-blue-dark); }
.qr-modal-content canvas { margin: 0 auto; border-radius: 12px; }
.qr-modal-fallback {
  display: none;
  margin-top: var(--space-sm);
  font-size: 13px;
  word-break: break-all;
  color: var(--color-graphite-soft);
}
.qr-modal-fallback.is-visible { display: block; }
.qr-modal-fallback a { color: var(--color-blue-dark); font-weight: 600; }
.qr-modal-close {
  position: absolute;
  top: var(--space-sm); right: var(--space-sm);
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--color-graphite-soft);
}
.qr-modal-close:hover { background: rgba(102, 141, 198, 0.15); }

/* 17. Scroll-reveal ------------------------------- */
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }
html.js .reveal { opacity: 0; transform: translateY(24px); }
html.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

/* 18. Desktop (>= 1024px): moldura glassmorphism ---- */
@media (min-width: 1024px) {
  .card-container {
    max-width: 672px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
  }
  .card {
    border-radius: var(--radius-card);
    padding: var(--space-lg) 44px;
    border: 1px solid rgba(102, 141, 198, 0.25);
    box-shadow: var(--shadow-soft);
    /* base semi-opaca: mantém o cartão legível mesmo sem suporte a backdrop-filter */
    background-color: rgba(252, 244, 237, 0.52);
    background-image: linear-gradient(135deg,
      rgba(102, 141, 198, 0.20) 0%,
      rgba(230, 217, 200, 0.30) 45%,
      rgba(161, 106, 86, 0.15) 100%);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
  }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .card { background-color: rgba(252, 244, 237, 0.42); }
  }
  .card:hover { box-shadow: var(--shadow-hover); }

  /* blobs desfocados — só no desktop */
  body::before,
  body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.16;
    pointer-events: none;
    z-index: 0;
  }
  body::before {
    width: 480px; height: 480px;
    background: var(--color-blue);
    top: -120px; left: -140px;
  }
  body::after {
    width: 420px; height: 420px;
    background: var(--color-terracota);
    bottom: -100px; right: -120px;
  }
  .butterfly-watermark { opacity: 1; }

  .contact-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { margin: var(--space-xl) -44px -40px; }

  .header-sticky { padding: 0 32px; }
}

/* 19. prefers-reduced-motion --------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-primary::after,
  .whatsapp-fab::before,
  .reveal,
  .photo-frame circle,
  .signature-butterfly,
  .testimonial-card.is-filling::before {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .photo-frame circle { stroke-dashoffset: 0 !important; opacity: 0.9 !important; }
  .signature-butterfly { opacity: 0.9 !important; transform: none !important; }
  .testimonial-card.is-filling::before { width: 100% !important; }
}
