/* ==========================================================================
   components.css — buttons, cards, nav, footer, KPI tiles, chips, hero, etc.
   Depends on variables.css + base.css.
   ========================================================================== */

/* ---- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-weight: 600; font-size: var(--fs-sm); line-height: 1;
  padding: 13px 20px; border-radius: var(--r-lg);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--ink); color: #fff; box-shadow: var(--shadow-md); }

.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--border); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--brand); color: var(--brand); }

.btn-whatsapp { background: var(--grad-success); color: #fff; box-shadow: var(--shadow-sm); }
.btn-whatsapp:hover { color: #fff; box-shadow: var(--shadow-glow); transform: translateY(-1px); }

.btn-lg { padding: 16px 28px; font-size: var(--fs-body); }
.btn-on-dark.btn-ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.btn-on-dark.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ---- chips / badges ------------------------------------------------------ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.02em;
  padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--brand-tint); color: var(--brand);
}
.chip--up   { background: var(--green-tint); color: var(--green); }
.chip--down { background: var(--red-tint);   color: var(--red); }
.chip--warn { background: var(--amber-tint); color: var(--amber); }

.badge-popular {
  position: absolute; top: -12px; right: var(--sp-4);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.03em;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--grad-premium); color: #fff; box-shadow: var(--shadow-glow);
}

/* ---- cards --------------------------------------------------------------- */
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-2xl);
  padding: var(--sp-5); box-shadow: var(--shadow-xs);
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d3dce6; }

/* ==========================================================================
   NAV (injected by js/components.js into <header id="site-nav">)
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  height: var(--nav-h); display: flex; align-items: center; gap: var(--sp-4);
  max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-4);
}
.nav__brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.nav__brand:hover { color: inherit; }
.brand-mark {
  width: 40px; height: 40px; border-radius: var(--r-lg);
  background: var(--grad-premium);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; font-weight: 800; letter-spacing: -0.02em;
  box-shadow: 0 4px 16px rgba(0,48,73,.3); flex-shrink: 0;
}
.brand-word { font-weight: 800; font-size: 1.0625rem; color: var(--ink); letter-spacing: -0.02em; }
.brand-word span { color: var(--brand); }

.nav__links { display: flex; align-items: center; gap: var(--sp-4); }
.nav__links a { color: var(--text); font-size: var(--fs-sm); font-weight: 500; }
.nav__links a:hover { color: var(--ink); }

.nav__actions { display: flex; align-items: center; gap: var(--sp-3); }

/* language toggle */
.lang-toggle {
  display: inline-flex; align-items: center; border: 1px solid var(--border);
  border-radius: var(--r-pill); overflow: hidden; background: var(--bg-soft);
}
.lang-toggle button {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em;
  padding: 6px 11px; color: var(--muted); transition: all var(--t-fast);
}
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* mobile menu */
.nav__toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center;
  border-radius: var(--r-md); color: var(--ink); }
.nav__toggle:hover { background: var(--bg-soft); }

@media (max-width: 900px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: var(--sp-2) var(--sp-4) var(--sp-4);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity var(--t-fast), transform var(--t-fast);
    box-shadow: var(--shadow-md);
  }
  .nav__links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__links a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-body); }
  .nav__cta-desktop { display: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { position: relative; background: var(--grad-hero); color: #fff; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 80% 10%, rgba(45,212,191,.22), transparent 70%);
  pointer-events: none;
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-7); align-items: center;
  padding-block: clamp(56px, 6vw, 104px);
}
.hero h1 { color: #fff; font-size: var(--fs-display); letter-spacing: var(--tracking-tight); }
.hero__rotator { position: relative; display: block; min-height: 1.5em; margin-top: var(--sp-3);
  font-size: var(--fs-h3); font-weight: 700; color: var(--brand-glow); }
.hero__rotator .rot-item {
  position: absolute; left: 0; top: 0; opacity: 0; transform: translateY(8px);
  transition: opacity var(--t-med), transform var(--t-med); white-space: nowrap;
}
.hero__rotator .rot-item.is-active { opacity: 1; transform: none; position: relative; }
.hero__lede { color: rgba(255,255,255,.82); font-size: var(--fs-lede); margin-top: var(--sp-4); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.hero__trust { margin-top: var(--sp-5); font-size: var(--fs-sm); color: rgba(255,255,255,.65); }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--sp-6); }
}

