  html { scroll-behavior: smooth; }

  /* --- Scroll-reveal --- */
  .reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity .85s cubic-bezier(.16,1,.3,1), transform .85s cubic-bezier(.16,1,.3,1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }
  .reveal.in-view { opacity: 1; transform: none; }

  /* --- Hero dashboard mock animations --- */
  @keyframes mp-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  @keyframes mp-rowin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes mp-fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  .mp-bar { transform-origin: bottom; animation: mp-grow 1s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--d, 0ms); }
  .mp-row { animation: mp-rowin .6s ease both; animation-delay: var(--d, 0ms); }
  .mp-fade { animation: mp-fadein .7s ease both; animation-delay: var(--d, 0ms); }
  .mp-progress { width: 0%; transition: width .85s cubic-bezier(.16,1,.3,1), background-color .45s ease; }

  /* --- Gestão panes slide-in --- */
  .mp-pane { opacity: 0; transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); transition-delay: var(--d, 0ms); will-change: opacity, transform; }
  .mp-pane-l { transform: translateX(-36px); }
  .mp-pane-r { transform: translateX(36px); }
  .mp-pane.in-view { opacity: 1; transform: none; }
  .mp-pane .mp-prow { opacity: 0; transform: translateY(12px); transition: opacity .55s ease, transform .55s ease; transition-delay: var(--rd, 0ms); }
  .mp-pane.in-view .mp-prow { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) {
    .mp-pane, .mp-pane-l, .mp-pane-r, .mp-pane .mp-prow { opacity: 1; transform: none; transition: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .mp-bar, .mp-row, .mp-fade, .mp-progress { animation: none; }
  }

  /* --- FAQ accordion smooth expand/close --- */
  .faq-item .faq-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s cubic-bezier(.4,0,.2,1);
  }
  .faq-item[open] .faq-body { grid-template-rows: 1fr; }
  .faq-item[open].closing .faq-body { grid-template-rows: 0fr; }
  .faq-item .faq-body > div { overflow: hidden; }
  .faq-item .faq-chevron { transition: transform .3s ease; }
  .faq-item[open] .faq-chevron { transform: rotate(180deg); }
  .faq-item[open].closing .faq-chevron { transform: rotate(0deg); }
  @media (prefers-reduced-motion: reduce) {
    .faq-item .faq-body { transition: none; }
  }

  /* --- Video dialog --- */
  .video-dialog {
    border: none;
    background: transparent;
    padding: 0;
    max-width: min(900px, 92vw);
    width: 100%;
  }
  .video-dialog::backdrop {
    background: rgba(0, 10, 30, 0.78);
    backdrop-filter: blur(4px);
  }
  .video-dialog .vd-inner { position: relative; }
  .video-dialog .vd-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9999px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background .2s ease;
  }
  .video-dialog .vd-close:hover { background: rgba(255,255,255,0.25); }
  .video-dialog .vd-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
    background: #000;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(160deg, rgba(91,148,253,0.18), rgba(0,18,52,0.6));
  }
  .video-dialog .vd-frame iframe { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); border: 0; border-radius: 8px; }

  /* --- Budget calculator dialog (light theme) --- */
  .budget-dialog {
    border: none;
    background: transparent;
    padding: 0;
    max-width: min(720px, 94vw);
    width: 100%;
    max-height: 92vh;
    overflow: visible;
  }
  .budget-dialog::backdrop {
    background: rgba(0, 10, 30, 0.6);
    backdrop-filter: blur(4px);
  }
  .budget-dialog .bd-inner {
    position: relative;
    background: #ffffff;
    color: #0f1b2d;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px 26px 26px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    max-height: 92vh;
    overflow-y: auto;
  }
  .budget-dialog .bd-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    cursor: pointer;
    transition: background .2s ease;
  }
  .budget-dialog .bd-close:hover { background: #e2e8f0; }
  .budget-dialog .bd-eyebrow { color: #085ac0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
  .budget-dialog .bd-title { font-family: "Hanken Grotesk", sans-serif; font-size: 22px; line-height: 28px; font-weight: 600; color: #0f1b2d; margin-bottom: 4px; }
  .budget-dialog .bd-subtitle { color: #64748b; font-size: 14px; margin-bottom: 16px; }
  .budget-dialog .bd-public-badge {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(25,135,84,0.1);
    border: 1px solid rgba(25,135,84,0.3);
    color: #157347;
    font-size: 12px;
    font-weight: 600;
  }
  .budget-dialog .bd-public-badge.show { display: flex; }
  .budget-dialog .bd-label { display: block; color: #475569; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
  .budget-dialog .bd-input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 12px;
    color: #0f1b2d;
    font-size: 15px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
  }
  .budget-dialog .bd-input:focus {
    border-color: #085ac0;
    box-shadow: 0 0 0 3px rgba(8,90,192,0.15);
  }
  .budget-dialog .bd-select {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 5px 8px;
    color: #0f1b2d;
    font-size: 13px;
    outline: none;
  }
  .budget-dialog .bd-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
  }
  .budget-dialog .bd-radio input { accent-color: #085ac0; width: 16px; height: 16px; flex-shrink: 0; }
  .budget-dialog .bd-dates {
    background: rgba(8,90,192,0.08);
    border: 1px solid rgba(8,90,192,0.25);
    border-radius: 8px;
    padding: 10px 12px;
  }
  .budget-dialog .bd-dates-label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #085ac0;
    opacity: 0.85;
  }
  .budget-dialog .bd-dates-value { font-size: 0.9rem; font-weight: 700; color: #085ac0; }
  .budget-dialog .bd-result-panel { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px; }
  .budget-dialog #bd-details-body td { padding: 4px 0; color: #475569; font-size: 13px; }
  .budget-dialog #bd-details-body td:last-child { text-align: right; }
  .budget-dialog[open] .bd-inner { animation: vd-pop .34s cubic-bezier(.16,1,.3,1) both; }
  .budget-dialog[open]::backdrop { animation: vd-backdrop-in .3s ease both; }
  @media (prefers-reduced-motion: reduce) {
    .budget-dialog[open] .bd-inner, .budget-dialog[open]::backdrop { animation: none; }
  }

  /* --- WhatsApp widget --- */
  .wa-widget { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
  .wa-fab {
    display: inline-flex; align-items: center; gap: 10px;
    height: 58px; padding: 0 20px 0 14px;
    border: none; border-radius: 9999px; cursor: pointer;
    background: #25D366; color: #fff; font-weight: 700; font-size: 15px;
    box-shadow: 0 10px 28px rgba(37,211,102,0.45);
    transition: transform .2s ease, box-shadow .2s ease;
  }
  .wa-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(37,211,102,0.55); }
  .wa-fab-icon { flex-shrink: 0; }
  .wa-fab-label { white-space: nowrap; }
  @media (max-width: 640px) { .wa-fab { padding: 0; width: 56px; height: 56px; justify-content: center; } .wa-fab-label { display: none; } }

  .wa-card {
    width: 320px; max-width: calc(100vw - 40px);
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 18px 50px rgba(0,0,0,0.28);
    transform-origin: bottom right;
    opacity: 0; transform: translateY(14px) scale(.92); pointer-events: none;
    transition: opacity .25s ease, transform .25s cubic-bezier(.16,1,.3,1);
  }
  .wa-widget.open .wa-card { opacity: 1; transform: none; pointer-events: auto; }
  .wa-card-head { display: flex; align-items: center; gap: 12px; padding: 16px; background: #075E54; color: #fff; }
  .wa-avatar { width: 42px; height: 42px; border-radius: 9999px; background: #128C7E; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .wa-card-head-text { flex: 1; }
  .wa-card-title { font-weight: 700; font-size: 15px; line-height: 1.1; }
  .wa-card-status { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .85; margin-top: 2px; }
  .wa-dot { width: 7px; height: 7px; border-radius: 9999px; background: #4ade80; }
  .wa-card-close { background: transparent; border: none; color: rgba(255,255,255,.85); cursor: pointer; padding: 2px; display: flex; }
  .wa-card-close:hover { color: #fff; }
  .wa-card-body { padding: 22px 16px; background: #ECE5DD; min-height: 96px; }
  .wa-bubble {
    background: #fff; border-radius: 10px; border-top-left-radius: 2px;
    padding: 12px 14px; font-size: 14px; color: #111b21; line-height: 1.45;
    box-shadow: 0 1px 1px rgba(0,0,0,0.08); max-width: 85%;
  }
  .wa-card-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px; background: #25D366; color: #fff; font-weight: 700; font-size: 14px;
    text-decoration: none; transition: background .2s ease;
  }
  .wa-card-cta:hover { background: #1ebe5a; }
  @media (prefers-reduced-motion: reduce) { .wa-card { transition: none; } }

  /* entrance animation */
  @keyframes vd-pop {
    from { opacity: 0; transform: translateY(18px) scale(.94); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes vd-backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  .video-dialog[open] .vd-inner { animation: vd-pop .34s cubic-bezier(.16,1,.3,1) both; }
  .video-dialog[open]::backdrop { animation: vd-backdrop-in .3s ease both; }
  @media (prefers-reduced-motion: reduce) {
    .video-dialog[open] .vd-inner, .video-dialog[open]::backdrop { animation: none; }
  }

/* --- Cookie consent banner --- */
  .cookiealert .acceptcookies {
    margin-left: 12px;
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    background: #085ac0;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
  }
  .cookiealert .acceptcookies:hover { background: #0a4ea5; }
  .cookiealert a { color: #ffba3f; text-decoration: underline; }

  /* --- Legal / content pages (privacy, terms, AI integration) --- */
  .legal-content { color: #cfdaf2; font-size: 16px; line-height: 1.75; }
  .legal-content > h2:first-child { margin-top: 0; }
  .legal-content h2 {
    color: #f9f9ff;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 700;
    margin: 40px 0 14px;
  }
  .legal-content h3 {
    color: #f9f9ff;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin: 32px 0 10px;
  }
  .legal-content h4 {
    color: #ffba3f;
    font-size: 16px;
    font-weight: 700;
    margin: 22px 0 8px;
  }
  .legal-content p { margin: 0 0 14px; }
  .legal-content ul, .legal-content ol { margin: 0 0 16px; padding-left: 24px; }
  .legal-content ul { list-style: disc; }
  .legal-content ol { list-style: decimal; }
  .legal-content li { margin-bottom: 8px; }
  .legal-content li > p { margin: 4px 0; }
  .legal-content a { color: #ffba3f; text-decoration: underline; }
  .legal-content a:hover { color: #f1a80a; }
  .legal-content strong { color: #f9f9ff; font-weight: 700; }
  .legal-content em { font-style: italic; }
  .legal-content code {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #ffdeae;
    word-break: break-word;
  }
  .legal-updated { color: #9fb3d9; font-size: 14px; margin-bottom: 24px; }
