/* ==========================================================================
   Carefy.ai — Brand stylesheet for the institutional site
   Built from the 2024 Manual da Marca: Poppins, navy + magenta→blue→cyan AI gradient.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap');

:root {
  /* ---- Brand blues (manual) ---- */
  --blue:        #347AE3;   /* Azul Carefy / PANTONE 2727C */
  --blue-light:  #67A1F9;
  --blue-pale:   #B5DBFF;
  --navy:        #001855;   /* Azul Carefy 2 / PANTONE 281C */
  --deep:        #020724;   /* cor primária escura (sistema/digital) */
  --cyan:        #1FC7FC;   /* Paleta IA */
  --teal:        #71ECEB;
  --magenta:     #BB29BB;   /* PANTONE Purple C */
  --lavender:    #8094DD;
  --lavender-2:  #8EA6FA;

  /* ---- System accents ---- */
  --green:  #4EF2B5;
  --red:    #FF7880;
  --orange: #FBAD64;
  --gray-sys: #707070;

  /* ---- Neutrals ---- */
  --white:   #ffffff;
  --soft:    #F4F7FF;  /* pale blue page tint */
  --soft-2:  #ECF1FC;
  --line:    #E4E9F5;
  --line-2:  #D4DCEF;

  /* ---- Ink (text on light) ---- */
  --ink:   #0A1330;
  --ink-2: #44507A;
  --ink-3: #6E789B;

  /* ---- Ink on dark ---- */
  --on-dark:    #FFFFFF;
  --on-dark-2:  #B9C6EA;
  --on-dark-3:  #7E8BBC;

  /* ---- Gradients ---- */
  --grad-ai:   linear-gradient(125deg, #C724D6 0%, #8A2BD8 30%, #347AE3 70%, #1FC7FC 100%);
  --grad-cta:  linear-gradient(120deg, #C724D6 0%, #7A3FF0 48%, #347AE3 100%);
  --grad-cta-2:linear-gradient(120deg, #B22FC9 0%, #6646E8 45%, #2E6FD6 100%);
  --grad-deep: linear-gradient(180deg, #050B2C 0%, #020724 60%, #01040F 100%);
  --grad-navy: radial-gradient(120% 120% at 50% 0%, #0A1A5C 0%, #041039 45%, #020724 100%);
  --grad-text: linear-gradient(100deg, #67A1F9 0%, #B57BFF 50%, #1FC7FC 100%);

  /* ---- Radii ---- */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* ---- Shadows ---- */
  --sh-1: 0 1px 2px rgba(2,7,36,.06), 0 2px 6px rgba(2,7,36,.05);
  --sh-2: 0 8px 24px -8px rgba(2,7,36,.14), 0 2px 8px -2px rgba(2,7,36,.06);
  --sh-3: 0 24px 60px -16px rgba(2,7,36,.22), 0 8px 20px -8px rgba(2,7,36,.10);
  --glow-blue:    0 0 0 1px rgba(103,161,249,.25), 0 18px 60px -12px rgba(52,122,227,.45);
  --glow-magenta: 0 0 80px -10px rgba(199,36,214,.55);

  /* ---- Layout ---- */
  --container: 1200px;
  --container-wide: 1320px;
  --nav-h: 76px;

  --ease: cubic-bezier(.2,0,0,1);
  --ease-in: cubic-bezier(.4,0,1,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.container-wide { max-width: var(--container-wide); }
.section { padding: 104px 0; }
.section-sm { padding: 72px 0; }

.dark { background: var(--grad-deep); color: var(--on-dark); }
.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--on-dark); }
.soft-bg { background: var(--soft); }

/* ---- Typography scale ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue);
}
.dark .eyebrow { color: var(--blue-light); }

.display { font-size: clamp(40px, 6vw, 68px); font-weight: 700; line-height: 1.04; letter-spacing: -.03em; }
.h-xl { font-size: clamp(32px, 4.2vw, 46px); font-weight: 600; letter-spacing: -.025em; line-height: 1.08; }
.h-lg { font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -.02em; }
.h-md { font-size: 22px; font-weight: 600; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--ink-2); font-weight: 400; }
.dark .lead { color: var(--on-dark-2); }
.muted { color: var(--ink-3); }
.dark .muted { color: var(--on-dark-3); }

.grad-text {
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  padding: 14px 24px; border-radius: var(--r-pill); border: 1px solid transparent;
  cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), filter .2s var(--ease);
  white-space: nowrap; text-align: center;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--grad-cta); color: #fff; box-shadow: 0 10px 30px -8px rgba(122,63,240,.55); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 16px 38px -8px rgba(122,63,240,.6); }
.btn-primary:active { transform: translateY(0); filter: brightness(.97); }

.btn-light { background: #fff; color: var(--deep); border-color: var(--line-2); }
.btn-light:hover { background: var(--soft); transform: translateY(-1px); box-shadow: var(--sh-2); }

.btn-ghost-dark { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.btn-ghost-dark:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.34); }

.btn-outline { background: transparent; color: var(--blue); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--blue); background: var(--soft); }

.btn-lg { padding: 17px 30px; font-size: 16px; }
.btn-link { color: var(--blue); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.btn-link svg { width: 17px; height: 17px; transition: transform .15s var(--ease); }
.btn-link:hover svg { transform: translateX(3px); }
.dark .btn-link { color: var(--blue-light); }

/* ---- Pills / badges ---- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px 7px 12px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 500;
  background: var(--soft-2); color: var(--ink-2); border: 1px solid var(--line);
}
.pill svg { width: 16px; height: 16px; }
.pill-dark {
  background: rgba(120,150,255,.10); color: var(--on-dark-2);
  border: 1px solid rgba(120,150,255,.22);
}
.pill-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(78,242,181,.2); }

/* ---- Gradient icon chip ---- */
.chip {
  width: 52px; height: 52px; border-radius: 15px; flex: none;
  display: grid; place-items: center;
  background: var(--grad-cta); color: #fff;
  box-shadow: 0 8px 22px -8px rgba(122,63,240,.55);
}
.chip svg { width: 26px; height: 26px; }
.chip-sm { width: 42px; height: 42px; border-radius: 12px; }
.chip-sm svg { width: 21px; height: 21px; }
.chip-soft { background: var(--soft-2); color: var(--blue); box-shadow: none; border: 1px solid var(--line); }
.chip-ring {
  background: rgba(255,255,255,.04); color: #fff;
  border: 1px solid rgba(120,150,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

/* ---- Cards ---- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card-hover:hover { border-color: var(--line-2); box-shadow: var(--sh-2); transform: translateY(-3px); }
.card-dark {
  background: linear-gradient(180deg, rgba(120,150,255,.07), rgba(120,150,255,.02));
  border: 1px solid rgba(120,150,255,.16); border-radius: var(--r-lg); padding: 28px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.card-dark.card-hover:hover { border-color: rgba(120,150,255,.4); box-shadow: 0 24px 60px -20px rgba(52,122,227,.45); transform: translateY(-3px); }

/* ---- Grids ---- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================ HEADER ============================ */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(2,7,36,.72); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(120,150,255,.14);
}
.nav { height: var(--nav-h); display: flex; align-items: center; gap: 36px; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 30px; margin-left: 8px; }
.nav-link {
  font-size: 15px; font-weight: 500; color: var(--on-dark-2);
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  transition: color .15s var(--ease); position: relative;
}
.nav-link:hover { color: #fff; }
.nav-link svg { width: 16px; height: 16px; opacity: .8; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* dropdown */
.has-drop { position: relative; padding-bottom: 4px; }
.dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(8px);
  width: 460px; padding: 12px; background: #070D2E; border: 1px solid rgba(120,150,255,.2);
  border-radius: var(--r-md); box-shadow: var(--sh-3);
  opacity: 0; visibility: hidden; transition: opacity .18s var(--ease), transform .18s var(--ease) .08s, visibility 0s linear .26s; z-index: 60;
}
/* invisible bridge over the gap so the mouse can travel from trigger to menu without losing :hover */
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
.has-drop:hover .dropdown,
.dropdown:hover { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s; }
.drop-item { display: flex; gap: 13px; padding: 13px; border-radius: 10px; transition: background .15s var(--ease); }
.drop-item:hover { background: rgba(120,150,255,.1); }
.drop-item .chip-sm { margin-top: 2px; }
.drop-title { font-size: 15px; font-weight: 600; color: #fff; }
.drop-desc { font-size: 13px; color: var(--on-dark-3); line-height: 1.45; }

/* ============================ FOOTER ============================ */
.site-footer { background: var(--deep); color: var(--on-dark-2); padding: 72px 0 36px; border-top: 1px solid rgba(120,150,255,.12); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-logo img { height: 30px; margin-bottom: 18px; }
.footer-col h5 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-3); font-weight: 600; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14.5px; color: var(--on-dark-2); padding: 7px 0; transition: color .15s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 52px; padding-top: 26px; border-top: 1px solid rgba(120,150,255,.12);
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-size: 13.5px; color: var(--on-dark-3); flex-wrap: wrap;
}

/* ---- Compliance band ---- */
.compliance-row { display: flex; flex-wrap: wrap; gap: 14px; }
.seal {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  border-radius: var(--r-md); border: 1px solid rgba(120,150,255,.18);
  background: rgba(120,150,255,.05); flex: 1 1 220px;
}
.seal .chip-sm { background: rgba(255,255,255,.05); border: 1px solid rgba(120,150,255,.25); color: var(--cyan); box-shadow: none; }
.seal-t { font-size: 14.5px; font-weight: 600; color: #fff; }
.seal-d { font-size: 12.5px; color: var(--on-dark-3); }

/* ---- Steps ---- */
.steps { counter-reset: step; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff; background: var(--grad-cta);
}

/* ---- Section heading block ---- */
.sec-head { max-width: 720px; }
.sec-head.center { margin: 0 auto; text-align: center; }
.sec-head .lead { margin-top: 16px; }

/* ---- misc utility ---- */
.stack-sm > * + * { margin-top: 8px; }
.flow > * + * { margin-top: 20px; }
.divider-glow { height: 1px; background: linear-gradient(90deg, transparent, rgba(120,150,255,.4), transparent); border: 0; }
.tag {
  font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--blue); background: var(--soft-2); padding: 5px 11px; border-radius: var(--r-pill);
}
.dark .tag { color: var(--cyan); background: rgba(31,199,252,.1); }
.mono { font-family: 'Roboto Mono', ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }

/* fade-in on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .section { padding: 76px 0; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 20px; }
  .nav-right .btn-ghost-dark { display: none; }
}

/* ============================================================
   PRODUCT PAGE shared components
   ============================================================ */
.hero-product { position: relative; overflow: hidden; background: var(--grad-navy); }
.hero-product::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(42% 50% at 80% 12%, rgba(199,36,214,.20), transparent 70%),
              radial-gradient(46% 46% at 12% 82%, rgba(31,199,252,.14), transparent 70%);
}
.hero-product .hero-grid { position: relative; display: grid; grid-template-columns: 1.04fr .96fr; gap: 52px; align-items: center; padding: 76px 0 92px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--on-dark-3); margin-bottom: 22px; }
.breadcrumb a:hover { color: var(--on-dark-2); }
.breadcrumb svg { width: 14px; height: 14px; }

/* Feature row */
.feat { display: flex; gap: 16px; align-items: flex-start; }
.feat .chip-sm { margin-top: 2px; }
.feat h4 { font-size: 16.5px; margin-bottom: 5px; }
.feat p { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.dark .feat p { color: var(--on-dark-2); }

/* Steps timeline */
.timeline { position: relative; display: grid; gap: 0; }
.step-row { display: grid; grid-template-columns: 34px 1fr; gap: 18px; padding-bottom: 26px; position: relative; }
.step-row:not(:last-child)::before { content: ""; position: absolute; left: 16.5px; top: 38px; bottom: 0; width: 2px; background: linear-gradient(180deg, rgba(120,150,255,.5), rgba(120,150,255,.12)); }
.dark .step-row:not(:last-child)::before { background: linear-gradient(180deg, rgba(120,150,255,.5), rgba(120,150,255,.12)); }
.step-row h4 { font-size: 16.5px; margin-bottom: 4px; }
.step-row p { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }
.dark .step-row p { color: var(--on-dark-2); }

/* Stat */
.stat-num { font-size: clamp(34px, 4vw, 48px); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.stat-label { font-size: 14px; color: var(--ink-3); margin-top: 8px; }
.dark .stat-label { color: var(--on-dark-3); }

/* Product mock window */
.mock {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid rgba(120,150,255,.22);
  background: linear-gradient(180deg, #0A1130, #070D24); box-shadow: 0 40px 90px -30px rgba(122,63,240,.5), 0 10px 30px -10px rgba(2,7,36,.6);
}
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid rgba(120,150,255,.16); background: rgba(120,150,255,.04); }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.mock-title { margin-left: 10px; font-size: 12.5px; color: var(--on-dark-3); font-family: 'Roboto Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-body { padding: 18px; }
.mock-line { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(120,150,255,.14); background: rgba(120,150,255,.03); margin-bottom: 9px; }
.mock-line .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.mock-line .ic svg { width: 17px; height: 17px; }
.ml-name { font-size: 13.5px; color: #fff; font-weight: 500; }
.ml-sub { font-size: 11.5px; color: var(--on-dark-3); }
.ml-code { font-family: 'Roboto Mono', monospace; font-size: 11.5px; color: var(--blue-light); }
.ml-right { margin-left: auto; text-align: right; flex: none; }
.ml-right .ml-name { white-space: nowrap; }
.ic-ok { background: rgba(78,242,181,.12); color: var(--green); }
.ic-warn { background: rgba(251,173,100,.14); color: var(--orange); }
.ic-danger { background: rgba(255,120,128,.13); color: var(--red); }
.ic-info { background: rgba(103,161,249,.14); color: var(--blue-light); }
.sev-bar { height: 6px; border-radius: 999px; background: rgba(120,150,255,.14); overflow: hidden; }
.sev-bar > span { display: block; height: 100%; border-radius: 999px; }
.badge-sev { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; letter-spacing: .02em; }
.bs-alta { background: rgba(255,120,128,.15); color: #FF9CA1; }
.bs-media { background: rgba(251,173,100,.15); color: #FBC58A; }
.bs-baixa { background: rgba(78,242,181,.13); color: #7DF5C9; }

/* diff card */
.diff { padding: 24px; }
.diff .chip-sm { margin-bottom: 16px; }
.diff h4 { font-size: 16.5px; margin-bottom: 6px; }
.diff p { font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.dark .diff p { color: var(--on-dark-2); }

/* cross-sell */
.xsell { display: flex; gap: 16px; align-items: center; padding: 22px 24px; }
.xsell .chip { flex: none; }
.xsell h4 { font-size: 17px; }
.xsell p { font-size: 14px; color: var(--ink-2); margin-top: 2px; }

@media (max-width: 880px) {
  .hero-product .hero-grid { grid-template-columns: 1fr; gap: 36px; padding: 52px 0 64px; }
}

/* ============================================================
   HubSpot lead form (iframe embed) — loading state.
   The form itself renders inside a cross-origin iframe; its field/label
   colors are configured in HubSpot's form editor, not here. We only style
   the loading placeholder and keep the dark .form-card behind it.
   ============================================================ */
.hs-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 0; color: var(--ink-3); font-size: 14px; }
.hs-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(52,122,227,.25); border-top-color: var(--blue); animation: hsspin .7s linear infinite; }
@keyframes hsspin { to { transform: rotate(360deg); } }
#hs-form .hs-form-iframe { width: 100% !important; }

/* The HubSpot form text/labels render dark (and can't be themed from here — it's a
   cross-origin iframe). So the form card is LIGHT: dark text reads clean on white,
   and the white card pops on the dark CTA section. */
.cta-final .form-card { background: #fff; border-color: var(--line-2); }
.cta-final .form-card .muted { color: var(--ink-3); }
