/* =========================================================================
   Eleven — Editorial / Cinematic landing page
   ========================================================================= */

/* a11y: visually-hidden helper for screen-reader-only text */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

:root {
  /* Surfaces */
  --bone: #F4EFE6;          /* warm primary surface */
  --bone-2: #EBE4D5;        /* slightly deeper bone */
  --paper: #FBF8F2;         /* lightest cream */
  --ink: #0E1418;           /* near-black, warm */
  --ink-2: #1A2129;
  --ink-soft: #2A323B;
  --rule: #DCD3C0;          /* hairline on bone */
  --rule-strong: #C9BFA8;

  /* Ink-on-light text */
  --text: #161B20;
  --muted: #6B6357;
  --muted-2: #8B8270;

  /* Inverse */
  --on-ink: #F4EFE6;
  --on-ink-muted: #A4A599;
  --on-ink-rule: rgba(255, 252, 245, 0.10);

  /* Brand accent */
  --accent: #0FBA81;
  --accent-bright: #2DDFA4;
  --accent-deep: #0A8E64;
  --accent-soft: rgba(15, 186, 129, 0.10);
  --accent-glow: rgba(45, 223, 164, 0.35);

  --warn: #E8643C;
  --warn-soft: #F4D6C9;

  /* Typography stacks (driven by tweaks) */
  --font-display: 'Plus Jakarta Sans', 'Inter Display', system-ui, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Newsreader', 'Source Serif 4', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --max-w: 1200px;
  --gutter: 32px;

  font-feature-settings: 'cv11', 'ss01', 'liga';
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { background: var(--bone); }
body {
  font-family: var(--font-sans);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--on-ink); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }

/* ==================== Layout primitives ==================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-wide { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }

section { padding: 120px 0; position: relative; }
section.tight { padding: 80px 0; }
section.ink {
  background: var(--ink);
  color: var(--on-ink);
}
section.ink h1, section.ink h2, section.ink h3 { color: var(--on-ink); }

/* ==================== Type ==================== */
h1, h2, h3, h4 { color: var(--ink); margin: 0; letter-spacing: -0.02em; line-height: 1; }
h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5.2vw, 72px);
  letter-spacing: -0.04em;
  line-height: 0.96;
}
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 52px);
  letter-spacing: -0.03em;
  line-height: 1.0;
}
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 1.6vw, 22px);
  letter-spacing: -0.02em;
}
.serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: '';
  width: 22px; height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.ink .kicker { color: var(--on-ink-muted); }
.kicker.accent { color: var(--accent-deep); }
.ink .kicker.accent { color: var(--accent-bright); }

.lede {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 640px;
}
section.ink .lede { color: var(--on-ink-muted); }

p { margin: 0; }
.tabular { font-variant-numeric: tabular-nums; }

/* ==================== Reveal on scroll ==================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.22,.61,.36,1), transform .9s cubic-bezier(.22,.61,.36,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 80ms; }
.reveal.delay-2 { transition-delay: 160ms; }
.reveal.delay-3 { transition-delay: 240ms; }

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .18s cubic-bezier(.22,.61,.36,1),
              box-shadow .25s ease,
              background .2s ease,
              color .2s ease,
              border-color .2s ease;
  white-space: nowrap;
  position: relative;
}
.btn-primary {
  background: var(--ink);
  color: var(--on-ink);
  padding-right: 8px;
}
.btn-primary .arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  display: grid; place-items: center;
  transition: transform .25s cubic-bezier(.22,.61,.36,1);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(14, 20, 24, 0.45); }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 14px 0;
  border-radius: 0;
  border-bottom: 1.5px solid var(--ink);
  gap: 10px;
}
.btn-ghost:hover { color: var(--accent-deep); border-color: var(--accent-deep); }

.ink .btn-primary { background: var(--on-ink); color: var(--ink); }
.ink .btn-primary .arrow { background: var(--accent); color: var(--ink); }
.ink .btn-ghost { color: var(--on-ink); border-color: var(--on-ink); }
.ink .btn-ghost:hover { color: var(--accent-bright); border-color: var(--accent-bright); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ==================== NAV ==================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding: 18px 0;
  background: rgba(244, 239, 230, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  transition: padding .2s ease, background .2s ease, border-color .2s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 12px 0;
  border-color: var(--rule);
}
.nav-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.nav-brand {
  display: flex; align-items: center;
}
.nav-logo {
  height: 38px;
  width: auto;
  display: block;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  position: relative;
}
.nav-links a:hover { color: var(--accent-deep); }
.nav-cta-row { display: flex; align-items: center; gap: 16px; }
.nav-login { font-size: 14px; font-weight: 500; color: var(--muted); }
.nav-login:hover { color: var(--ink); }
.nav .btn { padding: 10px 8px 10px 18px; font-size: 14px; }
.nav .btn .arrow { width: 26px; height: 26px; }

@media (max-width: 920px) { .nav-links { display: none; } }

/* ==================== HERO ==================== */
.hero {
  padding: 56px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero-marker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 10px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 13px; color: var(--ink-soft);
  margin-bottom: 36px;
}
.hero-marker .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  position: relative;
}
.hero-marker .pulse::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulse 2.4s ease-out infinite;
  opacity: 0;
}
@keyframes pulse {
  0% { transform: scale(.8); opacity: .9; }
  100% { transform: scale(2.0); opacity: 0; }
}

