/* ============================================================
   RENDA FAMILIAR — components.css
   Buttons, cards (A/B/C), section headers, icons, links.
   Depends on colors_and_type.css tokens.
   ============================================================ */

/* ---------------- BUTTONS ---------------- */

/* Primary — hero CTA: text + arrow in embedded black capsule */
.rf-btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 6px 6px 6px 22px;
  border-radius: var(--r-btn);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: transform var(--t-micro) var(--ease),
              box-shadow var(--t-micro) var(--ease),
              background var(--t-micro) var(--ease);
}
.rf-btn-hero .rf-cap {
  width: 32px; height: 32px;
  border-radius: var(--r-cap);
  background: var(--on-accent);
  display: grid; place-items: center;
  transition: transform var(--t-micro) var(--ease);
}
.rf-btn-hero .rf-cap svg { stroke: var(--accent); }
.rf-btn-hero:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-cta-hover);
}
.rf-btn-hero:hover .rf-cap { transform: translateX(4px); }
.rf-btn-hero:active { background: var(--accent-active); transform: scale(0.97); }
.rf-btn-hero:disabled {
  background: var(--accent-ghost); color: rgba(11,11,12,0.5);
  box-shadow: none; cursor: not-allowed; transform: none;
}

/* Primary solid — internal CTAs (no capsule) */
.rf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--r-btn);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform var(--t-micro) var(--ease),
              box-shadow var(--t-micro) var(--ease),
              background var(--t-micro) var(--ease);
}
.rf-btn svg { stroke: var(--on-accent); transition: transform var(--t-micro) var(--ease); }
.rf-btn:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(196,245,66,0.18); }
.rf-btn:hover svg { transform: translateX(3px); }
.rf-btn:active { background: var(--accent-active); transform: scale(0.97); }

/* Secondary — transparent, arrow in thin circle */
.rf-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 4px;
  background: transparent;
  color: var(--text-1);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  border: none;
  cursor: pointer;
}
.rf-btn-ghost .rf-circ {
  width: 24px; height: 24px; border-radius: 50%;
  border: 0.5px solid rgba(255,255,255,0.30);
  display: grid; place-items: center;
  transition: background var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease);
}
.rf-btn-ghost .rf-circ svg { stroke: var(--text-1); transition: transform var(--t-micro) var(--ease), stroke var(--t-micro) var(--ease); }
.rf-btn-ghost:hover .rf-circ { background: var(--accent); border-color: var(--accent); }
.rf-btn-ghost:hover .rf-circ svg { stroke: var(--on-accent); transform: translateX(2px); }

/* Text link — underline grows from left */
.rf-link {
  position: relative;
  color: var(--text-1);
  text-decoration: none;
  font-family: var(--font-sans);
}
.rf-link::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-reveal) var(--ease);
}
.rf-link:hover { color: var(--accent); }
.rf-link:hover::after { transform: scaleX(1); }

/* ---------------- ICON BOX ---------------- */
.rf-iconbox {
  width: 40px; height: 40px;
  border-radius: var(--r-icon);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  display: grid; place-items: center;
}
.rf-iconbox svg { stroke: var(--accent); width: 20px; height: 20px; }

/* ---------------- CARD A — Wibify (giant number) ---------------- */
.rf-card-a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  padding: 20px 0;
  border-top: 0.5px solid var(--hairline);
  cursor: default;
}
.rf-card-a .rf-num-giant {
  font-family: var(--font-sans);
  font-weight: 700; font-size: 44px;
  font-variant-numeric: tabular-nums;
  color: var(--accent-ghost);
  line-height: 1;
  transition: color var(--t-medium) var(--ease);
}
.rf-card-a h4 { font-size: 18px; font-weight: 600; color: var(--text-1); margin: 0 0 6px; font-family: var(--font-sans); transition: color var(--t-medium) var(--ease); }
.rf-card-a p { font-size: 14px; line-height: 1.55; color: var(--text-2); margin: 0; font-family: var(--font-sans); }
.rf-card-a:hover .rf-num-giant { color: rgba(196,245,66,0.5); }
.rf-card-a:hover h4 { color: var(--accent); }

/* ---------------- CARD B — fintech (data + sparkline) ---------------- */
.rf-card-b {
  background: var(--surface-fin);
  border: 0.5px solid rgba(255,255,255,0.07);
  border-radius: var(--r-card);
  padding: 22px;
  transition: transform var(--t-medium) var(--ease), border-color var(--t-medium) var(--ease), box-shadow var(--t-medium) var(--ease);
}
.rf-card-b .rf-cb-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.rf-card-b .rf-cb-label { font-size: 12px; color: var(--text-2); font-family: var(--font-sans); }
.rf-card-b .rf-badge {
  font-size: 11px; color: var(--accent);
  background: rgba(196,245,66,0.12);
  padding: 3px 8px; border-radius: var(--r-sm);
  font-variant-numeric: tabular-nums; font-family: var(--font-sans); font-weight: 500;
}
.rf-card-b .rf-cb-num { font-size: 32px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--text-1); font-family: var(--font-sans); margin-bottom: 10px; }
.rf-card-b svg.rf-spark { display: block; width: 100%; height: 32px; }
.rf-card-b:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: var(--shadow-card-hover); }

/* ---------------- CARD C — Apple (no box) ---------------- */
.rf-card-c { display: block; cursor: default; }
.rf-card-c .rf-c-icon { display: block; margin-bottom: 16px; }
.rf-card-c .rf-c-icon svg { stroke: var(--accent); width: 24px; height: 24px; transition: filter var(--t-medium) var(--ease); }
.rf-card-c h4 { font-size: 16px; font-weight: 600; color: var(--text-1); margin: 0 0 8px; font-family: var(--font-sans); transition: color var(--t-medium) var(--ease); }
.rf-card-c p { font-size: 13px; line-height: 1.55; color: var(--text-2); margin: 0; font-family: var(--font-sans); }
.rf-card-c:hover .rf-c-icon svg { filter: drop-shadow(0 0 8px rgba(196,245,66,0.5)); }
.rf-card-c:hover h4 { color: var(--accent); }

/* ---------------- SECTION HEADER [03] — line + fraction index ---------------- */
.rf-head { margin-bottom: 18px; }
.rf-head .rf-rule { height: 0.5px; background: rgba(255,255,255,0.12); width: 100%; margin-bottom: 18px; }
.rf-head .rf-head-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; }
.rf-head .rf-head-row h2 { margin: 0; }
.rf-head .rf-index { font-size: 11px; color: var(--text-2); letter-spacing: 0.15em; font-variant-numeric: tabular-nums; white-space: nowrap; font-family: var(--font-sans); }

/* ---------------- SECTION HEADER [05] — centered w/ side lines ---------------- */
.rf-head-center { text-align: center; margin-bottom: 18px; }
.rf-head-center .rf-label-row { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.rf-head-center .rf-side-line { width: 40px; height: 0.5px; background: rgba(255,255,255,0.12); }

/* ---------------- SCROLL REVEAL ---------------- */
.rf-reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--t-scroll) var(--ease), transform var(--t-scroll) var(--ease); }
.rf-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rf-reveal { opacity: 1; transform: none; } }
