/* ==========================================================================
   Buttons & text links
   ========================================================================== */

.btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	min-height: 52px;
	padding: 0.9rem 1.6rem;
	font-family: var(--font-body);
	font-size: var(--fs-small);
	font-weight: 500;
	letter-spacing: 0.02em;
	line-height: 1.2;
	border: 1px solid transparent;
	overflow: hidden;
	isolation: isolate;
	transition:
		color var(--dur-base) var(--ease-premium),
		border-color var(--dur-base) var(--ease-premium),
		background-color var(--dur-base) var(--ease-premium);
}

.btn::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	transform: scaleY(0);
	transform-origin: bottom center;
	transition: transform var(--dur-base) var(--ease-premium);
}

.btn:hover::before,
.btn:focus-visible::before {
	transform: scaleY(1);
}

.btn .icon {
	width: 1.1em;
	height: 1.1em;
	transition: transform var(--dur-base) var(--ease-premium);
}

.btn:hover .icon {
	transform: translateX(4px);
}

.btn--sm {
	min-height: 42px;
	padding: 0.6rem 1.15rem;
	font-size: var(--fs-xs);
	letter-spacing: 0.04em;
}

/* Primary: navy on light */
.btn--primary {
	background: var(--ace-navy);
	color: var(--ace-ivory);
}

.btn--primary::before {
	background: var(--ace-ink);
}

/* Light: ivory on dark */
.btn--light {
	background: var(--ace-ivory);
	color: var(--ace-ink);
}

.btn--light::before {
	background: var(--ace-paper);
}

/* Ghost: outline that inherits the current color */
.btn--ghost {
	border-color: currentColor;
	color: inherit;
	background: transparent;
}

.btn--ghost::before {
	background: currentColor;
}

.btn--ghost > * {
	position: relative;
	transition: color var(--dur-base) var(--ease-premium);
}

.btn--ghost:hover > *,
.btn--ghost:focus-visible > * {
	color: var(--ace-ivory);
}

.has-dark-hero .header:not(.is-scrolled) .btn--ghost:hover > *,
.menu-open .btn--ghost:hover > *,
.section--navy .btn--ghost:hover > *,
.hero .btn--ghost:hover > *,
.page-hero .btn--ghost:hover > *,
.cta .btn--ghost:hover > * {
	color: var(--ace-ink);
}

/* Text link with growing underline + arrow */
.text-link {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-size: var(--fs-small);
	font-weight: 500;
	letter-spacing: 0.01em;
	padding-bottom: 0.2rem;
	background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px;
	transition: background-size var(--dur-base) var(--ease-premium);
}

.text-link .icon {
	width: 1.05em;
	height: 1.05em;
	transition: transform var(--dur-base) var(--ease-premium);
}

.text-link:hover {
	background-size: 0 1px;
	background-position: 100% 100%;
}

.text-link:hover .icon,
.media-zoom-trigger:hover .text-link .icon {
	transform: translateX(4px);
}

.btn-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-3);
}

/* Round-free icon buttons (slider arrows) */
.icon-btn {
	display: inline-grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border: var(--hairline);
	border-color: var(--border-strong);
	color: var(--ace-ink);
	transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), opacity var(--dur-fast);
}

.icon-btn:hover:not(:disabled) {
	background: var(--ace-navy);
	border-color: var(--ace-navy);
	color: var(--ace-ivory);
}

.icon-btn:disabled {
	opacity: 0.3;
	cursor: default;
}
