/* ============================================================
   Milewa — shared design system
   "fintech operacional premium": claro, técnico, confiante

   PALETA OFICIAL: navy (#0B1220–#2A323F) + VERDE (#0FBC7A) +
   cinzas + âmbar (#FFB84D). NUNCA usar roxo/violeta/lilás
   (ex.: #6b…, #7c3aed, #a855…, oklch com hue ~270–300).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Inter:wght@400;450;500;600&family=IBM+Plex+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@700&display=swap');

:root {
  /* color */
  --ink:        #0B1220;
  --ink-2:      #141C2B;
  --ink-soft:   #1E2837;
  --text:       #2A323F;
  --muted:      #5B6473;
  --muted-2:    #818b9a;
  --line:       #E4EAF1;
  --line-soft:  #EDF2F8;
  --bg:         #FFFFFF;
  --bg-soft:    #F7FAFC;
  --surface:    #E8EEF5;
  --surface-2:  #F1F5F9;

  --green:      #0FBC7A;
  --green-600:  #0CA86C;
  --green-ink:  #08885A;   /* accessible green text on light */
  --green-wash: #E7F8F0;
  --green-line: #BFEAD7;

  --amber:      #FFB84D;
  --amber-ink:  #B5710A;
  --amber-wash: #FFF4E2;

  /* on-dark */
  --d-text:     #C3CCDA;
  --d-muted:    #8A95A6;
  --d-line:     rgba(255,255,255,.10);
  --d-line-2:   rgba(255,255,255,.16);

  /* type */
  --display: 'DM Sans', system-ui, sans-serif;
  --body:    'Inter', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;

  /* shape */
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --shadow-sm: 0 1px 2px rgba(11,18,32,.04), 0 2px 6px rgba(11,18,32,.04);
  --shadow:    0 2px 4px rgba(11,18,32,.04), 0 12px 28px -12px rgba(11,18,32,.14);
  --shadow-lg: 0 8px 16px -6px rgba(11,18,32,.10), 0 28px 60px -24px rgba(11,18,32,.30);
  --shadow-green: 0 8px 22px -8px rgba(15,188,122,.55);

  --container: 1180px;
  --pad: clamp(20px, 5vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); margin: 0; line-height: 1.06; letter-spacing: -0.02em; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }
::selection { background: var(--green); color: #042c1d; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: clamp(64px, 9vw, 120px); }
.tight { padding-block: clamp(48px, 6vw, 80px); }

/* ---------- eyebrow ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--green-ink);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-wash); }
.eyebrow.on-dark { color: #6fe3b4; }
.eyebrow.on-dark::before { box-shadow: 0 0 0 4px rgba(15,188,122,.16); }

/* ---------- headings scale ---------- */
.h-display { font-size: clamp(38px, 6vw, 66px); letter-spacing: -0.035em; line-height: 1.02; }
.h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -0.03em; }
.h2 { font-size: clamp(25px, 3vw, 34px); }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); line-height: 1.55; }

/* numbers */
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ---------- buttons ---------- */
.btn {
  --bg-btn: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--body); font-weight: 600; font-size: 16px;
  padding: 13px 22px; min-height: 48px; border-radius: 12px;
  background: var(--bg-btn); color: #fff; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { --bg-btn: var(--green); color: #042c1d; box-shadow: var(--shadow-green); }
.btn-primary:hover { background: var(--green-600); box-shadow: 0 10px 26px -8px rgba(15,188,122,.65); }
.btn-dark { --bg-btn: var(--ink); }
.btn-dark:hover { background: var(--ink-2); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); border-color: #d4dde7; }
.btn-ghost.on-dark { color: #fff; border-color: var(--d-line-2); }
.btn-ghost.on-dark:hover { background: rgba(255,255,255,.06); }
.btn-sm { min-height: 42px; padding: 9px 16px; font-size: 15px; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 16px 28px; font-size: 17px; }

.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--green-ink); }
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 1px 0 rgba(11,18,32,.02), 0 8px 24px -18px rgba(11,18,32,.3); }
.nav { display: flex; align-items: center; gap: 28px; height: 72px; }
.nav__logo { display: flex; align-items: center; }
.nav__logo img { height: 26px; width: auto; }