.hero-headline {
  margin-bottom: 28px;
}
.hero-headline .row { display: block; }
.hero-headline .accent-strike {
  display: inline;
  white-space: nowrap;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 104% 0.18em;
  background-position: -2% 88%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: stroke 1.1s cubic-bezier(.7,.0,.3,1) .6s both;
}
@keyframes stroke {
  from { background-size: 0% 0.18em; }
  to   { background-size: 104% 0.18em; }
}
.hero-headline em.serif {
  color: var(--ink);
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.hero-below {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-sub {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 460px;
  margin-bottom: 28px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Hero visual stack */
.hero-stage {
  margin-top: 80px;
  position: relative;
}
.hero-stage::before {
  /* subtle radial glow under laptop — kept inside the hero, no bleed */
  content: '';
  position: absolute;
  left: 50%; bottom: 4%; transform: translateX(-50%);
  width: 70%; height: 44%;
  background: radial-gradient(60% 60% at 50% 50%, var(--accent-soft), transparent 70%);
  filter: blur(20px);
  z-index: 0;
}
.hero-stage-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 2.2fr 1fr;
  gap: 24px;
  align-items: end;
}

.hero-aside-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 22px;
  font-size: 13px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 12px 30px -18px rgba(0,0,0,0.18);
}
.hero-aside-card .head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.hero-aside-card .num {
  font-family: var(--font-display);
  font-size: 38px; font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.hero-aside-card .num .currency { font-size: 18px; color: var(--muted); margin-right: 4px; vertical-align: 0.45em; }
.hero-aside-card .num .delta {
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--accent-deep);
  font-weight: 600;
  margin-left: 6px;
  letter-spacing: -0.005em;
}
.hero-aside-card .desc { color: var(--muted); line-height: 1.5; }
.hero-aside-card.b { transform: translateY(-40px); }

@media (max-width: 1080px) {
  .hero-stage-inner { grid-template-columns: 1fr; }
  .hero-aside-card.b { transform: none; }
}
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .hero-below { grid-template-columns: 1fr; gap: 20px; }
  .hero-cta { justify-content: flex-start !important; }
}

