/* =========================================================
   CONSULTORA BRUNA — Design system
   Conceito: linguagem visual de "maquininha/recibo" — preços
   em fonte mono como um cupom impresso, cartões em formato
   de ticket com perfuração, acentos por marca.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* Cores */
  --paper: #F5F6F1;
  --paper-alt: #ECEEE6;
  --card: #FFFFFF;
  --ink: #1B1F1C;
  --ink-soft: #5B615A;
  --ink-faint: #8A8F87;
  --line: #DADDD3;
  --line-strong: #C6CABD;

  --ton: #0FA958;
  --ton-soft: #E4F6EC;
  --mp: #0576C7;
  --mp-soft: #E4F1FB;
  --pagbank: #C79A00;
  --pagbank-bg: #FFF6DA;
  --pagbank-green: #00A868;

  --star: #E8A93B;

  /* Tipografia */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 10px rgba(27, 31, 28, 0.06);
  --shadow-md: 0 10px 30px rgba(27, 31, 28, 0.09);
  --shadow-lg: 0 20px 45px rgba(27, 31, 28, 0.14);
  --header-h: 76px;
  --max-w: 1180px;
}

/* ===================== RESET ===================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  overflow-x: hidden;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Fundo gerado: manchas suaves nas cores das marcas + grade de pontos */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 20%, rgba(15, 169, 88, 0.10), transparent 60%),
    radial-gradient(700px circle at 85% 15%, rgba(5, 118, 199, 0.09), transparent 60%),
    radial-gradient(650px circle at 50% 95%, rgba(0, 168, 104, 0.08), transparent 60%),
    radial-gradient(circle, var(--line) 1px, transparent 1.5px) 0 0 / 26px 26px;
  animation: meshMove 22s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes meshMove {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.05); }
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
}
.btn--secondary:hover { border-color: var(--ink); background: var(--paper-alt); }
.btn--lg { padding: 14px 30px; font-size: 1rem; }
.btn--block { width: 100%; }

/* ===================== CABEÇALHO ===================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(245, 246, 241, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.logo__text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.nav {
  display: flex;
  gap: 28px;
}
.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--ink);
  transition: width 0.2s ease;
}
.nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ===================== HERO / BANNER (recibo) ===================== */
.hero {
  padding: 64px 24px 40px;
  display: flex;
  justify-content: center;
}
.hero__ticket {
  position: relative;
  max-width: 780px;
  width: 100%;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 56px 48px 48px;
  overflow: hidden;
  text-align: center;
}
.hero__perforation {
  position: absolute;
  top: -8px;
  left: 32px;
  right: 32px;
  height: 16px;
  background-image: radial-gradient(circle, var(--paper) 6px, transparent 6.5px);
  background-size: 28px 16px;
  background-repeat: repeat-x;
  background-position: left center;
  z-index: 2;
}
.hero__perforation--bottom { top: auto; bottom: -8px; }

/* Ilustração como camada de fundo, desbotada em gradiente por trás do texto */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: floatY 7s ease-in-out infinite;
}
.hero__bg img {
  width: 130%;
  max-width: none;
  opacity: 0.16;
  filter: saturate(1.1);
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, transparent 0%, var(--card) 72%),
    linear-gradient(180deg, rgba(255,255,255,0.2), var(--card) 88%);
}

.hero__text {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero__subtitle {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 460px;
  margin: 0 auto 30px;
}
.hero__actions { margin-bottom: 26px; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px 8px 8px;
  font-size: 0.86rem;
  color: var(--ink-soft);
  transition: background 0.15s ease, transform 0.15s ease;
}
.hero__badge:hover { background: var(--line); transform: translateY(-1px); }
.hero__badge-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.02); }
}

/* Animação de entrada do hero (imediata, sem depender de scroll) */
.hero-fade {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeIn 0.7s ease forwards;
  animation-delay: var(--d, 0s);
}
@keyframes heroFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ===================== SEÇÕES DE MARCA ===================== */
.brand-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px 24px;
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.brand-section__head {
  margin-bottom: 32px;
}
.brand-section__head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin: 12px 0 6px;
  letter-spacing: -0.01em;
}
.brand-section__head p { color: var(--ink-soft); }

.brand-chip {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.brand-chip--ton { background: var(--ton-soft); color: var(--ton); }
.brand-chip--mp { background: var(--mp-soft); color: var(--mp); }
.brand-chip--pagbank { background: var(--pagbank-bg); color: var(--pagbank); }
.brand-chip--neutral { background: var(--paper-alt); color: var(--ink-soft); }

/* ===================== GRID DE PRODUTOS ===================== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
}

/* ===================== ANIMAÇÃO DE ENTRADA (SCROLL) ===================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== CARD DE PRODUTO (ticket) ===================== */
.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.7s ease;
  border-top: 4px solid var(--card-accent, var(--ink));
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.card__image-wrap {
  background: var(--paper-alt);
  padding: 22px 22px 8px;
  display: flex;
  justify-content: center;
}
.card__image-wrap img { width: 62%; }

.card__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.card__price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
  padding: 12px 0;
  margin-bottom: 6px;
}
.card__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}
.card__installment {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-bottom: 18px;
}