/* Wordmark "milewa" (SVG inline). "mile" = currentColor, "wa" = verde. */
.milewa-wordmark { width: auto; display: block; color: var(--ink); overflow: visible; }
.milewa-wordmark text { font-family: 'Plus Jakarta Sans', var(--display); font-weight: 700; font-size: 52px; letter-spacing: -1px; }
.milewa-wordmark .mile { fill: currentColor; }
.milewa-wordmark .wa { fill: #3a8f4c; }
.nav__logo .milewa-wordmark { height: 32px; }
.nav__links { display: flex; align-items: center; gap: 28px; margin-left: 8px; }
.nav__links a { font-size: 15.5px; color: var(--ink-soft); font-weight: 500; transition: color .15s ease; }
.nav__links a:hover { color: var(--green-ink); }
.nav__spacer { flex: 1; }
.nav__cta { display: flex; align-items: center; gap: 14px; }
.nav__login { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.nav__login:hover { color: var(--green-ink); }
.nav__burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; align-items: center; justify-content: center; cursor: pointer; }
.nav__burger span, .nav__burger span::before, .nav__burger span::after { content: ""; display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
.nav__burger span::before { position: absolute; top: -6px; } .nav__burger span::after { position: absolute; top: 6px; }

/* mobile sheet */
.mobile-menu { display: none; }

@media (max-width: 900px) {
  .nav__links, .nav__login { display: none; }
  .nav__burger { display: inline-flex; }
  .mobile-menu { display: block; position: fixed; inset: 72px 0 auto 0; z-index: 55; background: #fff; border-bottom: 1px solid var(--line); padding: 16px var(--pad) 24px; transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .2s ease; box-shadow: var(--shadow); }
  .mobile-menu.open { transform: none; opacity: 1; pointer-events: auto; }
  .mobile-menu a { display: block; padding: 13px 6px; font-size: 17px; font-weight: 500; color: var(--ink-soft); border-bottom: 1px solid var(--line-soft); }
  .mobile-menu .btn { width: 100%; margin-top: 16px; }
}

/* ---------- cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }

/* ---------- product-shot placeholder ---------- */
.shot {
  position: relative; border-radius: var(--r); overflow: hidden;
  background:
    repeating-linear-gradient(135deg, #eef3f9 0 14px, #e7eef6 14px 28px);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.shot__tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
  color: #8a97a8; background: rgba(255,255,255,.82); backdrop-filter: blur(2px);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}

/* ---------- footer ---------- */
.footer { background: var(--ink); color: var(--d-text); padding-block: 64px 36px; }
.footer a { color: var(--d-muted); font-size: 14.5px; transition: color .15s ease; }
.footer a:hover { color: #fff; }
.footer__top { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px 32px; padding-bottom: 44px; border-bottom: 1px solid var(--d-line); }
.footer__brand img { height: 24px; width: auto; filter: brightness(0) invert(1); opacity: .96; }
.footer__brand .milewa-wordmark { height: 30px; color: #fff; opacity: .96; }
.footer__brand .milewa-wordmark .wa { fill: #2bd396; }
.footer__brand p { color: var(--d-muted); font-size: 14.5px; margin-top: 16px; max-width: 30ch; line-height: 1.55; }
.footer__col h4 { color: #fff; font-family: var(--body); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-top: 28px; font-size: 13.5px; color: var(--d-muted); }
.footer__bottom .spacer { flex: 1; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 22px; }
.compat { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--d-muted); border: 1px solid var(--d-line-2); border-radius: 999px; padding: 6px 13px; }
.compat .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

@media (max-width: 820px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer__top { grid-template-columns: 1fr; }
}

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- legal/doc pages ---------- */
.doc { max-width: 760px; margin: 0 auto; }
.doc h2 { font-size: clamp(22px, 2.6vw, 28px); margin-top: 48px; margin-bottom: 14px; }
.doc h2:first-of-type { margin-top: 8px; }
.doc p { margin-bottom: 16px; color: var(--text); }
.doc .meta { font-family: var(--mono); font-size: 13px; color: var(--muted); }

/* focus visibility (WCAG 2.2) */
a:focus-visible, button:focus-visible, summary:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--green); outline-offset: 2px; border-radius: 8px;
}

/* skip link */
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0; z-index: 100; }
.skip:focus { left: 0; }

/* ============================================================
   Botão flutuante de WhatsApp (canal síncrono)
   ============================================================ */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 75;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #1FAE54; color: #fff; box-shadow: var(--shadow-lg);
  transition: transform .2s, box-shadow .2s; }
.wa-float:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 32px -10px rgba(31,174,84,.6); }
.wa-float svg { width: 30px; height: 30px; }
.wa-float__pulse { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 rgba(31,174,84,.5); animation: waPulse 2.6s ease-out 4; }
@keyframes waPulse { 0% { box-shadow: 0 0 0 0 rgba(31,174,84,.45); } 70% { box-shadow: 0 0 0 14px rgba(31,174,84,0); } 100% { box-shadow: 0 0 0 0 rgba(31,174,84,0); } }
@media (prefers-reduced-motion: reduce) { .wa-float__pulse { animation: none; } }
@media (max-width: 600px) { .wa-float { width: 52px; height: 52px; bottom: 76px; } }

/* ============================================================
   Banner de consentimento de cookies (LGPD / ANPD)
   botões com proeminência igual · opt-in · sem pré-marcação
   ============================================================ */
.cc { position: fixed; left: 18px; right: 18px; bottom: 18px; z-index: 90;
  max-width: 540px; margin-inline: auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: 22px 24px;
  display: none; }
.cc.open { display: block; }
.cc h3 { font-family: var(--display); font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.cc p { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; line-height: 1.55; }
.cc p a { color: var(--green-ink); text-decoration: underline; }
.cc__actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.cc__actions .btn { width: 100%; justify-content: center; min-height: 44px; font-size: 14px; }
@media (max-width: 480px) { .cc__actions { grid-template-columns: 1fr; } }

/* painel de preferências (toggles por categoria) */
.cc__prefs { display: none; margin: 4px 0 18px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.cc.prefs .cc__prefs { display: block; }
.cc__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.cc__row:last-child { border-bottom: 0; }
.cc__row .lbl { font-size: 14px; font-weight: 600; color: var(--text); }
.cc__row .desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cc__row .fixed { font-family: var(--mono); font-size: 11px; color: var(--green-ink); background: var(--green-wash); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
/* switch acessível */
.cc__sw { position: relative; width: 44px; height: 26px; flex: none; }
.cc__sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc__sw span { position: absolute; inset: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; transition: .2s; }
.cc__sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: .2s; }
.cc__sw input:checked + span { background: var(--green); border-color: var(--green); }
.cc__sw input:checked + span::after { transform: translateX(18px); }
.cc__sw input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