/* ==================== Laptop frame ==================== */
.laptop {
  position: relative;
  max-width: 100%;
  border-radius: 18px 18px 6px 6px;
  background: linear-gradient(180deg, #2D343C, #161B20);
  padding: 16px 16px 0;
  box-shadow:
    0 36px 80px -28px rgba(0,0,0,0.40),
    0 12px 30px -10px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.laptop::after {
  content: '';
  position: absolute;
  bottom: -10px; left: -3.5%; right: -3.5%;
  height: 10px;
  background: linear-gradient(180deg, #161B20, #0B0F12);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.18);
}
.laptop .cam {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: #0B0F12;
  border: 1px solid rgba(255,255,255,0.12);
}
.laptop .screen {
  background: #FFFFFF;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  position: relative;
  border: 1px solid rgba(255,255,255,0.08);
}

/* ==================== Dashboard mock ==================== */
.dash {
  height: 100%;
  display: grid;
  grid-template-columns: 188px 1fr;
  font-size: 11px;
  background: var(--paper);
}
.dash-side {
  background: #fff;
  border-right: 1px solid var(--rule);
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.dash-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 6px 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.dash-brand .logo {
  width: 26px; height: 26px; border-radius: 6px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.05em;
  transition: background .35s ease, color .35s ease;
}
.dash-brand .name {
  font-weight: 600; color: var(--ink); font-size: 13px;
  letter-spacing: -0.01em;
  transition: color .25s ease;
}
.dash-brand .small { font-size: 9px; color: var(--muted); font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }

.dash-section-label {
  padding: 12px 6px 4px;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 500; color: var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.dash-nav {
  padding: 6px 8px;
  display: flex; align-items: center; gap: 8px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 500;
  color: var(--ink-soft);
}
.dash-nav .ico { width: 13px; height: 13px; color: var(--muted); }
.dash-nav.active { background: var(--bone); color: var(--ink); }
.dash-nav.active .ico { color: var(--accent-deep); }
.dash-nav .badge {
  margin-left: auto;
  padding: 1px 6px; border-radius: 999px;
  background: var(--accent); color: #0E1418;
  font-family: var(--font-mono);
  font-size: 8px; font-weight: 600;
  letter-spacing: 0.04em;
}

.dash-main { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dash-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.dash-switch {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 10.5px;
  color: var(--ink);
  font-weight: 500;
}
.dash-switch .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dash-switch .count { color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.dash-actions { display: flex; gap: 6px; }
.dash-iconbtn {
  width: 24px; height: 24px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
  display: grid; place-items: center;
  color: var(--muted);
}
.dash-iconbtn.solid { background: var(--ink); color: var(--accent); border-color: var(--ink); }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
  overflow: hidden;
}
.kpi .label { font-family: var(--font-mono); font-size: 9px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.kpi .val { font-family: var(--font-display); font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.025em; font-weight: 600; }
.kpi .delta { font-size: 10px; font-weight: 500; color: var(--accent-deep); display: inline-flex; align-items: center; gap: 2px; }
.kpi .delta.down { color: var(--warn); }
.kpi.hi { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.kpi.hi .label { color: var(--on-ink-muted); }
.kpi.hi .val { color: var(--accent-bright); }

.chart-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.chart-head { display: flex; justify-content: space-between; align-items: center; }
.chart-title { font-size: 11px; font-weight: 600; color: var(--ink); }
.chart-legend { display: flex; gap: 12px; font-size: 9.5px; color: var(--muted); font-family: var(--font-mono); letter-spacing: 0.04em; }
.chart-legend .swatch { display: inline-block; width: 12px; height: 2px; vertical-align: middle; margin-right: 5px; border-radius: 1px; }
.chart-svg { width: 100%; height: 88px; display: block; }

.list-card { background: #fff; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.list-card .row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 80px;
  gap: 10px;
  padding: 8px 12px;
  font-size: 10.5px;
  align-items: center;
  border-bottom: 1px solid var(--rule);
}
.list-card .row:last-child { border-bottom: none; }
.list-card .row.head {
  background: var(--bone);
  font-family: var(--font-mono);
  font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 8.5px;
}
.list-card .pill {
  display: inline-block;
  font-size: 8.5px; font-weight: 600;
  padding: 2px 7px; border-radius: 999px;
  letter-spacing: 0.02em;
  margin-right: 6px;
}
.list-card .pill.paid { background: var(--accent-soft); color: var(--accent-deep); }
.list-card .pill.due { background: #FCEAB6; color: #92590F; }
.list-card .pill.late { background: var(--warn-soft); color: #A53A12; }
.list-card .amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }

/* ==================== TICKER / MARQUEE ==================== */
.ticker-band {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 24px 0;
  background: var(--bone);
  overflow: hidden;
  position: relative;
}
.ticker {
  display: flex;
  width: max-content;
  gap: 56px;
  animation: marquee 38s linear infinite;
  align-items: center;
}
.ticker.paused { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 14px; color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ticker-item .label { color: var(--ink); font-weight: 500; }
.ticker-item .accent-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.ticker-fade-l, .ticker-fade-r {
  position: absolute; top: 0; bottom: 0; width: 80px; pointer-events: none; z-index: 2;
}
.ticker-fade-l { left: 0; background: linear-gradient(90deg, var(--bone), transparent); }
.ticker-fade-r { right: 0; background: linear-gradient(-90deg, var(--bone), transparent); }

/* ==================== PROBLEMA ==================== */
.problema-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-top: 64px;
}
.problema-item {
  grid-column: span 4;
  border-top: 1px solid var(--rule-strong);
  padding-top: 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.problema-item .num {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.1em;
}
.problema-item .stat {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.2vw, 72px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.045em;
  line-height: 0.95;
}
.problema-item .stat .strike {
  position: relative;
  display: inline-block;
}
.problema-item .stat .strike::after {
  content: '';
  position: absolute;
  left: -2%; right: -2%; top: 50%;
  height: 4px;
  background: var(--warn);
  transform: rotate(-4deg);
}
.problema-item .stat-cap {
  font-family: var(--font-sans);
  font-size: 16px; color: var(--muted); font-weight: 500;
  margin-top: -8px; line-height: 1.4;
}
.problema-item .stat em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink);
}
.problema-item p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 320px;
}

@media (max-width: 880px) { .problema-item { grid-column: span 12; } }

/* ==================== INVERSION (the big idea) ==================== */
.inversion {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: stretch;
  margin-top: 56px;
}
.inv-panel {
  border-radius: 24px;
  padding: 36px 32px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
  min-height: 280px;
}
.inv-old {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(244, 239, 230, 0.7);
}
.inv-old .tag { color: var(--warn); }
.inv-old .formula { color: rgba(244, 239, 230, 0.6); }
.inv-old .strike { text-decoration: line-through; text-decoration-thickness: 2px; }
.inv-new {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--accent-bright);
}
.inv-new .tag { color: var(--ink); opacity: 0.65; }
.inv-panel .tag {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 500;
}
.inv-panel .title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 2.8vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: inherit;
}
.inv-panel .formula {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 8px;
}
.inv-panel .formula strong { font-weight: 600; }
.inv-arrow {
  align-self: center;
  display: grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--on-ink);
  color: var(--ink);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.04);
}
@media (max-width: 880px) {
  .inversion { grid-template-columns: 1fr; justify-items: center; }
  .inv-panel { width: 100%; }
  .inv-arrow {
    transform: rotate(90deg);
    justify-self: center;
    margin: 0 auto;
  }
}

/* ==================== SCROLLY (Como funciona) ==================== */
.scrolly {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-top: 64px;
}
.scrolly-steps { display: flex; flex-direction: column; gap: 24px; }
.scrolly-step {
  border-top: 1px solid var(--rule);
  padding: 32px 0 36px;
  display: flex; flex-direction: column; gap: 14px;
  transition: opacity .35s ease, transform .35s ease, color .35s ease;
  /* Use opacity 1 + explicit darker muted to preserve AA contrast on inactive
     copy. Opacity-based dimming dropped contrast below 4.5:1 on the bone
     surface. Inactive copy stays at --muted (#6B6357) which hits 6.45:1. */
  opacity: 1;
}
.scrolly-step.active { opacity: 1; }
/* Inactive scrolly step copy: muted but still AA on --bone. */
.scrolly-step:not(.active) .num-row { color: var(--muted); }
.scrolly-step:not(.active) h3 { color: #3F3A33; }
.scrolly-step:not(.active) p { color: var(--muted); }
.scrolly-step .num-row {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
.scrolly-step .num-row .badge {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  background: var(--paper);
  transition: background .25s, color .25s, border-color .25s;
}
.scrolly-step.active .num-row .badge {
  background: #0E1418; color: #F4EFE6; border-color: #0E1418;
  font-weight: 700;
}
.scrolly-step h3 {
  font-size: clamp(28px, 2.6vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.06;
  color: var(--ink);
}
.scrolly-step p { color: var(--muted); max-width: 460px; font-size: 17px; }

.scrolly-stage {
  position: sticky;
  top: 96px;
  border-radius: 20px;
  background: var(--ink);
  color: var(--on-ink);
  padding: 24px;
  min-height: 480px;
  display: flex; flex-direction: column; gap: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px -28px rgba(0,0,0,0.45);
}
.scrolly-stage::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 80% 0%, var(--accent-glow), transparent 60%);
  opacity: .55;
  pointer-events: none;
}
.stage-frame {
  position: relative;
  z-index: 1;
  flex: 1;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 18px;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
}
.stage-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--on-ink-muted); letter-spacing: 0.06em;
}
.stage-meta .step-pill {
  background: var(--accent); color: var(--ink);
  padding: 4px 10px; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.04em;
}

.stage-form {
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.16);
  border-radius: 12px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  font-size: 13px;
  color: var(--on-ink-muted);
}
.stage-form .field { display: flex; flex-direction: column; gap: 6px; }
.stage-form .field label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-ink-muted); }
.stage-form .field .value {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--on-ink);
  font-size: 14px;
}
.stage-form .field .value.cursor::after {
  content: '';
  display: inline-block;
  width: 1px; height: 13px;
  background: var(--accent);
  vertical-align: -2px;
  margin-left: 2px;
  animation: caret 1s steps(2) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.stage-clients-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.stage-client {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  padding: 10px 12px;
}
.stage-client .av {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600; color: #fff;
  letter-spacing: -0.04em;
}
.stage-client .name { font-size: 13px; color: var(--on-ink); font-weight: 500; }
.stage-client .meta { font-size: 11px; color: var(--on-ink-muted); font-family: var(--font-mono); }
.stage-client .check {
  margin-left: auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  display: grid; place-items: center;
}

.stage-invoice {
  background: var(--on-ink); color: var(--ink);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.stage-invoice .title { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.stage-invoice .total {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 600; letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stage-invoice .total .currency { font-size: 16px; color: var(--muted); margin-right: 4px; vertical-align: 0.4em; }
.stage-invoice .lines { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.stage-invoice .lines .line { display: flex; justify-content: space-between; }
.stage-invoice .lines .line .a { color: var(--ink); }
.stage-invoice .margin-band {
  background: var(--accent); color: var(--ink);
  padding: 8px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}

@media (max-width: 980px) {
  .scrolly { grid-template-columns: 1fr; gap: 32px; }
  .scrolly-stage { position: static; min-height: 380px; }
}

/* ==================== WHITE-LABEL PLAYGROUND ==================== */
.wl-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
  margin-top: 48px;
}
.wl-presets {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 28px 0 16px;
}
.wl-preset {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-soft);
  transition: all .18s ease;
}
.wl-preset:hover { border-color: var(--rule-strong); }
.wl-preset.active {
  background: var(--ink); color: var(--on-ink); border-color: var(--ink);
}
.wl-preset .swatch {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-family: var(--font-display);
  font-weight: 700; font-size: 12px;
  letter-spacing: -0.04em;
}
.wl-note {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.04em;
}
.wl-stage-wrap { position: relative; }
.wl-stage-wrap .laptop { transition: box-shadow .35s ease; }
.wl-callout {
  position: absolute;
  top: -16px; right: -16px;
  background: var(--ink); color: var(--on-ink);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 16px 32px -16px rgba(0,0,0,0.35);
}
.wl-callout .accent-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

@media (max-width: 980px) { .wl-grid { grid-template-columns: 1fr; } }

/* ==================== MODULES BENTO ==================== */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 16px;
  margin-top: 56px;
}
.bento-cell {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .25s ease, border-color .2s, background .2s;
  position: relative;
  overflow: hidden;
}
.bento-cell:hover { transform: translateY(-3px); border-color: var(--rule-strong); }
.bento-cell .ico {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--bone);
  border-radius: 10px;
  color: var(--ink);
}
.bento-cell h3 { font-size: 18px; letter-spacing: -0.02em; }
.bento-cell p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.bento-cell.span-2 { grid-column: span 2; }
.bento-cell.span-3 { grid-column: span 3; }
.bento-cell.span-4 { grid-column: span 4; }
.bento-open-finance {
  background: linear-gradient(135deg, rgba(15,186,129,0.08) 0%, rgba(15,186,129,0.03) 100%);
  border-color: rgba(15,186,129,0.30);
}
.bento-open-finance .ico { background: rgba(15,186,129,0.12); color: var(--accent-deep); }
.bento-open-finance h3 { color: var(--accent-deep); }
.bento-open-finance .mini-pill { background: rgba(15,186,129,0.10); border-color: rgba(15,186,129,0.25); color: var(--accent-deep); }
.bento-cell.row-2 { grid-row: span 2; }

.bento-hero {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.bento-hero h3 { color: var(--on-ink); font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -0.025em; }
.bento-hero p { color: var(--on-ink-muted); }
.bento-hero .ico { background: rgba(255,255,255,0.06); color: var(--accent-bright); }
.bento-hero::after {
  content: '';
  position: absolute; right: -50px; bottom: -40px;
  width: 220px; height: 220px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.bento-hero .pill-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.bento-hero .mini-pill {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--on-ink-muted);
}
.bento-cell:not(.bento-hero) .pill-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bento-cell:not(.bento-hero) .mini-pill {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--bone);
  border: 1px solid var(--rule);
  color: var(--muted);
}

@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-cell.span-2, .bento-cell.span-3, .bento-cell.span-4 { grid-column: span 2; }
  .bento-cell.row-2 { grid-row: auto; }
  .bento-open-finance { grid-column: span 2; }
}

