/* ==========================================================================
   Prontix landing page
   Brand tokens come from the identity deck (Assets/Brand): blue + white carry
   the page, purple and pink only appear in the ECG motif and the highlights.
   ========================================================================== */

:root {
  --ink: #020A28;          /* Azul Profundo */
  --ink-2: #2B3452;        /* body text */
  --ink-3: #566082;        /* secondary text, 6.1:1 on white */
  --ink-4: #8A93AD;        /* decorative only, never body text */
  --line: #E3E8F2;
  --line-2: #EDF1F8;
  --mist: #F4F7FC;         /* Cinza Claro */
  --white: #FFFFFF;
  --blue: #2F6CF6;         /* Azul Principal */
  --blue-press: #1F57DA;
  --blue-ink: #1D4FD0;     /* blue for small text, 6.4:1 on white */
  --blue-tint: #EAF0FE;
  --purple: #7A4CE8;       /* Roxo Suave */
  --purple-tint: #F1ECFD;
  --pink: #E7A8F0;         /* Rosa Destaque */
  --pink-soft: #FBE6FD;
  --green: #0F8A5F;
  --green-tint: #E8F7F0;

  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 68px;
  --radius-card: 12px;
  --shadow-card: 0 1px 2px rgba(2, 10, 40, 0.04), 0 2px 8px rgba(2, 10, 40, 0.04);
  --shadow-float: 0 2px 4px rgba(2, 10, 40, 0.04), 0 18px 40px -12px rgba(2, 10, 40, 0.16);

  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(88px, 11vw, 160px);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p, h1, h2, h3, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(1280px + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.ico { width: 22px; height: 22px; flex: none; }
.ico-sm { width: 16px; height: 16px; flex: none; }

.section { padding-block: var(--section-y); }

.h2 {
  font-size: clamp(2rem, 1.25rem + 2.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.h3 {
  font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.lead {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  color: var(--ink-3);
  max-width: 54ch;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 10px; border: 1px solid transparent;
  font-family: var(--font-body); font-size: 0.97rem; font-weight: 600;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  touch-action: manipulation;
  transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), color .2s var(--ease-out), transform .15s var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 0.9rem; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-press); }
.btn-outline { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: #C9D3E6; background: var(--mist); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: transparent; }
.btn-ghost:hover { background: var(--mist); }

.link-quiet {
  font-size: 0.95rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
  padding: 10px 6px;
}
.link-quiet:hover { color: var(--blue-ink); }

.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: inherit; color: inherit; text-align: left;
}
.link-btn:hover { color: var(--blue-ink); text-decoration: underline; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
}
.brand img { width: 136px; height: auto; }
.brand { flex: none; padding: 6px 0; }

.nav { margin-left: auto; display: none; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  display: block; padding: 10px 12px; border-radius: 8px;
  font-size: 0.93rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--mist); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-actions .link-quiet { display: none; }

.menu-toggle {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white); cursor: pointer;
}
.menu-toggle[aria-expanded="true"] { background: var(--mist); }

.menu-mobile {
  border-top: 1px solid var(--line);
  background: var(--white);
  padding: 8px var(--gutter) 20px;
}
.menu-mobile a {
  display: block; padding: 14px 4px; border-bottom: 1px solid var(--line-2);
  font-family: var(--font-display); font-size: 1.125rem; font-weight: 500;
  color: var(--ink); text-decoration: none;
}

@media (min-width: 1024px) {
  .nav { display: block; }
  .header-actions { margin-left: 16px; }
  .header-actions .link-quiet { display: inline-block; }
  .menu-toggle, .menu-mobile { display: none !important; }
}
@media (max-width: 380px) {
  .brand img { width: 112px; }
}

/* ==========================================================================
   App UI replicas — same tokens as the real app (Tailwind brand colours,
   rounded-xl cards, gray-100 borders, tiny uppercase table labels)
   ========================================================================== */

.ui-card {
  background: var(--white);
  border: 1px solid #EEF1F6;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink);
}
.ui-icon {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
}
.ui-icon-blue { background: var(--blue-tint); color: var(--blue); }
.ui-icon-purple { background: var(--purple-tint); color: var(--purple); }
.ui-icon-pink { background: #FCEEFD; color: #B34FC4; }
.ui-label {
  font-size: 0.625rem; font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase; color: #8A93AD;
}
.ui-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 999px; border: 1px solid;
  font-size: 0.72rem; font-weight: 500; white-space: nowrap;
}
.ui-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ui-badge-green { background: #ECFDF5; border-color: #A7F3D0; color: #047857; }
.ui-badge-amber { background: #FFFBEB; border-color: #FDE68A; color: #B45309; }
.ui-tag {
  display: inline-block; padding: 1px 8px; border-radius: 6px;
  background: var(--blue-tint); color: var(--blue-ink); font-size: 0.72rem; font-weight: 500;
}
.ui-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 12px; background: var(--white); border: 1px solid var(--line);
  border-radius: 10px; font-size: 0.78rem; font-weight: 500; color: var(--ink);
}
.ui-pill svg { color: var(--blue); }
.ui-pill small {
  display: block; font-size: 0.6rem; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-4); line-height: 1.2;
}
.ui-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 9px;
  background: var(--blue); color: #fff; font-size: 0.78rem; font-weight: 600;
}
.ui-btn-quiet { background: transparent; color: var(--ink-3); font-weight: 500; }
.ui-seg {
  display: inline-flex; padding: 3px; gap: 2px; background: var(--mist);
  border-radius: 8px; font-size: 0.72rem; color: var(--ink-3);
}
.ui-seg span { padding: 3px 9px; border-radius: 6px; }
.ui-seg .on { background: var(--white); color: var(--ink); box-shadow: var(--shadow-card); }

/* Procedure card (MetricCardView) */
.proc { overflow: hidden; display: flex; flex-direction: column; }
.proc-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid #EEF1F6;
}
.proc-head h3 {
  flex: 1; min-width: 0;
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  letter-spacing: -0.01em; line-height: 1.3; color: var(--ink);
}
.proc-arrow { color: var(--ink-4); }
.proc-totals {
  display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid #EEF1F6;
}
.proc-totals > div { padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.proc-totals > div + div { border-left: 1px solid #EEF1F6; }
.proc-totals b {
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 600;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15;
}
.proc-totals b.money { font-family: var(--font-body); font-size: 1rem; color: var(--purple); padding-top: 4px; }
.proc-totals b.money-blue { color: var(--blue); }
.proc-totals b.money-pink { color: #B34FC4; }
.proc-totals small { font-size: 0.65rem; color: var(--ink-4); }
.proc-row {
  position: relative;
  display: grid; grid-template-columns: 1fr 30px 76px; gap: 6px; align-items: center;
  padding: 8px 14px; border-bottom: 1px solid #F3F5F9;
  font-size: 0.78rem; font-variant-numeric: tabular-nums;
}
.proc-row > :nth-child(2) { text-align: center; }
.proc-row > :nth-child(3) { text-align: right; }
.proc-row-head { background: var(--mist); padding-block: 5px; }
.proc-row:last-child { border-bottom: 0; }
.org { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); white-space: nowrap; }
.org-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.org-ig { background: #D9468F; }
.org-ind { background: var(--blue); }
.org-g { background: #E8A317; }

.swap { display: inline-grid; justify-items: inherit; }
.swap > span { grid-area: 1 / 1; }
.swap .old { opacity: 0; }

/* ==========================================================================
   HERO
   ========================================================================== */

.hero { position: relative; }
.hero-stage { padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 96px); }

.hero-grid {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

.hero-title {
  font-size: clamp(2.4rem, 1.35rem + 3.1vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 15ch;
}
.hero-lead {
  margin-top: 24px;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  color: var(--ink-3);
  max-width: 50ch;
}
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 16px; font-size: 0.9rem; color: var(--ink-3); }
.hero-eyebrow {
  display: inline-block; margin-bottom: 20px;
  font-size: 0.85rem; font-weight: 600; color: var(--blue-ink);
  padding: 4px 12px; border-radius: 999px; background: var(--blue-tint);
}

/* The stage: static layout first (mobile, tablet, reduced motion) */
.stage { position: relative; display: grid; }
.doc { padding: 18px 20px 20px; max-width: 520px; }
.doc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.doc-name { font-weight: 600; font-size: 0.85rem; }
.doc-date { margin-left: auto; font-size: 0.72rem; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.doc-body { font-size: 0.86rem; line-height: 1.7; color: var(--ink-2); }

.hl {
  background: linear-gradient(var(--pink-soft), var(--pink-soft)) no-repeat left center;
  background-size: calc(var(--ha) * 100%) 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  color: inherit; padding: 1px 2px; margin: 0 -1px; border-radius: 4px;
  --ha: 1;
}

.extract {
  position: relative;
  width: min(100%, 360px);
  justify-self: end;
  margin-top: -28px;
  padding: 14px 16px 6px;
  box-shadow: var(--shadow-float);
}
.extract-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-weight: 600; font-size: 0.82rem; margin-bottom: 6px;
}
.extract-fields > div {
  display: grid; grid-template-columns: 84px 1fr; gap: 8px; align-items: baseline;
  padding: 8px 0; border-top: 1px solid #F1F4F9;
}
.extract-fields dt { font-size: 0.72rem; color: var(--ink-3); }
.extract-fields dd { min-width: 0; }
.chip {
  display: inline-block; white-space: nowrap; font-weight: 500; font-size: 0.82rem; color: var(--ink);
  border-radius: 6px;
}

.proc-hero { display: none; }
.stage-caption { display: none; }

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
}

/* ---------- Pinned, scroll-linked hero (JS adds .is-pinned) ----------
   JS writes --a (highlights), --b (fields travel), --c (dashboard) on .stage,
   each 0..1 and already eased; everything below is a pure function of them,
   so scrolling back up plays the same frames in reverse. */

.hero.is-pinned { height: 250vh; }
.hero.is-pinned .hero-stage {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: flex; align-items: center;
  padding-block: 24px 32px;
}
.hero.is-pinned .stage {
  display: block;
  max-width: 640px; margin-left: auto;
  height: clamp(440px, 66vh, 540px);
  --a: 0; --b: 0; --c: 0;
}
.hero.is-pinned .doc {
  position: absolute; left: 0; top: 0; width: 70%;
  opacity: calc(1 - var(--b) * 0.45 - var(--c) * 0.25);
  transform: translateY(calc(var(--c) * -14px));
}
.hero.is-pinned .hl { --ha: clamp(0, calc(var(--a) * 4 - var(--i)), 1); }

/* The extracted card is on screen from the start as an empty form, so the
   composition is complete at rest and the scroll visibly fills it in. */
.hero.is-pinned .extract {
  position: absolute; right: 0; top: 46%;
  width: 56%; margin: 0;
  opacity: clamp(0, calc(1 - var(--c) * 2.4), 1);
  transform: translateY(calc(var(--c) * -28px)) scale(calc(1 - var(--c) * 0.04));
}
.hero.is-pinned .extract .ui-badge { opacity: clamp(0, calc((var(--b) - 0.85) * 7), 1); }
.hero.is-pinned .extract-fields dd {
  --bi: clamp(0, calc(var(--b) * 2.2 - var(--i) * 0.4), 1);
  position: relative;
}
.hero.is-pinned .extract-fields dd::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: calc(78% - var(--i) * 12%); height: 8px; margin-top: -4px; border-radius: 4px;
  background: var(--line-2);
  opacity: calc(1 - var(--bi) * 3);
}

.hero.is-pinned .chip {
  position: relative;
  opacity: clamp(0, calc(var(--bi) * 6), 1);
  transform: translate(calc(var(--dx, 0px) * (1 - var(--bi))), calc(var(--dy, 0px) * (1 - var(--bi))));
  background: color-mix(in srgb, var(--pink-soft) calc((1 - var(--bi)) * 100%), transparent);
  box-shadow: 0 8px 20px -8px rgba(122, 76, 232, calc((1 - var(--bi)) * 0.45));
  padding: 0 2px; margin: 0 -2px;
}

.hero.is-pinned .proc-hero {
  display: flex;
  position: absolute; right: 3%; top: 22%;
  width: 300px;
  box-shadow: var(--shadow-float);
  /* enters only once the extracted card has mostly left */
  opacity: clamp(0, calc((var(--c) - 0.3) * 1.8), 1);
  transform: translateY(calc((1 - var(--c)) * 56px));
}
.hero.is-pinned .proc-hero .is-hot::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--blue-tint);
  opacity: clamp(0, calc((var(--c) - 0.55) * 3), 1);
}
.hero.is-pinned .proc-hero .is-hot { z-index: 0; font-weight: 600; }
.hero.is-pinned .proc-hero .swap { --x: clamp(0, calc((var(--c) - 0.7) * 4), 1); }
.hero.is-pinned .proc-hero .swap .old { opacity: calc(1 - var(--x)); }
.hero.is-pinned .proc-hero .swap .new { opacity: var(--x); }