/* hero dashboard mockup (inline SVG container + floating card) */
.hero__mock { position: relative; }
.mock-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-2xl); padding: var(--sp-4); backdrop-filter: blur(8px);
  box-shadow: var(--shadow-lg);
}
.mock-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.mock-card__title { font-size: var(--fs-sm); font-weight: 600; color: rgba(255,255,255,.9); }
.mock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-glow); box-shadow: 0 0 0 4px var(--glow-tint); }
.mock-svg { width: 100%; height: auto; border-radius: var(--r-lg); }

/* ==========================================================================
   KPI TILES (problem section)
   ========================================================================== */
.kpi {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: var(--sp-4); box-shadow: var(--shadow-xs);
}
.kpi__label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted); }
.kpi__value { margin-top: var(--sp-2); font-size: 1.75rem; color: var(--ink); font-weight: 700; }
.kpi__row { display: flex; align-items: baseline; justify-content: space-between; margin-top: var(--sp-2); }

/* ==========================================================================
   BANK ACCOUNTS CARD
   ========================================================================== */
.accounts { max-width: 520px; margin-inline: auto; }
.accounts__total { display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: var(--sp-3); border-bottom: 1px dashed var(--border); margin-bottom: var(--sp-3); }
.accounts__total .figure { font-size: 1.75rem; color: var(--ink); font-weight: 700; }
.account-row { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-2) 0; }
.account-row + .account-row { border-top: 1px solid var(--border); }
.account-row__name { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; }
.account-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--brand); flex-shrink: 0; }

/* ==========================================================================
   CASH-FLOW PREVIEW (screenshots)
   ========================================================================== */
.shot {
  border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--shadow-md); background: var(--bg);
}
.shot img { width: 100%; }
.shot__cap { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); color: var(--muted); border-top: 1px solid var(--border); }

/* ==========================================================================
   SERVICE CARDS (6, one is Most Popular)
   ========================================================================== */
.service { position: relative; display: flex; flex-direction: column; height: 100%; }
.service--popular { border-color: var(--brand); box-shadow: var(--shadow-md); }
.service__icon {
  width: 44px; height: 44px; border-radius: var(--r-lg); margin-bottom: var(--sp-3);
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand);
}
.service__icon svg { width: 22px; height: 22px; }
.service h3 { margin-bottom: var(--sp-2); }
.service p { font-size: var(--fs-sm); }

/* ==========================================================================
   BEFORE / AFTER (Excel -> Dashboard)
   ========================================================================== */
.beforeafter { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--sp-4); align-items: center; }
.ba-panel { border-radius: var(--r-xl); padding: var(--sp-4); border: 1px solid var(--border); height: 100%; }
.ba-panel--before { background: var(--red-tint); border-color: rgba(205,53,0,.2); }
.ba-panel--after  { background: var(--green-tint); border-color: rgba(0,135,90,.2); }
.ba-panel__tag { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.ba-panel--before .ba-panel__tag { color: var(--red); }
.ba-panel--after  .ba-panel__tag { color: var(--green); }
.ba-file { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--ink); margin-top: var(--sp-2); word-break: break-all; }
.ba-line { display: flex; align-items: center; gap: 8px; margin-top: var(--sp-2); font-size: var(--fs-sm); }
.ba-arrow { color: var(--brand); display: flex; align-items: center; justify-content: center; }
@media (max-width: 900px) {
  .beforeafter { grid-template-columns: 1fr; }
  .ba-arrow { transform: rotate(90deg); margin-inline: auto; }
}

/* ==========================================================================
   LOGO WALL
   ========================================================================== */
.logos { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--sp-5); align-items: center; }
.logos img {
  width: 100%; max-height: 56px; object-fit: contain;
  filter: grayscale(1); opacity: .6; transition: filter var(--t-med), opacity var(--t-med);
}
.logos a:hover img { filter: grayscale(0); opacity: 1; }
@media (max-width: 900px) { .logos { grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); } }