/* ==================== PLANOS ==================== */
.planos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 48px;
}
.plano {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 32px 28px;
  display: flex; flex-direction: column;
  gap: 18px;
  position: relative;
  transition: transform .25s ease, border-color .2s, box-shadow .2s;
}
.plano:hover { transform: translateY(-3px); border-color: var(--rule-strong); }
.plano.featured {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
  box-shadow: 0 32px 80px -28px rgba(0,0,0,0.40);
}
.plano.featured h3 { color: var(--on-ink); }
.plano.featured p { color: var(--on-ink-muted); }
.plano.featured .price { color: var(--accent-bright); }
.plano.featured .price-suffix { color: var(--on-ink-muted); }
.plano.featured ul li { color: var(--on-ink); }
.plano.featured ul li .check { background: var(--accent); color: var(--ink); }
.plano.featured .launch-badge {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
  color: var(--on-ink-muted);
}
.plano.featured .launch-badge strong { color: var(--accent-bright); }

.plano .badge {
  position: absolute;
  top: -12px; left: 28px;
  background: var(--accent); color: var(--ink);
  padding: 5px 12px; border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.plano h3 { font-size: 24px; letter-spacing: -0.025em; }
.plano .price-row { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.plano .price {
  font-family: var(--font-display);
  font-size: 56px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.045em;
  line-height: 1;
}
.plano .price .currency { font-size: 22px; color: var(--muted); margin-right: 4px; vertical-align: 0.4em; font-weight: 500; }
.plano .price .cents { font-size: 22px; vertical-align: 0.4em; color: var(--muted); margin-left: 1px; }
.plano .price.promo { color: var(--accent-deep); }
.plano .price.promo .currency, .plano .price.promo .cents { color: var(--accent-deep); opacity: 0.75; }
.plano .price-suffix { color: var(--muted); font-size: 14px; }
.plano .desc { color: var(--muted); font-size: 14px; line-height: 1.5; }

.launch-badge {
  background: var(--accent-soft);
  border: 1px solid rgba(15, 186, 129, 0.18);
  color: var(--accent-deep);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  display: flex; align-items: center; gap: 8px;
  line-height: 1.4;
  font-weight: 500;
}
.launch-badge strong { color: var(--accent-deep); font-weight: 700; }

.plano ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.plano ul li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; color: var(--text);
  line-height: 1.5;
}
.plano ul li .check {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: grid; place-items: center;
  margin-top: 2px;
}
/* plano card is now an <a> — reset link styles */
a.plano { text-decoration: none; color: inherit; cursor: pointer; }
a.plano:hover { box-shadow: 0 12px 40px -16px rgba(0,0,0,0.18); }
.plano-cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--accent-deep);
}
.featured-cta { color: var(--accent-bright); }

