/* ==========================================================================
   .eit-btn — the site's one button

   Resting:  outlined pill, blue circle-arrow on the LEFT, blue label right.
   Hover:    solid blue fill, white label left, white circle-arrow RIGHT.

   The two halves swap sides by sliding through each other over --b-dur, with
   the arrow crossing above the label.

   Markup:
     <a class="eit-btn" href="…">
       <span class="eit-btn__icon" aria-hidden="true"><svg …/></span>
       <span class="eit-btn__label">Discover More</span>
     </a>
   ========================================================================== */

.eit-btn {
	/* One size for the whole site — the header bar's button is the baseline,
	   so nothing has to opt in to match it. */
	--b-size: 34px;   /* circle diameter             */
	--b-inset: 5px;   /* circle offset from the edge */
	--b-lead: 12px;   /* circle-to-label gap         */
	--b-tail: 20px;   /* label-to-edge padding       */
	--b-dur: .5s;

	position: relative;
	display: inline-flex;
	align-items: center;
	isolation: isolate;
	overflow: hidden;

	min-height: calc(var(--b-size) + (var(--b-inset) * 2));
	border: 1.5px solid var(--eit-accent, #3b4fe8);
	border-radius: 999px;
	background: transparent;
	text-decoration: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;

	transition: background-color var(--b-dur) ease, border-color var(--b-dur) ease;
}

/* ---------- Label ----------
   Static, so its own width sizes the button. Its asymmetric padding reserves
   the circle's seat on the left; sliding it left by --b-swap hands that seat
   over to the right-hand side. */

.eit-btn__label {
	display: block;
	padding-left: calc(var(--b-size) + var(--b-lead));
	padding-right: var(--b-tail);
	color: var(--eit-accent, #3b4fe8);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	transition: transform var(--b-dur) ease, color var(--b-dur) ease;
	z-index: 1;
}

/* ---------- Circle + arrow ---------- */

.eit-btn__icon {
	position: absolute;
	top: 50%;
	left: var(--b-inset);
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--b-size);
	height: var(--b-size);
	border-radius: 50%;
	background: var(--eit-accent, #3b4fe8);
	color: #fff;
	/* Above the label, so the arrow passes over the text mid-swap. */
	z-index: 2;
	transform: translateY(-50%);
	transition: left var(--b-dur) ease, background-color var(--b-dur) ease, color var(--b-dur) ease;
}

.eit-btn__icon svg {
	width: 55%;
	height: 55%;
	display: block;
}

/* ---------- Hover / focus ---------- */

.eit-btn:hover,
.eit-btn:focus-visible {
	background: var(--eit-accent, #3b4fe8);
	border-color: var(--eit-accent, #3b4fe8);
}

.eit-btn:hover .eit-btn__icon,
.eit-btn:focus-visible .eit-btn__icon {
	left: calc(100% - var(--b-size) - var(--b-inset));
	background: #ffffff;
	color: var(--eit-accent, #3b4fe8);
}

.eit-btn:hover .eit-btn__label,
.eit-btn:focus-visible .eit-btn__label {
	/* Distance that puts the label's text back at --b-tail from the left. */
	transform: translateX(calc((var(--b-size) + var(--b-lead) - var(--b-tail)) * -1));
	color: #ffffff;
}

/* ---------- Variants ---------- */

/* Starts filled — for placement on light panels where an outline reads weakly.
   Hover still swaps sides; the colours simply invert the other way. */
.eit-btn--solid {
	background: var(--eit-accent, #3b4fe8);
}
.eit-btn--solid .eit-btn__label { color: #ffffff; }
.eit-btn--solid .eit-btn__icon { background: #ffffff; color: var(--eit-accent, #3b4fe8); }

.eit-btn--solid:hover,
.eit-btn--solid:focus-visible { background: transparent; }
.eit-btn--solid:hover .eit-btn__label,
.eit-btn--solid:focus-visible .eit-btn__label { color: var(--eit-accent, #3b4fe8); }
.eit-btn--solid:hover .eit-btn__icon,
.eit-btn--solid:focus-visible .eit-btn__icon {
	background: var(--eit-accent, #3b4fe8);
	color: #ffffff;
}

/* `--sm` is now what every button is, so the modifier is kept only so old
   markup carrying the class keeps working. It deliberately changes nothing. */

/* Ink-filled, for light sections that want a heavier anchor than the blue. */
.eit-btn--dark {
	background: var(--eit-ink, #15181f);
	border-color: var(--eit-ink, #15181f);
}
.eit-btn--dark .eit-btn__label { color: #ffffff; }
.eit-btn--dark .eit-btn__icon { background: #ffffff; color: var(--eit-ink, #15181f); }

.eit-btn--dark:hover,
.eit-btn--dark:focus-visible { background: transparent; }
.eit-btn--dark:hover .eit-btn__label,
.eit-btn--dark:focus-visible .eit-btn__label { color: var(--eit-ink, #15181f); }
.eit-btn--dark:hover .eit-btn__icon,
.eit-btn--dark:focus-visible .eit-btn__icon {
	background: var(--eit-ink, #15181f);
	color: #ffffff;
}

/* Outlined in ink — the companion to --dark, for a secondary action sitting
   beside it. Same swap on hover, colours inverted the other way. */
.eit-btn--ink { border-color: var(--eit-ink, #15181f); }
.eit-btn--ink .eit-btn__label { color: var(--eit-ink, #15181f); }
.eit-btn--ink .eit-btn__icon { background: var(--eit-ink, #15181f); color: #ffffff; }

.eit-btn--ink:hover,
.eit-btn--ink:focus-visible { background: var(--eit-ink, #15181f); border-color: var(--eit-ink, #15181f); }
.eit-btn--ink:hover .eit-btn__label,
.eit-btn--ink:focus-visible .eit-btn__label { color: #ffffff; }
.eit-btn--ink:hover .eit-btn__icon,
.eit-btn--ink:focus-visible .eit-btn__icon { background: #ffffff; color: var(--eit-ink, #15181f); }

/* Filled white — the primary action on a dark background. Pairs with --light
   the way --dark pairs with --ink on a pale one. */
.eit-btn--white { background: #ffffff; border-color: #ffffff; }
.eit-btn--white .eit-btn__label { color: var(--eit-ink, #15181f); }
.eit-btn--white .eit-btn__icon { background: var(--eit-ink, #15181f); color: #ffffff; }

.eit-btn--white:hover,
.eit-btn--white:focus-visible { background: transparent; border-color: #ffffff; }
.eit-btn--white:hover .eit-btn__label,
.eit-btn--white:focus-visible .eit-btn__label { color: #ffffff; }
.eit-btn--white:hover .eit-btn__icon,
.eit-btn--white:focus-visible .eit-btn__icon { background: #ffffff; color: var(--eit-ink, #15181f); }

/* On a dark background (hero, footer) the resting state goes white. */
.eit-btn--light { border-color: rgba(255, 255, 255, .75); }
.eit-btn--light .eit-btn__label { color: #ffffff; }
.eit-btn--light .eit-btn__icon { background: #ffffff; color: var(--eit-accent, #3b4fe8); }
.eit-btn--light:hover,
.eit-btn--light:focus-visible { background: #ffffff; border-color: #ffffff; }
.eit-btn--light:hover .eit-btn__label,
.eit-btn--light:focus-visible .eit-btn__label { color: var(--eit-accent, #3b4fe8); }
.eit-btn--light:hover .eit-btn__icon,
.eit-btn--light:focus-visible .eit-btn__icon {
	background: var(--eit-accent, #3b4fe8);
	color: #ffffff;
}

/* ---------- Motion preference ----------
   The slide is a lot of movement; keep the colour change only. */

@media (prefers-reduced-motion: reduce) {
	.eit-btn,
	.eit-btn__icon,
	.eit-btn__label { transition: background-color .2s ease, color .2s ease, border-color .2s ease; }

	.eit-btn:hover .eit-btn__icon,
	.eit-btn:focus-visible .eit-btn__icon { left: var(--b-inset); }

	.eit-btn:hover .eit-btn__label,
	.eit-btn:focus-visible .eit-btn__label { transform: none; }
}