.hero.is-pinned .stage-caption {
  display: grid; position: absolute; left: 0; bottom: 0;
  font-size: 0.875rem; color: var(--ink-3);
}
.stage-caption span {
  grid-area: 1 / 1;
  display: inline-flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s var(--ease-out), transform .45s var(--ease-out);
}
.stage-caption span::before {
  content: ""; width: 18px; height: 2px; border-radius: 2px; background: var(--purple);
}
.stage[data-active="1"] [data-cap="1"],
.stage[data-active="2"] [data-cap="2"],
.stage[data-active="3"] [data-cap="3"] { opacity: 1; transform: none; }

/* One orchestrated load sequence for the hero copy */
@media (prefers-reduced-motion: no-preference) {
  .hero-eyebrow, .hero-title, .hero-lead, .hero-cta, .hero-note, .hero-visual {
    animation: load-rise .9s var(--ease-out) both;
  }
  .hero-title { animation-name: load-title; animation-duration: 1.1s; }
  .hero-lead { animation-delay: .18s; }
  .hero-cta { animation-delay: .28s; }
  .hero-note { animation-delay: .34s; }
  .hero-visual { animation-delay: .32s; animation-duration: 1.1s; }
}
@keyframes load-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes load-title {
  from { opacity: 0; transform: translateY(28px); clip-path: inset(0 0 100% 0); }
  to { opacity: 1; transform: none; clip-path: inset(0 0 -20% 0); }
}

/* ==========================================================================
   PROBLEM
   ========================================================================== */

.prob-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 64px); }
.prob-head .h2 { max-width: 20ch; }
.prob-grid { display: grid; gap: 12px; }
.prob {
  padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-card);
  background: var(--white); box-shadow: var(--shadow-card);
}
.prob-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--purple); padding: 2px 8px; border-radius: 6px; background: var(--purple-tint);
}
.prob h3 { margin-top: 14px; font-size: 1.2rem; letter-spacing: -0.02em; line-height: 1.3; color: var(--ink); }
.prob p { margin-top: 8px; color: var(--ink-3); font-size: 0.98rem; }
.prob-close {
  margin-top: clamp(32px, 5vw, 56px);
  font-family: var(--font-display); font-weight: 600; color: var(--ink);
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); line-height: 1.3; letter-spacing: -0.02em; max-width: 36ch;
}
@media (min-width: 720px) { .prob-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1120px) { .prob-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .prob-head { grid-template-columns: 6fr 5fr; align-items: end; gap: 64px; } }

/* ==========================================================================
   HOW IT WORKS
   ========================================================================== */

.how { background: var(--mist); }
.how-grid { display: grid; gap: 56px; }
.how-intro .lead { margin-top: 20px; }