.planos-foot {
  margin-top: 32px;
  text-align: center;
  font-size: 14px; color: var(--muted);
  display: flex; align-items: center; gap: 10px; justify-content: center;
}
.planos-foot strong { color: var(--ink); font-weight: 600; }

.planos-addons {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.addons-col {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 24px 28px;
}
.addons-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}
.addons-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.addons-col ul li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
}
.addons-col ul li:last-child { border-bottom: none; padding-bottom: 0; }
.addons-col ul li span:last-child { font-family: var(--font-mono); font-size: 13px; color: var(--ink); white-space: nowrap; }

.planos-footnote {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.planos-footnote a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 880px) {
  .planos-grid { grid-template-columns: 1fr; }
  .plano .badge { left: 50%; transform: translateX(-50%); }
}
@media (max-width: 640px) { .planos-addons { grid-template-columns: 1fr; } }

/* ==================== COMPARATIVO ==================== */
.compare-card {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 24px;
  padding: 40px;
  margin-top: 48px;
  overflow: hidden;
  position: relative;
}
.compare-card::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 240px; height: 240px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.compare {
  width: 100%;
  border-collapse: collapse;
  position: relative; z-index: 1;
}
.compare th, .compare td {
  padding: 20px 24px;
  text-align: left;
  border-bottom: 1px solid var(--on-ink-rule);
  font-size: 15px;
}
.compare th:not(:first-child), .compare td:not(:first-child) { text-align: center; }
.compare tbody th[scope="row"] { text-align: left; color: var(--on-ink); font-weight: 500; width: 38%; font-family: inherit; font-size: inherit; }
.compare thead th {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--on-ink-muted);
  padding-top: 16px; padding-bottom: 16px;
  vertical-align: middle;
}
.compare thead th.us {
  color: #1A3D2E; background: var(--accent);
  border-radius: 12px 12px 0 0;
  font-weight: 700;
  vertical-align: middle;
}
.compare tbody td.us { background: rgba(15, 186, 129, 0.08); border-color: rgba(15, 186, 129, 0.2); color: var(--on-ink); font-weight: 500; }
.compare tbody td:first-child { color: var(--on-ink); font-weight: 500; width: 38%; }
.compare tbody tr:last-child td { border-bottom: none; }
.compare tbody tr:last-child td.us { border-radius: 0 0 12px 12px; }
.compare .free-pill {
  display: inline-block;
  background: var(--accent); color: var(--ink);
  padding: 4px 12px; border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em;
}
.compare .price-cell {
  font-family: var(--font-mono);
  color: var(--on-ink-muted);
  font-size: 13px;
}
.compare .check { color: var(--accent-bright); }
.compare .cross { color: var(--on-ink-muted); opacity: .5; }
.compare .partial { color: #F4C572; font-family: var(--font-mono); font-size: 13px; }
.compare-footnote {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.04em;
}
.compare-scroll { width: 100%; }

@media (max-width: 720px) {
  .compare-card { padding: 24px; }
  .compare th, .compare td { padding: 12px 12px; font-size: 13px; }
}

/* ==================== FORM (final CTA) ==================== */
.cta-final {
  background: var(--ink);
  color: var(--on-ink);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-final::before {
  content: '';
  position: absolute;
  top: -20%; left: 50%; transform: translateX(-50%);
  width: 80%; height: 100%;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 65%);
  pointer-events: none;
}
.cta-final h2 { color: var(--on-ink); }
.cta-final-inner {
  position: relative; z-index: 1;
  max-width: 640px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.cta-trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 20px;
  margin: 28px 0 36px;
  font-size: 14px; color: var(--on-ink-muted);
}
.btn-accent {
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  padding-right: 8px;
}
.btn-accent .arrow {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: var(--on-ink);
  display: grid; place-items: center;
  transition: transform .25s cubic-bezier(.22,.61,.36,1);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -12px var(--accent-glow); }
.btn-accent:hover .arrow { transform: translateX(4px); }
.cta-copy p { color: var(--on-ink-muted); font-size: 18px; line-height: 1.55; margin-top: 18px; max-width: 480px; }
.cta-copy ul {
  list-style: none; padding: 0; margin: 32px 0 0;
  display: flex; flex-direction: column; gap: 14px;
}
.cta-copy ul li {
  display: flex; gap: 12px; align-items: center;
  font-size: 16px; color: var(--on-ink);
}
.cta-copy ul li .check {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--ink);
  display: grid; place-items: center;
  flex-shrink: 0;
}