.card__actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}
.card__actions .btn { flex: 1; padding: 12px 14px; font-size: 0.88rem; }

/* Acentos por marca aplicados via data-attribute no JS */
.card[data-brand="ton"] { --card-accent: var(--ton); }
.card[data-brand="mp"] { --card-accent: var(--mp); }
.card[data-brand="pagbank"] { --card-accent: var(--pagbank-green); }

/* ===================== AVALIAÇÕES ===================== */
.grid--reviews {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 980px) {
  .grid--reviews { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid--reviews { grid-template-columns: 1fr; }
}

.review-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px 24px 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.7s ease;
  border-top: 4px solid var(--ton);
}
.review-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.review-card__stars {
  color: var(--star);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.review-card__quote {
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}
.review-card__author {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  border-top: 1px dashed var(--line-strong);
  padding-top: 12px;
}

/* ===================== DÚVIDAS (FAQ) ===================== */
.faq__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 820px;
}
.faq__item {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  text-align: left;
}
.faq__question-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: transform 0.25s ease, background 0.2s ease;
}
.faq__item.is-open .faq__question-icon {
  transform: rotate(45deg);
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq__answer p {
  padding: 0 22px 20px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  border-top: 1px dashed var(--line-strong);
  padding-top: 14px;
}

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 31, 28, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
}
.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--card);
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.22s ease;
}
.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper-alt);
  font-size: 1.4rem;
  line-height: 1;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  z-index: 2;
}
.modal__close:hover { background: var(--line); color: var(--ink); }

.modal__body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
}
.modal__image-wrap {
  background: var(--paper-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.modal__image { width: 70%; }

.modal__content { padding: 34px 34px 34px 0; }
.modal__content h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 12px 0 6px;
}
.modal__price {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.modal__description {
  color: var(--ink-soft);
  margin-bottom: 18px;
  font-size: 0.95rem;
}
.modal__content h4 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  margin-bottom: 8px;
}
.modal__list { margin-bottom: 18px; }
.modal__list li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
}
.modal__list li::before {
  content: "•";
  color: var(--ink);
  position: absolute;
  left: 0;
}
.modal__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
  padding: 14px 0;
  margin-bottom: 22px;
  font-size: 0.88rem;
}
.modal__meta-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  margin-bottom: 3px;
}

@media (max-width: 640px) {
  .modal__body { grid-template-columns: 1fr; }
  .modal__content { padding: 8px 24px 28px; }
  .modal__image-wrap { padding: 28px 28px 8px; }
  .modal__image { width: 40%; }
}

/* ===================== BOTÃO FLUTUANTE (FAB) ===================== */
.fab {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.fab__toggle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-lg);
  display: grid;
  place-items: center;
  transition: transform 0.25s ease;
}
.fab__toggle:hover { transform: scale(1.06); }
.fab__toggle-icon {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  transition: transform 0.3s ease;
  display: inline-block;
}
.fab.is-open .fab__toggle-icon { transform: rotate(45deg); }

.fab__menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.fab__item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  color: var(--ink);
  padding: 10px 18px 10px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.fab.is-open .fab__item {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.fab.is-open .fab__item:nth-child(1) { transition-delay: 0.03s; }
.fab.is-open .fab__item:nth-child(2) { transition-delay: 0.07s; }
.fab.is-open .fab__item:nth-child(3) { transition-delay: 0.11s; }
.fab.is-open .fab__item:nth-child(4) { transition-delay: 0.15s; }
.fab__item:hover { background: var(--paper-alt); }
.fab__icon { font-size: 1rem; }

/* ===================== RODAPÉ ===================== */
.footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: var(--paper-alt);
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__links { display: flex; gap: 24px; }
.footer__links a { font-size: 0.92rem; font-weight: 500; color: var(--ink-soft); }
.footer__links a:hover { color: var(--ink); }
.footer__copy {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
  padding-top: 20px;
  border-top: 1px dashed var(--line-strong);
}

/* ===================== RESPONSIVO — MENU MOBILE ===================== */
@media (max-width: 780px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav.is-open { max-height: 340px; }
  .nav a {
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    width: 100%;
  }
  .hero__ticket { padding: 44px 26px 36px; }
  .fab { right: 16px; bottom: 16px; }
}