/* ==========================================================================
   STAT COUNTERS
   ========================================================================== */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); text-align: center; }
.stat__value { font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 1.2rem + 2.5vw, 3rem); font-weight: 700; color: var(--ink); }
.stat__label { margin-top: var(--sp-1); color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 900px) { .stats { grid-template-columns: 1fr; gap: var(--sp-5); } }

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.quote { display: flex; flex-direction: column; height: 100%; }
.quote__text { color: var(--ink); font-size: 1.0625rem; line-height: var(--lh-normal); }
.quote__by { margin-top: var(--sp-4); display: flex; align-items: center; gap: 12px; }
.quote__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad-premium);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; flex-shrink: 0; }
.quote__name { font-weight: 700; color: var(--ink); font-size: var(--fs-sm); }
.quote__role { color: var(--muted); font-size: var(--fs-xs); }

/* ==========================================================================
   CTA BAND
   ========================================================================== */
.cta-band { background: var(--grad-premium); color: #fff; border-radius: var(--r-2xl);
  padding: clamp(40px, 5vw, 72px); text-align: center; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); max-width: 52ch; margin: var(--sp-3) auto 0; }
.cta-band__row { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-5); }

/* ==========================================================================
   FOOTER (injected by js/components.js into <footer id="site-footer">)
   ========================================================================== */
.footer { background: var(--ink); color: rgba(255,255,255,.72); padding-block: var(--sp-7) var(--sp-5); }
.footer a { color: rgba(255,255,255,.72); font-size: var(--fs-sm); }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--sp-5); }
.footer__brand .brand-word { color: #fff; }
.footer__tag { margin-top: var(--sp-3); font-size: var(--fs-sm); max-width: 34ch; }
.footer__col h4 { color: #fff; font-size: var(--fs-sm); margin-bottom: var(--sp-3); letter-spacing: 0.02em; }
.footer__col li { margin-bottom: 10px; }
.footer__contact li { display: flex; gap: 8px; margin-bottom: 10px; font-size: var(--fs-sm); }
.footer__social { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.footer__social a { width: 36px; height: 36px; border-radius: var(--r-md); display: flex;
  align-items: center; justify-content: center; background: rgba(255,255,255,.08); }
.footer__social a:hover { background: var(--brand); }
.footer__social svg { width: 18px; height: 18px; }
.footer__bottom { margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; align-items: center;
  font-size: var(--fs-sm); }
.footer__legal { display: flex; gap: var(--sp-4); }
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
  .footer__brand { grid-column: 1 / -1; }
}

/* ==========================================================================
   AUTH (login page) — brand palette, NOT WhatsApp green
   ========================================================================== */
.auth { min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center;
  justify-content: center; padding: var(--sp-6) var(--sp-4); background: var(--bg-soft); }
.auth__card { width: 100%; max-width: 420px; }
.auth__head { text-align: center; margin-bottom: var(--sp-5); }
.auth__mark { width: 48px; height: 48px; margin: 0 auto var(--sp-3); border-radius: var(--r-lg);
  background: var(--grad-premium); display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 20px; box-shadow: 0 4px 16px rgba(0,48,73,.3); }
.auth__head h1 { font-size: var(--fs-h2); }
.auth__head p { margin-top: var(--sp-2); color: var(--muted); font-size: var(--fs-sm); }

.field { margin-bottom: var(--sp-3); }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.input { width: 100%; font: inherit; font-size: var(--fs-body); color: var(--ink); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.btn-block { width: 100%; }

.auth__error { display: none; margin-bottom: var(--sp-3); padding: 10px 12px; font-size: var(--fs-sm);
  background: var(--red-tint); color: var(--red); border: 1px solid rgba(205,53,0,.25); border-radius: var(--r-md); }
.auth__error.is-shown { display: block; }
.auth__foot { text-align: center; margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--muted); }

/* ==========================================================================
   SCROLL REVEAL (driven by js/animations.js -> .is-visible)
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--t-slow), transform var(--t-slow); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