.form-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  padding: 36px;
  backdrop-filter: blur(12px);
}
.form-card h3 { color: var(--on-ink); font-size: 22px; margin-bottom: 22px; letter-spacing: -0.02em; }
.form-card .field { margin-bottom: 18px; }
.form-card label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--on-ink-muted);
  margin-bottom: 8px;
}
.form-card input, .form-card select {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
  color: var(--on-ink);
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.form-card input::placeholder { color: rgba(255,255,255,0.32); }
.form-card input:focus, .form-card select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
}
.form-card .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-card .btn-primary {
  width: 100%; justify-content: center; padding: 14px 8px 14px 22px;
  background: var(--on-ink); color: var(--ink);
  margin-top: 8px;
}
.form-card .btn-primary .arrow { background: var(--accent); }
.legal {
  font-size: 12px; color: rgba(255,255,255,0.45);
  margin-top: 14px; text-align: center;
  font-family: var(--font-mono); letter-spacing: 0.04em;
}
.form-success {
  text-align: center;
  padding: 16px 8px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.form-success .check-circle {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--accent); color: var(--ink);
  display: grid; place-items: center;
  box-shadow: 0 0 0 8px var(--accent-soft);
}
.form-success h3 { color: var(--on-ink); font-size: 24px; margin-bottom: 0; }
.form-success p { color: var(--on-ink-muted); }

@media (max-width: 980px) {
  .cta-final-grid { grid-template-columns: 1fr; gap: 36px; }
  .form-card .row { grid-template-columns: 1fr; }
}

/* ==================== FAQ ==================== */
.faq {
  border-top: 1px solid var(--rule-strong);
  margin-top: 48px;
}
.faq-item {
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.faq-trigger {
  width: 100%;
  padding: 28px 8px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  transition: color .15s;
}
.faq-trigger:hover { color: var(--accent-deep); }
.faq-trigger .toggle {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--rule-strong);
  display: grid; place-items: center;
  color: var(--ink);
  transition: transform .3s cubic-bezier(.7,0,.3,1), background .2s, color .2s, border-color .2s;
}
.faq-item.open .toggle {
  background: var(--ink);
  color: var(--accent);
  border-color: var(--ink);
  transform: rotate(45deg);
}
.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s cubic-bezier(.22,.61,.36,1);
}
.faq-item.open .faq-content { grid-template-rows: 1fr; }
.faq-content > div { overflow: hidden; }
.faq-content p {
  padding: 0 8px 28px;
  color: var(--muted);
  font-size: 17px; line-height: 1.6;
  max-width: 760px;
}

