/* =============================================================
   B2B Grow Lab — Components
   Botones, chips, cards, rules, helpers de layout.
   ============================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

a { color: inherit; }
img, svg, video { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ----- Layout containers ----- */
.wrap {
	width: 100%;
	max-width: var(--maxw);
	padding-inline: 32px;
	margin-inline: auto;
}

.wrap-wide {
	width: 100%;
	max-width: var(--maxw-wide);
	padding-inline: 32px;
	margin-inline: auto;
}

@media (max-width: 640px) {
	.wrap,
	.wrap-wide { padding-inline: 20px; }
}

/* ----- Section frame ----- */
.section {
	position: relative;
	padding: var(--space-section) 0;
}

.section.tight { padding: var(--space-section-tight) 0; }

.section.dark {
	background: var(--night);
	color: var(--night-ink);
}

.section.cream-2 { background: var(--paper-2); }

@media (max-width: 640px) {
	.section { padding: var(--space-section-mobile) 0; }
}

/* ----- Section header ----- */
.sec-head {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr);
	gap: 32px;
	align-items: end;
	margin-bottom: 56px;
}
.sec-head .right { max-width: 720px; }
@media (max-width: 820px) {
	.sec-head { grid-template-columns: 1fr; gap: 16px; }
}

/* ----- Rule (divider) ----- */
.rule {
	height: 1px;
	background: var(--rule);
	width: 100%;
	border: 0;
}
.section.dark .rule { background: var(--night-rule); }

/* ----- Buttons ----- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 18px;
	border-radius: var(--radius-pill);
	font-family: "Geist", sans-serif;
	font-size: 14.5px;
	font-weight: 500;
	letter-spacing: -0.005em;
	text-decoration: none;
	border: 1px solid transparent;
	transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
	cursor: pointer;
	white-space: nowrap;
	-webkit-tap-highlight-color: transparent;
}

.btn:hover { transform: translateY(-1px); }
.btn:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.btn-primary {
	background: var(--ink);
	color: var(--paper);
}
.btn-primary:hover { background: var(--accent-deep); color: var(--paper); }

.btn-ghost {
	border-color: var(--rule-strong);
	color: var(--ink);
	background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-onnight {
	background: var(--paper);
	color: var(--ink);
}
.btn-onnight:hover { background: var(--accent); color: #fff; }

.btn-onnight-ghost {
	border-color: var(--night-rule-strong);
	color: var(--night-ink);
	background: transparent;
}
.btn-onnight-ghost:hover { border-color: var(--night-ink); }

.btn-sm {
	height: 34px;
	padding: 0 12px;
	font-size: 13px;
}

.arrow-right::after {
	content: "→";
	margin-left: 6px;
	font-family: "Geist", sans-serif;
}

/* ----- Chips / pills ----- */
.chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 26px;
	padding: 0 10px;
	border-radius: var(--radius-pill);
	font-family: "Geist Mono", monospace;
	font-size: 11px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border: 1px solid var(--rule-strong);
	color: var(--ink-2);
	background: rgba(255, 255, 255, 0.5);
}

.section.dark .chip {
	border-color: var(--night-rule-strong);
	color: var(--night-ink-2);
	background: rgba(255, 255, 255, 0.04);
}

.chip.live::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: var(--radius-pill);
	background: #2BC07A;
	box-shadow: 0 0 0 3px rgba(43, 192, 122, 0.18);
	animation: b2bgl-pulse 2s ease-in-out infinite;
}

@keyframes b2bgl-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.35; }
}

.chip.accent {
	background: var(--accent-tint);
	border-color: rgba(54, 100, 203, 0.35);
	color: var(--accent-deep);
}

/* ----- Card primitive ----- */
.card {
	background: var(--white);
	border: 1px solid var(--rule);
	border-radius: var(--radius-card);
	padding: 28px;
	transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--rule-strong); }
.section.dark .card {
	background: var(--night-2);
	border-color: var(--night-rule);
	color: var(--night-ink);
}

/* ----- Visually hidden ----- */
.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;
}

/* ----- prefers-reduced-motion: cortar animaciones decorativas ----- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