.steps { position: relative; padding-left: 68px; }
.step-line {
  position: absolute; left: 21px; top: 24px; bottom: 24px; width: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.step-line span {
  display: block; height: 100%;
  background: linear-gradient(var(--blue), var(--purple) 70%, var(--pink));
  transform-origin: top;
  transform: scaleY(var(--lp, 1));
}
.step { position: relative; padding-bottom: 56px; --s: 1; }
.step:last-child { padding-bottom: 0; }
.step-mark { position: absolute; left: -68px; top: -2px; }
.step-n {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  background: var(--white);
  border: 2px solid color-mix(in srgb, var(--blue) calc(var(--s) * 100%), var(--line));
  color: color-mix(in srgb, var(--blue) calc(var(--s) * 100%), var(--ink-4));
  transform: scale(calc(0.9 + var(--s) * 0.1));
}
.blip {
  width: 64px; height: 24px; color: var(--purple); stroke-width: 1.6;
  margin-bottom: 8px;
  clip-path: inset(0 calc((1 - var(--s)) * 100%) 0 0);
}
.step h3 { font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1.25; }
.step p { margin-top: 10px; max-width: 52ch; color: var(--ink-3); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tags li {
  font-size: 0.8rem; font-weight: 500; color: var(--ink-2);
  padding: 4px 10px; border-radius: 6px; background: var(--white); border: 1px solid var(--line);
}

@media (min-width: 1024px) {
  .how-grid { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .how-intro { position: sticky; top: calc(var(--header-h) + 64px); }
  .steps { padding-left: 88px; }
  .step-line { left: 25px; }
  .step-mark { left: -88px; }
  .step-n { width: 52px; height: 52px; font-size: 1.2rem; }
  .step { padding-bottom: 88px; }
}

/* ==========================================================================
   REVENUE
   ========================================================================== */

.rev-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 72px); }

/* "Common systems" vs Prontix: one total against the same total opened up */
.contrast {
  display: grid; gap: 12px; align-items: stretch;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.contrast-plain, .contrast-prontix {
  padding: 22px 24px; border-radius: var(--radius-card); border: 1px solid var(--line);
}
.contrast-plain { background: var(--mist); }
.contrast-prontix { background: var(--white); box-shadow: var(--shadow-card); border-color: color-mix(in srgb, var(--blue) 30%, var(--line)); }
.contrast-label { margin-top: 10px; font-size: 0.85rem; color: var(--ink-3); }
.contrast-total {
  font-family: var(--font-display); font-weight: 600; font-size: 2rem; letter-spacing: -0.03em;
  color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2;
}
.contrast-q { margin-top: 16px; display: grid; gap: 8px; }
.contrast-q li { position: relative; padding-left: 26px; color: var(--ink-3); font-size: 0.95rem; }
.contrast-q li::before {
  content: "?"; position: absolute; left: 0; top: 0.1em;
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.72rem; font-weight: 600; color: var(--ink-4); border: 1px solid var(--ink-4);
}
.contrast-a { margin-top: 10px; display: grid; }
.contrast-a li {
  display: flex; justify-content: space-between; gap: 16px; padding: 8px 0;
  border-bottom: 1px solid var(--line-2); font-size: 0.95rem; color: var(--ink-2);
}
.contrast-a b { color: var(--blue); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.contrast-note { margin-top: 12px; font-size: 0.85rem; color: var(--ink-3); }
.contrast-arrow { display: grid; place-items: center; color: var(--blue); }
.contrast-arrow .ico { transform: rotate(135deg); }
@media (min-width: 900px) {
  .contrast { grid-template-columns: 5fr auto 7fr; gap: 20px; }
  .contrast-arrow .ico { transform: rotate(45deg); }
}

.dash {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(14px, 2.4vw, 28px);
}
.dash-top {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px;
  margin-bottom: 18px;
}
.dash-title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--ink); letter-spacing: -0.02em; }
.dash-sub { font-size: 0.78rem; color: var(--ink-3); }
.dash-filters { display: flex; gap: 8px; flex-wrap: wrap; }

.kpis { display: grid; gap: 12px; grid-template-columns: 1fr; }
.kpi { display: flex; gap: 14px; padding: 16px; align-items: flex-start; }
.kpi-label { font-size: 0.74rem; font-weight: 500; color: var(--ink-3); margin-bottom: 4px; }
.kpi-value {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2;
}
.kpi-sm { font-size: 1.05rem; line-height: 1.3; }
.kpi-blue { color: var(--blue); }
.kpi-sub { font-size: 0.74rem; color: var(--ink-4); margin-top: 2px; }
.kpi-split { font-size: 0.82rem; color: var(--ink-2); }
.kpi-split small {
  display: block; font-size: 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-4);
  margin-top: 4px;
}
.kpi-split b { color: var(--blue); font-weight: 600; }

.procs { display: grid; gap: 12px; margin-top: 12px; grid-template-columns: 1fr; }
.procs .proc:nth-child(n+3) { display: none; }

.dash-caption { margin-top: 14px; font-size: 0.82rem; color: var(--ink-3); }

@media (min-width: 640px) {
  .kpis, .procs { grid-template-columns: 1fr 1fr; }
  .procs .proc:nth-child(n+3) { display: flex; }
}
@media (min-width: 1120px) {
  .kpis, .procs { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 639px) {
  .hide-sm { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 12px; }
  .kpi .ui-icon { display: none; }
  .kpi-value { font-size: 1.15rem; }
  .kpi-sm { font-size: 0.9rem; }
  .blip { width: 48px; }
}

.rev-points {
  display: grid; gap: 40px;
  margin-top: clamp(56px, 7vw, 96px);
}
.rev-point h3 { font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.3; }
.rev-point p { margin-top: 10px; color: var(--ink-3); max-width: 46ch; }
.rev-point-lead h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.15; letter-spacing: -0.03em; max-width: 16ch; }
.rev-point-lead p { font-size: 1.0625rem; }
.rev-point:not(.rev-point-lead) { padding-top: 24px; border-top: 1px solid var(--line); }

@media (min-width: 900px) {
  .rev-head { grid-template-columns: 6fr 5fr; align-items: end; gap: 64px; }
  .rev-points { grid-template-columns: 5fr 7fr; column-gap: 80px; row-gap: 0; }
  .rev-point-lead { grid-row: span 3; position: sticky; top: calc(var(--header-h) + 48px); align-self: start; }
  .rev-point:not(.rev-point-lead) { padding-block: 28px; }
  .rev-point:not(.rev-point-lead) { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; }
  .rev-point:not(.rev-point-lead) p { margin-top: 0; }
}

/* ==========================================================================
   FEATURES
   ========================================================================== */

.feat-title { max-width: 18ch; margin-bottom: clamp(56px, 8vw, 104px); }

.feat { display: grid; gap: 36px; align-items: center; }
.feat + .feat, .feat + .feat-pair { margin-top: clamp(88px, 11vw, 152px); }
.feat-copy p { margin-top: 16px; color: var(--ink-3); max-width: 48ch; }
.plan-flag {
  display: inline-block; margin-bottom: 14px;
  font-size: 0.8rem; font-weight: 600; color: var(--purple);
  padding: 3px 10px; border-radius: 999px; background: var(--purple-tint);
}
.feat-visual {
  position: relative;
  background: var(--mist);
  border-radius: 24px;
  padding: clamp(20px, 4vw, 48px);
}

@media (min-width: 960px) {
  .feat { grid-template-columns: 5fr 7fr; gap: 80px; }
  .feat-flip .feat-copy { order: 2; }
  .feat-flip { grid-template-columns: 7fr 5fr; }
}