/* ==================== FAQ STATIC LIST ==================== */
.faq-list {
  margin-top: 48px;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule-strong);
}
.faq-static-item {
  padding: 28px 8px;
  border-bottom: 1px solid var(--rule);
}
.faq-q {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.faq-a {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 760px;
  margin: 0;
}

/* ==================== FOOTER ==================== */
.footer {
  background: var(--ink);
  color: var(--on-ink-muted);
  padding: 80px 0 40px;
  font-size: 14px;
  position: relative;
  overflow: hidden;
}
.footer-glyph {
  position: absolute;
  right: -40px; bottom: -160px;
  font-family: var(--font-display);
  font-size: 480px;
  font-weight: 600;
  letter-spacing: -0.06em;
  color: rgba(255,255,255,0.03);
  line-height: 0.8;
  pointer-events: none;
}
.footer-inner { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 1; }
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--on-ink-rule);
}
.footer-brand {
  margin-bottom: 12px;
}
.footer-logo {
  height: 44px; width: auto; display: block;
  opacity: 0.9;
}
.footer-tag { color: var(--on-ink-muted); max-width: 320px; line-height: 1.5; }
.footer-col h3, .footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--on-ink); margin-bottom: 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--on-ink-muted); transition: color .15s; }
.footer-col a:hover { color: var(--on-ink); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px;
  flex-wrap: wrap; gap: 16px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.04em; color: var(--muted-2);
}
.footer-bottom .links { display: flex; gap: 24px; }
@media (max-width: 880px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-glyph { font-size: 280px; bottom: -100px; }
}

/* ==================== Brand logos (typographic, original) ==================== */
.logo-asaas { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.025em; color: var(--ink); font-size: 16px; }
.logo-asaas .dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, #1AC6E6, #0094D4); }
.logo-focus { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); font-size: 16px; }
.logo-focus .square { width: 14px; height: 14px; background: var(--ink); display: grid; place-items: center; color: #FFD600; font-size: 9px; font-weight: 800; border-radius: 2px; }

/* ==================== Anchor offsets ==================== */
section[id] { scroll-margin-top: 100px; }

/* ==================== DEMO FORM section ==================== */
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: start;
  position: relative;
  z-index: 1;
}
.demo-form-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  padding: 36px;
  backdrop-filter: blur(12px);
}
.demo-form-card .field { margin-bottom: 18px; }
.demo-form-card label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--on-ink-muted);
  margin-bottom: 8px;
}
.demo-form-card input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
  color: var(--on-ink);
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.demo-form-card input::placeholder { color: rgba(255,255,255,0.32); }
.demo-form-card input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
}
.demo-form-card .btn-primary {
  width: 100%; justify-content: center; padding: 14px 8px 14px 22px;
  background: var(--on-ink); color: var(--ink);
  margin-top: 8px;
}
.demo-form-card .btn-primary .arrow { background: var(--accent); }

/* ==================== Ticker count ==================== */
.ticker-band { position: relative; }
.ticker-count {
  position: absolute; top: 8px; right: var(--gutter);
  font-family: var(--font-mono);
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.ticker-count .tabular { color: var(--ink); font-weight: 600; }

/* ==================== TABLET ≤980px ==================== */
@media (max-width: 980px) {
  :root { --gutter: 28px; }

  /* Demo (DemoForm) → single column above mobile */
  .demo-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ==================== TABLET ≤880px ==================== */
@media (max-width: 880px) {
  section { padding: 88px 0; }
  section.tight { padding: 64px 0; }

  /* Headings (clamp upper bound trimmed) */
  h1 { font-size: clamp(40px, 7vw, 64px); line-height: 0.96; }
  h2 { font-size: clamp(32px, 6vw, 52px); line-height: 1.0; }

  /* Hero */
  .hero { padding: 40px 0 72px; }
  .hero-stage { margin-top: 48px; }
  .hero-stage-inner { gap: 18px; }
  .hero-aside-card.b { transform: none; }

  /* Compare: enable horizontal scroll already on tablet */
  .compare-card { padding: 28px; }
  .compare-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .compare { min-width: 560px; }

  /* Scrolly stage: prevent the sticky/long stage from blowing layout */
  .scrolly { gap: 36px; }
}

/* ==================== MOBILE ≤640px ==================== */
@media (max-width: 640px) {
  :root { --gutter: 24px; }

  section { padding: 64px 0; }
  section.tight { padding: 48px 0; }

  /* Body type */
  body { font-size: 16px; }

  /* Hero */
  .hero { padding: 32px 0 56px; }
  .hero-marker { padding: 6px 12px; font-size: 12px; margin-bottom: 24px; }
  .hero-grid { gap: 18px; }
  .hero-stage { margin-top: 32px; }
  .hero-aside-card { display: none; }
  /* Headline: reduce min so text fits; allow accent-strike to wrap */
  h1 { font-size: clamp(32px, 9vw, 44px); line-height: 1.0; }
  h2 { font-size: clamp(28px, 7.5vw, 40px); line-height: 1.04; }
  h3 { font-size: clamp(18px, 4.5vw, 22px); }
  .hero-headline .accent-strike { white-space: normal; background-size: 104% 0.18em; }
  .hero-cta { gap: 12px; }
  .hero-cta .btn { font-size: 14px; padding: 14px 18px; }

  /* Ticker counter: go below the marquee */
  .ticker-count {
    position: static;
    text-align: center;
    margin-top: 12px;
    padding: 0 16px;
  }

  /* Problema */
  .problema-grid { gap: 18px; margin-top: 36px; }
  .problema-item { padding-top: 18px; }
  .problema-item .stat { font-size: clamp(32px, 9vw, 52px); }

  /* Inversion */
  .inversion { margin-top: 32px; gap: 18px; }
  .inv-panel { padding: 22px 18px; min-height: 0; border-radius: 18px; }
  .inv-panel .title { font-size: clamp(20px, 5.5vw, 28px); }

  /* Scrolly */
  .scrolly { margin-top: 32px; gap: 24px; }
  .scrolly-step { padding: 22px 0 26px; }
  .scrolly-step h3 { font-size: clamp(22px, 6vw, 30px); }
  .scrolly-step p { font-size: 15px; }
  .scrolly-stage { display: none; }

  /* White-label */
  .wl-grid { gap: 28px; margin-top: 32px; }
  .wl-callout { top: auto; right: 8px; bottom: -10px; font-size: 11px; }
  .wl-presets { gap: 8px; margin: 18px 0 12px; }

  /* Bento → 1 column */
  .bento {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 12px;
    margin-top: 32px;
  }
  .bento-cell,
  .bento-cell.span-2,
  .bento-cell.span-3,
  .bento-cell.span-4 { grid-column: span 1; }
  .bento-cell.row-2 { grid-row: auto; }
  .bento-cell { padding: 20px; border-radius: 16px; }
  .bento-hero h3 { font-size: clamp(22px, 6vw, 28px); }

  /* Planos */
  .planos-grid { gap: 14px; margin-top: 32px; }
  .plano { padding: 24px 22px; border-radius: 18px; }
  .plano h3 { font-size: 22px; }
  .plano .price { font-size: 44px; }
  .plano .price .currency, .plano .price .cents { font-size: 18px; }

  /* Compare → horizontal scroll; drop glow clip on mobile */
  .compare-card { padding: 20px 16px; overflow: visible; border-radius: 18px; }
  .compare-card::before { display: none; }
  .compare-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; }
  .compare { min-width: 500px; }
  .compare th, .compare td { padding: 14px 10px; font-size: 13px; }

  /* CTA final + Demo */
  .cta-final-grid { gap: 28px; }
  .form-card { padding: 24px 18px; border-radius: 18px; }
  .demo-form-card { padding: 24px 18px; border-radius: 18px; }
  .form-card .row { grid-template-columns: 1fr; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr; gap: 24px; padding-bottom: 28px; }
  .footer { padding: 48px 0 28px; }
  .footer-glyph { display: none; }

  /* Nav */
  .nav { padding: 14px 0; }
  .nav .btn { padding: 9px 8px 9px 14px; font-size: 13px; }
  .nav .btn .arrow { width: 22px; height: 22px; }
  /* Hide secondary nav CTA on mobile to avoid crowding */
  .nav-cta-row .btn-ghost { display: none; }

  /* ---- Bug 1/5: device mock must fit, never overflow ---- */
  .laptop, .wl-stage-wrap, .hero-stage-inner {
    max-width: 100%;
    overflow: hidden;
  }
  .laptop { padding: 10px 10px 0; border-radius: 14px 14px 6px 6px; }
  .laptop::after { left: 0; right: 0; }
  .wl-callout { right: 4px; left: auto; max-width: calc(100% - 8px); }

  /* Dashboard mock: JS ResizeObserver scales .dash via transform — no CSS grid tweaks needed */

  /* ---- Bug 2: comparison arrow centered ---- */
  .inv-arrow { justify-self: center; margin: 0 auto; }
}

/* ==================== MOBILE ≤390px (narrow phones) ==================== */
@media (max-width: 390px) {
  :root { --gutter: 18px; }

  h1 { font-size: clamp(28px, 8.5vw, 38px); }
  h2 { font-size: clamp(24px, 7vw, 34px); }

  /* Every multi-column grid collapses to a single column */
  .problema-grid,
  .inversion,
  .scrolly,
  .wl-grid,
  .bento,
  .planos-grid,
  .footer-top,
  .demo-grid,
  .form-card .row { grid-template-columns: 1fr; }

  .bento-cell,
  .bento-cell.span-2,
  .bento-cell.span-3,
  .bento-cell.span-4 { grid-column: span 1; }

  .kpis { grid-template-columns: 1fr 1fr; }
  .stage-clients-grid { grid-template-columns: 1fr; }

  .plano { padding: 22px 18px; }
  .plano .price { font-size: 40px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .wl-presets .wl-preset { font-size: 12px; }
}