/* Patient */
.patient { padding: 20px; max-width: 460px; margin-inline: auto; }
.patient-head { display: flex; align-items: center; gap: 14px; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--blue-tint); color: var(--blue-ink); font-weight: 600; font-size: 0.95rem;
}
.avatar-sm { width: 34px; height: 34px; font-size: 0.75rem; }
.avatar-alt { background: var(--purple-tint); color: var(--purple); }
.patient-name { font-weight: 600; font-size: 1rem; }
.patient-meta { font-size: 0.8rem; color: var(--ink-3); display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.patient-sec { display: block; margin: 20px 0 6px; }
.journey { position: relative; }
.journey li {
  position: relative;
  display: grid; grid-template-columns: 82px 1fr auto; gap: 12px; align-items: baseline;
  padding: 11px 0 11px 18px; border-bottom: 1px solid #F1F4F9;
}
.journey li::before {
  content: ""; position: absolute; left: 0; top: 18px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--blue);
}
.journey li:not(:last-child)::after {
  content: ""; position: absolute; left: 3px; top: 27px; bottom: -11px; width: 1px; background: var(--line);
}
.j-date { font-size: 0.74rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.j-name { font-size: 0.85rem; font-weight: 500; }
.j-val { font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.patient-total {
  display: flex; justify-content: space-between; padding-top: 12px; font-size: 0.82rem; color: var(--ink-3);
}
.patient-total b { color: var(--blue); font-variant-numeric: tabular-nums; }

/* Agenda */
.agenda { padding: 16px; }
.agenda-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.agenda-head p { font-weight: 600; font-size: 0.9rem; }
.agenda-grid { display: grid; grid-template-columns: 44px repeat(3, 1fr); gap: 6px; }
.ag-times {
  display: grid; grid-template-rows: repeat(5, 64px);
  padding-top: 28px; font-size: 0.66rem; color: var(--ink-4); font-variant-numeric: tabular-nums;
}
.ag-col { position: relative; min-height: 354px; padding-top: 34px; }
.ag-col::after {
  content: ""; position: absolute; inset: 34px 0 0; border-radius: 8px;
  background: repeating-linear-gradient(to bottom, #EEF1F6 0 1px, transparent 1px 64px);
  z-index: 0;
}
.ag-day {
  position: absolute; top: 0; left: 0; right: 0; text-align: center;
  font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-4);
}
.ag-day b { font-size: 0.85rem; color: var(--ink); margin-left: 3px; letter-spacing: 0; }
.appt {
  position: absolute; z-index: 1; left: 2px; right: 2px;
  /* --t: hours after 08:00, --d: duration in hours; one hour = 64px */
  top: calc(34px + var(--t) * 64px + 2px);
  height: calc(var(--d) * 64px - 4px);
  padding: 5px 7px 5px 9px; border-radius: 7px;
  font-size: 0.68rem; line-height: 1.3; overflow: hidden;
}
.appt::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.appt b { font-weight: 600; margin-right: 3px; font-variant-numeric: tabular-nums; }
.appt small { display: block; opacity: .8; font-size: 0.64rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-scheduled { background: #EAF0FE; color: var(--ink); }
.st-scheduled::before { background: var(--blue); }
.st-confirmed { background: #ECFDF5; color: #064E3B; }
.st-confirmed::before { background: #10B981; }
.st-done { background: #F1F5F9; color: #475569; }
.st-done::before { background: #94A3B8; }
.st-canceled { background: #FEF2F2; color: #EF4444; text-decoration: line-through; text-decoration-color: #FCA5A5; }
.st-canceled::before { background: #F87171; }
.st-noshow { background: #FFFBEB; color: #92400E; }
.st-noshow::before { background: #F59E0B; }

.wa-bubble {
  position: relative;
  margin: 16px 0 0 auto; max-width: 300px;
  background: #E3F7E9; color: #0E2A1B;
  border-radius: 14px 14px 4px 14px;
  padding: 10px 14px 18px;
  font-size: 0.84rem; line-height: 1.45;
  box-shadow: var(--shadow-float);
}
.wa-from {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 600; color: #128C4B; margin-bottom: 4px;
}
.wa-time { position: absolute; right: 12px; bottom: 5px; font-size: 0.64rem; color: #4E7A60; }
.qr-chip {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 12px;
  padding: 9px 14px; border-radius: 10px;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-card);
  font-size: 0.8rem; font-weight: 500; color: var(--ink);
}
.qr-chip svg { color: var(--purple); }

@media (min-width: 960px) {
  .wa-bubble { position: absolute; z-index: 2; right: -28px; bottom: 28px; margin: 0; width: 272px; }
  .qr-chip { position: absolute; z-index: 2; left: -24px; top: -20px; margin: 0; }
}
@media (max-width: 520px) {
  .agenda-grid { grid-template-columns: 38px repeat(2, 1fr); }
  .ag-col-3 { display: none; }
}

/* Summary */
.summary { padding: 18px; max-width: 520px; margin-inline: auto; }
.summary-head { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 14px; border-bottom: 1px solid #F1F4F9; }
.summary-head > div { flex: 1; min-width: 0; }
.summary-title { font-weight: 600; font-size: 0.95rem; }
.summary-meta { font-size: 0.75rem; color: var(--ink-3); }
.summary-body > div { padding: 12px 0; border-bottom: 1px solid #F1F4F9; }
.summary-body dt { font-size: 0.7rem; font-weight: 600; color: var(--purple); margin-bottom: 3px; }
.summary-body dd { font-size: 0.84rem; color: var(--ink-2); }
.summary-foot {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center;
  padding-top: 14px; font-size: 0.75rem; color: var(--ink-3);
}
.summary-foot > span:first-child { display: inline-flex; align-items: center; gap: 6px; }

/* Approvals + team pair */
.feat-pair { display: grid; gap: 72px; }
.feat-small > p:not(.plan-flag) { margin-top: 14px; color: var(--ink-3); max-width: 46ch; }
.feat-small .ui-card { margin-top: 28px; }
@media (min-width: 960px) {
  .feat-pair { grid-template-columns: 7fr 5fr; gap: 80px; align-items: start; }
}

.approval { padding: 16px; }
.approval-file {
  display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 0.85rem;
}
.approval-file svg { color: var(--ink-3); }
.approval-file span { margin-left: auto; font-size: 0.7rem; color: var(--ink-4); font-weight: 400; }
.approval-warn {
  margin-top: 12px; padding: 10px 12px; border-radius: 8px;
  background: #FEF2F2; border: 1px solid #FEE2E2;
}
.approval-warn p { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.78rem; color: #B91C1C; }
.approval-warn small { display: block; margin-top: 3px; font-size: 0.72rem; color: #B91C1C; opacity: .85; }
.approval-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }

.team { padding: 16px; }
.team-count { font-size: 0.78rem; color: var(--ink-3); margin-bottom: 8px; }
.team li {
  display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #F1F4F9;
  font-size: 0.85rem; font-weight: 500;
}
.team li > span:nth-child(2) { flex: 1; min-width: 0; }
.team small { display: block; font-size: 0.72rem; color: var(--ink-3); font-weight: 400; }

/* ==========================================================================
   PLANS
   ========================================================================== */

.plans { background: var(--mist); }
.plans-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 64px); }
@media (min-width: 900px) {
  .plans-head { grid-template-columns: 4fr 7fr; align-items: end; gap: 64px; }
}

.plan-grid { display: grid; gap: 16px; }
@media (min-width: 900px) {
  .plan-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
}
.plan {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
}
.plan-featured { border: 2px solid var(--blue); padding: 27px; }
.plan-name { font-size: 1.25rem; letter-spacing: -0.02em; }
.plan-price { margin-top: 14px; display: flex; align-items: baseline; gap: 4px; color: var(--ink); }
.plan-price b {
  font-family: var(--font-display); font-weight: 600; font-size: 2.4rem; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.plan-price span { color: var(--ink-3); font-size: 0.95rem; }
.plan-setup { margin-top: 2px; color: var(--ink-3); font-size: 0.85rem; }
.plan-setup + .plan-tier { margin-top: 8px; }
.plan-tier {
  margin-top: 16px; padding: 12px 0; border-block: 1px solid var(--line-2);
  font-weight: 600; color: var(--ink); font-size: 0.95rem;
}
.plan-tier small { display: block; font-weight: 400; color: var(--ink-3); font-size: 0.85rem; }
.plan-list { margin: 18px 0 28px; display: grid; gap: 10px; flex: 1; align-content: start; }
.plan-list li {
  position: relative; padding-left: 26px; font-size: 0.95rem; line-height: 1.45;
}
.plan-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.45em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}
.plan-list .plan-inherit { padding-left: 0; color: var(--ink-3); font-size: 0.88rem; }
.plan-list .plan-inherit::before { display: none; }
.plan .btn { width: 100%; }

/* Mensal / Anual. Monthly is the default and the no-JS view; main.js reveals the switch. */
.cycle-switch {
  display: flex; width: fit-content; margin: 0 auto clamp(24px, 4vw, 36px);
  padding: 4px; gap: 4px; border-radius: 12px;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.cycle-switch[hidden] { display: none; }
.cycle-switch button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
  font: 600 0.95rem/1.2 var(--font-body); color: var(--ink-3);
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out);
}
.cycle-switch button:hover { color: var(--ink); }
.cycle-switch button[aria-checked="true"] { background: var(--ink); color: #fff; }
.cycle-badge {
  padding: 2px 7px; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  background: var(--green-tint); color: var(--green);
}

.plan-grid[data-cycle-view="monthly"] .price-y,
.plan-grid[data-cycle-view="yearly"] .price-m { display: none; }
.price-y .plan-price b { font-size: 2.1rem; }
.plan-was { margin-top: 4px; font-size: 0.85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.plan-was s { color: var(--ink-4); }
.plan-save { margin-top: 8px; font-size: 0.85rem; color: var(--green); }
.plan-save b { font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-save-pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--green-tint); font-weight: 600;
}
.price-m .plan-setup + .plan-save { margin-top: 6px; }
.price-y .plan-setup { margin-top: 4px; }

.plan-featured { position: relative; box-shadow: var(--shadow-float); }
.plan-ribbon {
  position: absolute; z-index: 1; top: -13px; left: 27px;
  padding: 4px 12px; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--purple)); color: #fff; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
}

.plan-assure {
  margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px;
  font-size: 0.92rem; color: var(--ink-3);
}
.plan-assure li { display: inline-flex; align-items: center; gap: 8px; }
.plan-assure .ico { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }

/* ==========================================================================
   SECURITY (the one dark section, as the brand's negative version)
   ========================================================================== */

.security { background: var(--ink); color: #C3CAE0; }
.security .h2, .security h3 { color: #fff; }
.security .lead { color: #AEB6D0; margin-top: 20px; }
.security :focus-visible { outline-color: #fff; }
.sec-grid { display: grid; gap: 48px; }
.sec-list { display: grid; gap: 0; }
.sec-list li {
  display: grid; grid-template-columns: 28px 1fr; gap: 18px;
  padding: 24px 0; border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.sec-list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.sec-list .ico { color: var(--pink); margin-top: 2px; }
.sec-list h3 { font-size: 1.125rem; letter-spacing: -0.01em; line-height: 1.35; }
.sec-list p { margin-top: 6px; font-size: 0.98rem; max-width: 56ch; }
@media (min-width: 960px) {
  .sec-grid { grid-template-columns: 5fr 7fr; gap: 80px; align-items: start; }
  .sec-intro { position: sticky; top: calc(var(--header-h) + 64px); }
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-grid { display: grid; gap: 40px; }
@media (min-width: 960px) {
  .faq-grid { grid-template-columns: 4fr 8fr; gap: 80px; align-items: start; }
}
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; color: var(--ink);
  letter-spacing: -0.01em; line-height: 1.35;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .ico { color: var(--blue); transition: transform .35s var(--ease-out); }
.faq-list details[open] summary .ico { transform: rotate(45deg); }
.faq-list summary:hover { color: var(--blue-ink); }
.faq-a { padding: 0 48px 24px 0; color: var(--ink-3); }
@media (prefers-reduced-motion: no-preference) {
  .faq-list details[open] .faq-a { animation: faq-in .45s var(--ease-out); }
}
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   FINAL CTA + FOOTER
   ========================================================================== */

.final { background: var(--mist); padding-block: clamp(88px, 10vw, 140px); overflow: hidden; }
.final-inner { position: relative; display: grid; gap: 28px; }
.final .h2 { font-size: clamp(2.2rem, 1.3rem + 3.2vw, 4rem); max-width: 14ch; letter-spacing: -0.035em; }
.final .lead { max-width: 46ch; }
.final-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.final-cta p { color: var(--ink-3); font-size: 0.95rem; }
.final-ecg {
  width: 180px; height: 68px; color: var(--purple);
  stroke-width: 0.7;
}
@media (min-width: 960px) {
  .final-inner { grid-template-columns: 1fr auto; align-items: end; }
  .final-ecg { position: absolute; right: var(--gutter); top: -24px; width: 260px; height: 98px; opacity: .9; }
  .final-cta { justify-content: flex-end; grid-column: 2; grid-row: 1 / span 2; align-self: end; }
  .final .h2, .final .lead { grid-column: 1; }
}

.site-footer { padding-block: 64px 32px; font-size: 0.92rem; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand img { width: 140px; }
.footer-brand p { margin-top: 12px; color: var(--ink-3); max-width: 32ch; }
.footer-h { font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.footer-col ul { display: grid; gap: 4px; }
.footer-col a, .footer-col .link-btn {
  display: inline-block; padding: 6px 0; color: var(--ink-3); text-decoration: none;
}
.footer-col a:hover { color: var(--blue-ink); text-decoration: underline; }
.footer-base {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 0.85rem; color: var(--ink-3);
}
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.3fr; }
  .footer-brand { grid-column: auto; }
}
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: #1FAF5A; color: #fff;
  box-shadow: var(--shadow-float);
  transition: transform .2s var(--ease-out);
}
.wa-float:hover { transform: scale(1.05); }
.wa-float svg { width: 28px; height: 28px; }
.wa-float[hidden] { display: none; }

/* ==========================================================================
   COOKIE CONSENT
   ========================================================================== */

.consent {
  position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px;
  max-width: 460px;
  background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px -16px rgba(2, 10, 40, 0.28);
  padding: 20px;
  font-size: 0.9rem; line-height: 1.55; color: var(--ink-2);
}
.consent[hidden] { display: none; }
.consent a { color: var(--blue-ink); }
.consent-actions { display: flex; gap: 8px; margin-top: 14px; }
.consent-actions .btn { flex: 1 1 0; padding-inline: 10px; }
@media (max-width: 520px) {
  .consent { padding: 16px; font-size: 0.86rem; left: 12px; right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .consent:not([hidden]) { animation: load-rise .6s var(--ease-out) .4s both; }
}

.consent-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0; border: 0; border-radius: 18px;
  color: var(--ink-2);
  box-shadow: 0 30px 80px -20px rgba(2, 10, 40, 0.4);
}
.consent-dialog::backdrop { background: rgba(2, 10, 40, 0.5); }
.consent-form { padding: 24px; }
.consent-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.consent-dialog h2 { font-size: 1.3rem; letter-spacing: -0.02em; }
.icon-btn {
  width: 44px; height: 44px; margin-right: -10px; display: grid; place-items: center;
  border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--ink-3);
}
.icon-btn:hover { background: var(--mist); }
.consent-intro { margin-top: 6px; font-size: 0.9rem; color: var(--ink-3); }
.consent-opt {
  display: flex; gap: 20px; align-items: flex-start; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--line-2);
  font-size: 0.88rem; color: var(--ink-3);
}
.consent-opt-h { font-weight: 600; color: var(--ink); font-size: 0.95rem; margin-bottom: 2px; }
.consent-opt:first-of-type { margin-top: 12px; border-top: 1px solid var(--line-2); }

input[role="switch"] {
  appearance: none; -webkit-appearance: none; flex: none;
  position: relative; width: 44px; height: 26px; margin: 2px 0 0;
  border-radius: 999px; background: #CBD3E3; cursor: pointer;
  transition: background-color .2s var(--ease-out);
}
input[role="switch"]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(2, 10, 40, 0.2);
  transition: transform .25s var(--ease-out);
}
input[role="switch"]:checked { background: var(--blue); }
input[role="switch"]:checked::after { transform: translateX(18px); }
input[role="switch"]:disabled { opacity: .55; cursor: not-allowed; }
.consent-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ==========================================================================
   SCROLL REVEALS
   Primary path: CSS scroll-driven animations, so the frame shown is a pure
   function of scroll position and reverses on the way up for free.
   Fallback (html.rv-fallback, set by JS when view() is unsupported): an
   IntersectionObserver toggles .in in both directions.
   Without JS and without view() support nothing is hidden.
   ========================================================================== */

@keyframes rv-in {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}
@keyframes draw-in {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
@keyframes settle-in {
  from { opacity: 0.35; transform: translateY(80px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .rv {
      animation: rv-in linear both;
      animation-timing-function: var(--ease-out);
      animation-timeline: view();
      animation-range: entry calc(4% + var(--i, 0) * 7%) entry calc(78% + var(--i, 0) * 7%);
    }
    .draw {
      animation: draw-in linear both;
      animation-timeline: view();
      animation-range: entry 20% cover 45%;
    }
    .settle {
      animation: settle-in linear both;
      animation-timing-function: var(--ease-out);
      animation-timeline: view();
      animation-range: entry 0% cover 38%;
    }
  }

  html.rv-fallback .rv,
  html.rv-fallback .settle {
    opacity: 0;
    transform: translateY(32px);
    transition:
      opacity .7s var(--ease-out) calc(var(--i, 0) * 70ms),
      transform .9s var(--ease-out) calc(var(--i, 0) * 70ms);
  }
  html.rv-fallback .settle { transform: translateY(80px) scale(0.94); transition-duration: .9s, 1.2s; }
  html.rv-fallback .rv.in,
  html.rv-fallback .settle.in { opacity: 1; transform: none; }
  html.rv-fallback .draw { clip-path: inset(0 100% 0 0); transition: clip-path 1.2s var(--ease-out) .2s; }
  html.rv-fallback .draw.in { clip-path: inset(0 0 0 0); }
}

/* ==========================================================================
   LEGAL PAGES (termos-de-uso.html, politica-de-cookies.html)
   ========================================================================== */

.legal-hero {
  padding-block: clamp(48px, 7vw, 96px) clamp(32px, 4vw, 48px);
  background: var(--mist);
  border-bottom: 1px solid var(--line);
}
.legal-hero h1 {
  font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.5rem);
  line-height: 1.06; letter-spacing: -0.035em;
}
.legal-meta { margin-top: 16px; font-size: 0.92rem; color: var(--ink-3); }
.legal-meta b { color: var(--ink-2); font-weight: 600; }

.legal-grid { display: grid; gap: 40px; padding-block: clamp(40px, 6vw, 80px) var(--section-y); }
@media (min-width: 1024px) {
  .legal-grid { grid-template-columns: 280px minmax(0, 1fr); gap: 72px; align-items: start; }
  .legal-toc { position: sticky; top: calc(var(--header-h) + 32px); max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; }
}

.legal-toc { font-size: 0.9rem; }
.legal-toc summary {
  cursor: pointer; font-weight: 600; color: var(--ink); padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 10px; list-style: none;
}
.legal-toc summary::-webkit-details-marker { display: none; }
.legal-toc ol { margin-top: 12px; display: grid; gap: 2px; counter-reset: toc; }
.legal-toc a {
  display: block; padding: 6px 10px; border-radius: 6px;
  color: var(--ink-3); text-decoration: none; line-height: 1.4;
}
.legal-toc a:hover { color: var(--ink); background: var(--mist); }
@media (min-width: 1024px) {
  .legal-toc summary { pointer-events: none; border: 0; padding: 0 10px; }
}

.legal-body { max-width: 74ch; color: var(--ink-2); font-size: 1.02rem; line-height: 1.72; }
.legal-body h2 {
  font-size: clamp(1.35rem, 1.15rem + 0.6vw, 1.6rem); letter-spacing: -0.02em; line-height: 1.25;
  margin-top: 56px; padding-top: 8px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.legal-body h2:first-of-type { margin-top: 32px; }
.legal-body h3 { font-size: 1.1rem; letter-spacing: -0.01em; margin-top: 28px; }
.legal-body p, .legal-body ul, .legal-body ol { margin-top: 14px; }
.legal-body ul, .legal-body ol.legal-alpha { padding-left: 1.4em; }
.legal-body ul { list-style: disc; }
.legal-body ol.legal-alpha { list-style: lower-alpha; }
.legal-body li { margin-top: 6px; padding-left: 4px; }
.legal-body li::marker { color: var(--ink-4); }
.legal-body a { color: var(--blue-ink); }
.legal-body strong { color: var(--ink); font-weight: 600; }
.clause-n { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 4px; }

.legal-summary {
  margin-top: 0; padding: 22px 24px; border-radius: 14px;
  background: var(--blue-tint); border: 1px solid #D5E1FD; color: var(--ink-2);
}
.legal-summary p:first-child { margin-top: 0; font-weight: 600; color: var(--ink); }
.legal-summary ul { margin-top: 10px; }

.legal-note {
  margin-top: 18px; padding: 14px 18px; border-left: 3px solid var(--purple);
  background: var(--purple-tint); border-radius: 0 10px 10px 0; font-size: 0.96rem;
}

/* Unfilled company data: impossible to miss before publishing */
.placeholder {
  background: #FFF1B8; color: #6B4E00; font-weight: 600;
  padding: 1px 6px; border-radius: 4px; border: 1px dashed #D9A600;
  font-style: normal;
}

.cookie-table { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: 0.9rem; line-height: 1.5; }
.cookie-table th, .cookie-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.cookie-table th { font-size: 0.78rem; font-weight: 600; color: var(--ink-3); background: var(--mist); }
.cookie-table td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem; color: var(--ink); overflow-wrap: anywhere; }
.cookie-table th:first-child { width: 26%; }
.cookie-table td .cookie-cat { justify-self: start; }
.cookie-cat {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.cat-ess { background: var(--green-tint); color: var(--green); }
.cat-med { background: var(--blue-tint); color: var(--blue-ink); }
.cat-pub { background: var(--purple-tint); color: var(--purple); }

@media (max-width: 760px) {
  .cookie-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cookie-table, .cookie-table tbody, .cookie-table tr, .cookie-table td { display: block; width: 100%; }
  .cookie-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 6px 0; margin-top: 12px; }
  .cookie-table td { border: 0; padding: 6px 16px; display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
  .cookie-table td::before { content: attr(data-label); font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; color: var(--ink-3); overflow-wrap: normal; }
}

.legal-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.site-footer.legal-footer { border-top: 1px solid var(--line); }
.footer-col a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   NO-SHOW CALCULATOR (inside Recursos, right after the agenda)
   ========================================================================== */

.noshow {
  display: grid;
  margin-top: clamp(56px, 7vw, 88px);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: var(--white);
}
.noshow + .feat { margin-top: clamp(88px, 11vw, 152px); }
@media (min-width: 960px) {
  .noshow { grid-template-columns: 7fr 5fr; }
}

.noshow-form { padding: clamp(24px, 4vw, 48px); }
.noshow-intro { margin-top: 12px; color: var(--ink-3); max-width: 46ch; }

.ns-field { margin-top: 28px; }
.ns-field + .ns-field { padding-top: 24px; border-top: 1px solid var(--line-2); }
.ns-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ns-row label { font-weight: 600; color: var(--ink); font-size: 1rem; line-height: 1.35; }
.ns-row label small { display: block; font-weight: 400; font-size: 0.86rem; color: var(--ink-3); }

.ns-num {
  width: 112px; min-height: 44px; flex: none;
  padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font: 600 1.05rem/1 var(--font-body); color: var(--ink);
  text-align: right; font-variant-numeric: tabular-nums;
  background: var(--white);
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
  -moz-appearance: textfield;
}
.ns-num::-webkit-outer-spin-button, .ns-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ns-num:hover { border-color: #C9D3E6; }
.ns-num:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 108, 246, 0.18); }
.ns-num[aria-invalid="true"] { border-color: #DC2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.ns-money { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 600; }

.ns-range {
  --fill: 50%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; margin: 12px 0 0; background: transparent; cursor: pointer;
  touch-action: pan-y;
}
.ns-range:focus { outline: none; }
.ns-range::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(to right, var(--blue) var(--fill), var(--line) var(--fill));
}
.ns-range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line); }
.ns-range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--blue); }
.ns-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--blue);
  box-shadow: 0 1px 4px rgba(2, 10, 40, 0.18);
  transition: transform .15s var(--ease-out);
}
.ns-range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--blue);
  box-shadow: 0 1px 4px rgba(2, 10, 40, 0.18);
}
.ns-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.ns-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(47, 108, 246, 0.25); }
.ns-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(47, 108, 246, 0.25); }
.ns-hint { margin-top: 8px; font-size: 0.86rem; color: #B91C1C; }

/* Result: the brand's negative version, so the number is the loudest thing here */
.noshow-result {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(24px, 4vw, 48px);
  background: var(--ink); color: #C3CAE0;
}
.nr-label { font-size: 0.95rem; color: #AEB6D0; }
.nr-big {
  margin-top: 6px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  font-family: var(--font-display); font-weight: 600; color: #fff;
  font-size: clamp(2.4rem, 1.6rem + 2.6vw, 3.5rem); line-height: 1.05; letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.nr-big small { font-family: var(--font-body); font-size: 1rem; font-weight: 500; letter-spacing: 0; color: #AEB6D0; }
.nr-sub { margin-top: 10px; font-size: 0.98rem; }
.nr-sub b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }

.nr-recover {
  width: 100%; margin-top: 28px; padding: 20px 0; border-block: 1px solid rgba(255, 255, 255, 0.12);
}
.nr-recover-label { font-size: 0.95rem; color: #fff; }
.nr-recover-label b { color: var(--pink); font-variant-numeric: tabular-nums; }
.ns-range-dark::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--pink) var(--fill), rgba(255, 255, 255, 0.16) var(--fill));
}
.ns-range-dark::-moz-range-track { background: rgba(255, 255, 255, 0.16); }
.ns-range-dark::-moz-range-progress { background: var(--pink); }
.ns-range-dark::-webkit-slider-thumb { border-color: var(--pink); }
.ns-range-dark::-moz-range-thumb { border-color: var(--pink); }
.nr-back { margin-top: 10px; font-size: 0.98rem; }
.nr-back b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.nr-how { margin: 24px 0 20px; font-size: 0.95rem; max-width: 40ch; }
.noshow-result .btn-primary:focus-visible { outline-color: #fff; }
.nr-note { margin-top: 16px; font-size: 0.8rem; color: #8F98B5; max-width: 42ch; }
.noshow-result :focus-visible { outline-color: #fff; }

/* Phones: the result sits below the form, so keep the headline figure in view while adjusting */
.ns-sticky { display: none; }
@media (max-width: 959px) {
  .ns-sticky {
    position: sticky; bottom: 12px; z-index: 3;
    display: flex; align-items: baseline; gap: 8px; white-space: nowrap;
    margin: 24px -8px 0; padding: 12px 16px; border-radius: 12px;
    background: var(--ink); color: #AEB6D0; font-size: 0.86rem;
    box-shadow: var(--shadow-float);
  }
  .ns-sticky b { color: #fff; font-family: var(--font-display); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
}

/* ==========================================================================
   ALIVE: colour, light and small continuous motion
   Static parts (tinted backgrounds, gradients) apply to everyone. Every
   looping animation lives inside prefers-reduced-motion: no-preference and
   reads --play, which js/main.js sets to "paused" on sections that are off
   screen, so nothing animates where nobody can see it.
   Loops never go on an element that also has .rv/.settle/.draw (those own
   the element's `animation`); they go on children or pseudo-elements.
   ========================================================================== */

@property --ang {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.is-off { --play: paused; }

/* ---------- The page is never flat white ---------- */

body { background: #FAFBFF; }

.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.aurora span {
  position: absolute; border-radius: 50%;
  width: 70vmax; height: 70vmax;
  will-change: transform;
}
.aurora span:nth-child(1) {
  left: -22vmax; top: -26vmax;
  background: radial-gradient(closest-side, rgba(47, 108, 246, 0.16), rgba(47, 108, 246, 0) 70%);
}
.aurora span:nth-child(2) {
  right: -26vmax; top: 4vmax;
  background: radial-gradient(closest-side, rgba(122, 76, 232, 0.13), rgba(122, 76, 232, 0) 70%);
}
.aurora span:nth-child(3) {
  left: 18vmax; bottom: -38vmax;
  background: radial-gradient(closest-side, rgba(231, 168, 240, 0.22), rgba(231, 168, 240, 0) 70%);
}

.site-header, .menu-mobile { background: rgba(255, 255, 255, 0.86); }
.site-header.is-scrolled { background: rgba(255, 255, 255, 0.94); }

/* The tinted bands are translucent, so the aurora still moves underneath */
.how, .plans, .final { position: relative; isolation: isolate; }
.how { background: linear-gradient(180deg, rgba(234, 240, 254, 0.78), rgba(241, 236, 253, 0.62)); }
.plans { background: linear-gradient(180deg, rgba(241, 236, 253, 0.55), rgba(234, 240, 254, 0.8)); }
.final { background: linear-gradient(160deg, rgba(234, 240, 254, 0.9), rgba(251, 230, 253, 0.6)); }

.problem { position: relative; }
.problem::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  right: 0; top: 10%; width: min(60vw, 720px); aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(122, 76, 232, 0.08), transparent);
}

.feat-visual {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(47, 108, 246, 0.10), transparent 60%),
    radial-gradient(90% 80% at 100% 100%, rgba(231, 168, 240, 0.22), transparent 60%),
    #F3F6FD;
  border: 1px solid rgba(47, 108, 246, 0.08);
}
.dash {
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(122, 76, 232, 0.08), transparent 70%),
    radial-gradient(70% 70% at 0% 100%, rgba(47, 108, 246, 0.08), transparent 70%),
    #F3F6FD;
}
.contrast-plain { background: rgba(244, 247, 252, 0.9); }

.btn-primary { background: linear-gradient(135deg, #2F6CF6, #4A5DF0 60%, #6550EC); }
.btn-primary:hover { background: linear-gradient(135deg, #1F57DA, #3B4BDA 60%, #5640D8); }

.security { position: relative; isolation: isolate; overflow: clip; }
.security::before, .security::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%;
}
.security::before {
  width: 640px; height: 640px; left: -200px; top: -160px;
  background: radial-gradient(closest-side, rgba(47, 108, 246, 0.28), transparent);
}
.security::after {
  width: 560px; height: 560px; right: -180px; bottom: -200px;
  background: radial-gradient(closest-side, rgba(231, 168, 240, 0.18), transparent);
}

.noshow-result { position: relative; isolation: isolate; overflow: hidden; }
.noshow-result::before, .noshow-result::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%;
}
.noshow-result::before {
  width: 420px; height: 420px; right: -140px; top: -160px;
  background: radial-gradient(closest-side, rgba(122, 76, 232, 0.45), transparent);
}
.noshow-result::after {
  width: 360px; height: 360px; left: -120px; bottom: -160px;
  background: radial-gradient(closest-side, rgba(47, 108, 246, 0.35), transparent);
}

/* ---------- Hero: flowing lines ---------- */

.hero-stage { position: relative; isolation: isolate; }
.hero-lines {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; pointer-events: none;
  /* the copy column stays clean; the lines live under the product visual */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 34%, #000 62%);
  mask-image: linear-gradient(90deg, transparent 0%, transparent 34%, #000 62%);
}
@media (max-width: 1023px) {
  .hero-lines {
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, transparent 55%, #000 85%);
    mask-image: linear-gradient(180deg, transparent 0%, transparent 55%, #000 85%);
  }
}
.hl-line, .hl-spark { fill: none; stroke-linecap: round; }
.hl-line { stroke: url(#hl-grad); stroke-width: 1.2; opacity: 0.32; }
.hl-line:nth-child(2) { opacity: 0.22; }
.hl-line:nth-child(4) { opacity: 0.16; }
.hl-spark {
  stroke: url(#hl-grad); stroke-width: 2.2; opacity: 0;
  filter: drop-shadow(0 0 3px rgba(122, 76, 232, 0.5));
  stroke-dasharray: 70 930;
}

.live-dot {
  display: inline-block; width: 7px; height: 7px; margin-right: 8px; vertical-align: 1px;
  border-radius: 50%; background: var(--blue);
}

.scribble { position: relative; display: inline-block; white-space: nowrap; }
.scribble-line {
  position: absolute; left: -2%; bottom: -0.12em; width: 104%; height: 0.32em;
  overflow: visible; pointer-events: none;
}
.scribble-line path {
  fill: none; stroke: var(--pink); stroke-width: 6; stroke-linecap: round;
 
}

.caret {
  display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -0.18em;
  background: var(--blue); border-radius: 1px;
}

/* ---------- Personal data in the examples is blurred ----------
   Names, e-mail and initials of the fictional patients and staff. Sized in em
   so a name in a 0.68rem agenda slot blurs as much as one in a 1rem heading. */

.pii {
  display: inline-block; max-width: 100%; vertical-align: bottom;
  filter: blur(0.3em);
  -webkit-user-select: none; user-select: none;
}

/* ---------- Heartbeat divider ---------- */

.pulse-divider {
  position: absolute; left: 0; right: 0; top: -32px; height: 64px;
  pointer-events: none; z-index: 1;
}
.pulse-divider svg { width: 100%; height: 100%; }
.pulse-divider path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pd-base { stroke: rgba(122, 76, 232, 0.22); stroke-width: 1.2; }
.pd-pulse {
  stroke: var(--purple); stroke-width: 2.2; opacity: 0;
  stroke-dasharray: 90 910;
  filter: drop-shadow(0 0 4px rgba(122, 76, 232, 0.55));
}

/* ---------- Plans: the featured card's border turns slowly ---------- */

.plan-featured { position: relative; border-color: transparent; }
.plan-featured::before {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px;
  background: conic-gradient(from var(--ang), var(--blue), var(--purple), var(--pink), var(--blue));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

/* ---------- Agenda "now" line ---------- */

.agenda-grid { position: relative; }
.ag-now {
  position: absolute; z-index: 2; left: 44px; right: 0;
  top: calc(34px + 1.6 * 64px);
  height: 2px; background: #EF4444; border-radius: 2px; pointer-events: none;
  opacity: 0.85;
}
.ag-now span {
  position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #EF4444;
}
@media (max-width: 520px) { .ag-now { left: 38px; } }

/* ==========================================================================
   The loops themselves
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {

  .aurora span:nth-child(1) { animation: drift-a 38s ease-in-out infinite alternate; }
  .aurora span:nth-child(2) { animation: drift-b 46s ease-in-out infinite alternate; }
  .aurora span:nth-child(3) { animation: drift-c 52s ease-in-out infinite alternate; }

  .hl-drift { animation: lines-sway 16s ease-in-out infinite alternate; animation-play-state: var(--play, running); }
  .hl-spark { animation: travel 7s linear infinite; animation-play-state: var(--play, running); }
  .hl-spark:nth-child(2) { animation-duration: 9s; animation-delay: -3s; }
  .hl-spark:nth-child(3) { animation-duration: 11s; animation-delay: -6s; }
  .hl-spark:nth-child(4) { animation-duration: 13s; animation-delay: -2s; }

  .live-dot { animation: ping 2.2s var(--ease-out) infinite; animation-play-state: var(--play, running); }

  .scribble-line path {
    stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: scribble-draw 1.1s var(--ease-out) 1.1s forwards, scribble-wobble 6s ease-in-out 2.4s infinite;
  }
  .caret { animation: blink 1.1s steps(1) infinite; animation-play-state: var(--play, running); }

  .btn-shine { position: relative; overflow: hidden; isolation: isolate; }
  .btn-shine::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.38) 48%, transparent 66%);
    transform: translateX(-120%);
    animation: shine 5.5s ease-in-out 2s infinite; animation-play-state: var(--play, running);
  }

  .pd-pulse { animation: travel 6s linear infinite; animation-play-state: var(--play, running); }

  /* Problem cards: a thin light runs along the top edge, one card after another */
  .prob { position: relative; overflow: hidden; }
  .prob::before {
    content: ""; position: absolute; left: 0; top: 0; width: 45%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--blue), var(--purple), transparent);
    transform: translateX(-110%);
    animation: edge-run 8s ease-in-out infinite; animation-play-state: var(--play, running);
  }
  .prob:nth-child(2)::before { animation-delay: 2s; }
  .prob:nth-child(3)::before { animation-delay: 4s; }
  .prob:nth-child(4)::before { animation-delay: 6s; }

  /* Steps: a signal keeps travelling down the heartbeat line */
  .step-line::after {
    content: ""; position: absolute; left: 0; width: 100%; height: 90px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.95), transparent);
    top: -90px;
    animation: line-signal 3.6s ease-in infinite; animation-play-state: var(--play, running);
  }
  .step-n::after {
    content: ""; position: absolute; inset: -2px; border-radius: 50%;
    border: 2px solid var(--blue); opacity: 0;
    animation: ring 3.6s var(--ease-out) infinite; animation-play-state: var(--play, running);
  }
  .step:nth-child(3) .step-n::after { animation-delay: .9s; }
  .step:nth-child(4) .step-n::after { animation-delay: 1.8s; }
  .step:nth-child(5) .step-n::after { animation-delay: 2.7s; }

  /* Contrast: the plain total keeps asking, the Prontix column keeps answering */
  .contrast-q li::before { animation: wonder 4.5s ease-in-out infinite; animation-play-state: var(--play, running); }
  .contrast-q li:nth-child(2)::before { animation-delay: 1.5s; }
  .contrast-q li:nth-child(3)::before { animation-delay: 3s; }
  .contrast-arrow .ico { animation: nudge-down 2.4s ease-in-out infinite; animation-play-state: var(--play, running); }
  .contrast-a li { position: relative; overflow: hidden; }
  .contrast-a li::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(47, 108, 246, 0.10), transparent);
    transform: translateX(-100%);
    animation: row-sweep 6s ease-in-out infinite; animation-play-state: var(--play, running);
  }
  .contrast-a li:nth-child(2)::after { animation-delay: .25s; }
  .contrast-a li:nth-child(3)::after { animation-delay: .5s; }
  .contrast-a li:nth-child(4)::after { animation-delay: .75s; }

  /* Dashboard: each procedure table is re-read now and then */
  .procs .proc-table { position: relative; }
  .procs .proc-table::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 34px; pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(47, 108, 246, 0.09), transparent);
    opacity: 0;
    animation: table-scan 7s ease-in-out infinite; animation-play-state: var(--play, running);
  }
  .procs .proc:nth-child(2) .proc-table::after { animation-delay: 1.4s; }
  .procs .proc:nth-child(3) .proc-table::after { animation-delay: 2.8s; }
  .procs .proc:nth-child(4) .proc-table::after { animation-delay: 4.2s; }
  .kpi .ui-icon { animation: bob 5s ease-in-out infinite; animation-play-state: var(--play, running); }
  .kpi:nth-child(2) .ui-icon { animation-delay: -1.2s; }
  .kpi:nth-child(3) .ui-icon { animation-delay: -2.4s; }
  .kpi:nth-child(4) .ui-icon { animation-delay: -3.6s; }

  /* Patient: the newest entry in the journey keeps a soft pulse */
  .journey li:first-child::before { animation: ping-blue 2.6s var(--ease-out) infinite; animation-play-state: var(--play, running); }

  /* Agenda: the day goes by, the WhatsApp bubble and the check-in float */
  .ag-now { animation: now-move 24s linear infinite; animation-play-state: var(--play, running); }
  .ag-now span { animation: ping-red 2s var(--ease-out) infinite; animation-play-state: var(--play, running); }
  .wa-bubble { animation: float 6s ease-in-out infinite; animation-play-state: var(--play, running); }
  .qr-chip { animation: float 7s ease-in-out -3s infinite; animation-play-state: var(--play, running); }

  /* Summary: the microphone is listening */
  .summary-head .ui-icon { position: relative; }
  .summary-head .ui-icon::before, .summary-head .ui-icon::after {
    content: ""; position: absolute; inset: 0; border-radius: 8px;
    border: 1.5px solid var(--purple); opacity: 0;
    animation: listen 2.8s var(--ease-out) infinite; animation-play-state: var(--play, running);
  }
  .summary-head .ui-icon::after { animation-delay: 1.4s; }

  /* Approval + team */
  .approval .ui-btn:not(.ui-btn-quiet) { position: relative; overflow: hidden; }
  .approval .ui-btn:not(.ui-btn-quiet)::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: shine 4.5s ease-in-out 1s infinite; animation-play-state: var(--play, running);
  }
  .approval-warn svg { animation: attention 3s ease-in-out infinite; animation-play-state: var(--play, running); }
  .ui-badge .dot { animation: dot-breathe 2.4s ease-in-out infinite; animation-play-state: var(--play, running); }
  .ui-badge-amber .dot { animation-duration: 1.4s; }

  /* Dark panels: the colour moves slowly */
  .security::before { animation: drift-b 30s ease-in-out infinite alternate; animation-play-state: var(--play, running); }
  .security::after { animation: drift-a 36s ease-in-out infinite alternate; animation-play-state: var(--play, running); }
  .noshow-result::before { animation: drift-c 22s ease-in-out infinite alternate; animation-play-state: var(--play, running); }
  .noshow-result::after { animation: drift-b 26s ease-in-out infinite alternate; animation-play-state: var(--play, running); }
  .sec-list .ico { animation: dot-breathe 4s ease-in-out infinite; animation-play-state: var(--play, running); }
  .sec-list li:nth-child(2) .ico { animation-delay: .8s; }
  .sec-list li:nth-child(3) .ico { animation-delay: 1.6s; }
  .sec-list li:nth-child(4) .ico { animation-delay: 2.4s; }
  .sec-list li:nth-child(5) .ico { animation-delay: 3.2s; }

  .plan-featured::before { animation: spin-ang 8s linear infinite; animation-play-state: var(--play, running); }

  /* Final CTA: the heartbeat keeps beating */
  .final-ecg .ecg-pulse {
    stroke: var(--pink); stroke-width: 1; stroke-dasharray: 14 86;
    animation: travel-100 2.6s linear infinite; animation-play-state: var(--play, running);
  }
}

@keyframes drift-a {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(14vmax, 8vmax) scale(1.12); }
  100% { transform: translate(4vmax, 18vmax) scale(0.94); }
}
@keyframes drift-b {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-12vmax, 14vmax) scale(0.9); }
  100% { transform: translate(-4vmax, 26vmax) scale(1.1); }
}
@keyframes drift-c {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10vmax, -12vmax) scale(1.08); }
  100% { transform: translate(-10vmax, -4vmax) scale(0.96); }
}
@keyframes lines-sway {
  from { transform: translate(-20px, 0); }
  to { transform: translate(20px, -18px); }
}
@keyframes travel {
  0% { stroke-dashoffset: 1000; opacity: 0; }
  8% { opacity: 1; }
  85% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes travel-100 {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(47, 108, 246, 0.55); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(47, 108, 246, 0); }
}
@keyframes ping-blue {
  0% { box-shadow: 0 0 0 0 rgba(47, 108, 246, 0.5); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(47, 108, 246, 0); }
}
@keyframes ping-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
}
@keyframes scribble-draw { to { stroke-dashoffset: 0; } }
@keyframes scribble-wobble {
  0%, 100% { transform: none; }
  50% { transform: translateY(1px) scaleX(0.99); }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes shine {
  0% { transform: translateX(-120%); }
  30%, 100% { transform: translateX(120%); }
}
@keyframes edge-run {
  0% { transform: translateX(-110%); }
  30%, 100% { transform: translateX(240%); }
}
@keyframes line-signal {
  from { top: -90px; }
  to { top: 100%; }
}
@keyframes ring {
  0% { transform: scale(1); opacity: 0.45; }
  40%, 100% { transform: scale(1.45); opacity: 0; }
}
@keyframes wonder {
  0%, 60%, 100% { transform: none; color: var(--ink-4); border-color: var(--ink-4); }
  15% { transform: translateY(-2px) rotate(-8deg); color: var(--purple); border-color: var(--purple); }
  30% { transform: rotate(6deg); }
}
@keyframes nudge-down {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 5px; }
}
@media (min-width: 900px) {
  @keyframes nudge-down {
    0%, 100% { translate: 0 0; }
    50% { translate: 5px 0; }
  }
}
@keyframes row-sweep {
  0% { transform: translateX(-100%); }
  25%, 100% { transform: translateX(100%); }
}
@keyframes table-scan {
  0% { top: 0; opacity: 0; }
  5% { opacity: 1; }
  30% { top: calc(100% - 34px); opacity: 1; }
  36%, 100% { top: calc(100% - 34px); opacity: 0; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes now-move {
  from { top: calc(34px + 0.1 * 64px); }
  to { top: calc(34px + 4.9 * 64px); }
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}
@keyframes listen {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.7); opacity: 0; }
}
@keyframes attention {
  0%, 80%, 100% { transform: none; }
  85% { transform: rotate(-10deg); }
  90% { transform: rotate(8deg); }
  95% { transform: rotate(-4deg); }
}
@keyframes dot-breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes spin-ang { to { --ang: 360deg; } }

/* ==========================================================================
   404 (404.html, served by nginx for any address that is not a page)
   ========================================================================== */

.nf-body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.nf-body .header-actions { margin-left: auto; }
.nf { flex: 1; display: grid; align-items: center; padding-block: clamp(48px, 9vw, 120px); }
.nf-inner { display: grid; justify-items: start; gap: 18px; }
.nf-ecg { width: min(100%, 520px); height: auto; margin-bottom: 8px; overflow: visible; }
.nf-ecg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.nf-ecg-base { stroke: rgba(122, 76, 232, 0.25); stroke-width: 2; }
.nf-ecg-pulse {
  stroke: var(--purple); stroke-width: 3; stroke-dasharray: 160 840; opacity: 0;
  filter: drop-shadow(0 0 5px rgba(122, 76, 232, 0.5));
}
.nf-code {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--purple); padding: 3px 10px; border-radius: 999px; background: var(--purple-tint);
}
.nf-title {
  font-size: clamp(2.2rem, 1.3rem + 3.2vw, 4rem); line-height: 1.05; letter-spacing: -0.035em; max-width: 16ch;
}
.nf-lead { max-width: 46ch; }
.nf-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.nf-hint { font-size: 0.92rem; color: var(--ink-3); }
.nf-hint a, .nf-footer a { color: var(--blue-ink); }
.nf-footer { padding-block: 24px 32px; font-size: 0.85rem; color: var(--ink-3); border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: no-preference) {
  .nf-ecg-pulse { animation: travel 3.2s linear infinite; }
  .nf-inner > :not(.nf-ecg) { animation: load-rise .8s var(--ease-out) both; }
  .nf-title { animation-delay: .08s; }
  .nf-lead { animation-delay: .16s; }
  .nf-cta { animation-delay: .24s; }
  .nf-hint { animation-delay: .3s; }
}
