/* Components: buttons, links, chips, pills, tiles, cards, tags, image cards, facts.
   States per the states sheet (307:29934). Motion timing per 03-MOTION-SPEC.md section 7. */

/* Icons */
.ico { width: 1em; height: 1em; flex: none; stroke-width: 1.8; }

/* ---------------------------------------------------------------- Buttons */
.btns { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 768px) { .btns { flex-direction: row; flex-wrap: wrap; gap: 12px; } }
.btn {
	--btn-bg: var(--c-blue);
	--btn-fg: var(--c-white);
	--btn-sh: var(--sh-blue);
	position: relative;
	isolation: isolate;
	display: inline-flex; align-items: center; justify-content: center; gap: 9px;
	height: 48px; padding: 0 20px;
	border-radius: var(--r-btn);
	background: var(--btn-bg); color: var(--btn-fg);
	box-shadow: var(--btn-sh);
	font: var(--fw-medium) 15px/20px var(--f-body);
	white-space: nowrap;
	cursor: pointer;
	translate: var(--mx, 0px) var(--my, 0px);
	transition:
		background-color var(--dur-fast) var(--ease-out-quart),
		box-shadow var(--dur-hover) var(--ease-out-quart),
		transform var(--dur-hover) var(--ease-out-quart),
		translate 250ms ease-out;
	-webkit-tap-highlight-color: transparent;
}
.btns .btn { width: 100%; }
@media (min-width: 768px) {
	.btn { height: 44px; font-size: 14px; }
	.btns .btn { width: auto; }
}
.btn--sm { height: 40px; font-size: 14px; }
.btn--block { width: 100%; }
.btn__icon { width: 10px; height: 10px; stroke-width: 1.8; transition: transform 350ms var(--ease-out-quint); }
.btn--primary:active { background: var(--c-blue-pressed); box-shadow: none; transform: scale(.98); transition-duration: var(--dur-press); }

/* Secondary (kit btnO light): Mist fill, 2px white inside stroke, soft stack. */
.btn--secondary { --btn-bg: var(--c-mist); --btn-fg: var(--c-ink); --btn-sh: var(--ring-card), var(--sh-soft); }
.btn--secondary:active { --btn-bg: var(--c-lav-glow); transform: scale(.98); transition-duration: var(--dur-press); }
/* Outline (nav Contact, footer secondary): 1px Ink 18% stroke. */
.btn--outline { --btn-bg: transparent; --btn-fg: var(--c-ink); --btn-sh: inset 0 0 0 1px var(--ink-18); padding: 0 18px; }
.btn--outline:active { --btn-bg: var(--c-lav-glow); transform: scale(.98); }
@media (min-width: 768px) { .foot .btn--outline, .mactions .btn--outline { padding: 0 20px; } }

/* On dark surfaces */
.btn--on-dark.btn--primary { --btn-bg: var(--c-white); --btn-fg: var(--c-ink); --btn-sh: none; }
.btn--on-dark.btn--primary:active { --btn-bg: var(--c-lav-glow); }
.btn--on-dark.btn--secondary, .btn--on-dark.btn--outline { --btn-bg: transparent; --btn-fg: var(--c-white); --btn-sh: inset 0 0 0 1px rgba(255, 255, 255, .28); }
.site-header--dark .btn--outline { --btn-sh: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.btn--on-dark:focus-visible { outline-color: var(--c-white); }

@media (hover: hover) and (pointer: fine) {
	.btn--primary:hover { --btn-bg: var(--c-blue-hover); --btn-sh: var(--sh-blue-hover); transform: translateY(var(--lift-button)); }
	.btn--primary:hover .btn__icon { transform: translate(2px, -2px); }
	.btn--secondary:hover, .btn--outline:hover { --btn-bg: var(--c-lav-soft); }
	.btn--on-dark.btn--primary:hover { --btn-bg: var(--c-lav-soft); --btn-sh: none; }
	.btn--on-dark.btn--secondary:hover, .btn--on-dark.btn--outline:hover { --btn-bg: rgba(255, 255, 255, .12); }
}
/* Disabled: 40% opacity, not clickable. Loading: keeps width, shows a spinner. */
.btn[aria-disabled="true"], .btn:disabled { opacity: .4; pointer-events: none; box-shadow: none; }
.btn[aria-busy="true"] { pointer-events: none; }
.btn[aria-busy="true"] .btn__icon { display: none; }
.btn[aria-busy="true"]::before {
	content: ""; width: 12px; height: 12px; border-radius: 50%;
	border: 2px solid currentColor; border-right-color: transparent;
	animation: sth-spin .8s linear infinite;
}
@keyframes sth-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- Text links */
.tlink {
	display: inline-flex; align-items: center; gap: 8px;
	color: var(--c-blue); font: var(--fw-medium) 14px/20px var(--f-body);
	text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
	transition: text-decoration-color var(--dur-fast);
}
.tlink .ico { width: 10px; height: 8px; transition: transform var(--dur-hover) var(--ease-out-quart); }
.tlink:hover { text-decoration-color: currentColor; }
.tlink:hover .ico { transform: translateX(3px); }
.link-u { position: relative; transition: color var(--dur-fast); }
@media (hover: hover) and (pointer: fine) {
	.link-u::after {
		content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
		background: currentColor; transform: scaleX(0); transform-origin: right;
		transition: transform var(--dur-hover) var(--ease-out-quart);
	}
	.link-u:hover { color: var(--c-ink); }
	.link-u:hover::after { transform: scaleX(1); transform-origin: left; }
}

/* ---------------------------------------------------------------- Chips and pills */
.chip {
	display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
	padding: 7px 12px; border-radius: var(--r-chip);
	background: var(--c-mist); box-shadow: var(--ring-card-1), var(--sh-soft);
	font: var(--fw-medium) 12px/14.4px var(--f-head); letter-spacing: .2px; text-transform: uppercase;
	color: var(--c-ink);
}
.chip__ico { width: 14px; height: 14px; color: var(--c-blue); }
.chip--dark { background: var(--c-night-chip); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); color: var(--c-white); }
.chip--dark .chip__ico { color: var(--c-lavender); }
.head--center .chip { align-self: center; }

.pill {
	display: inline-flex; align-items: center; padding: 6px 12px; border-radius: var(--r-pill);
	font: var(--fw-medium) 12px/17px var(--f-body); white-space: nowrap;
}
.pill--lav { background: var(--c-lav-soft); color: var(--c-blue); }
.pill--plain { background: var(--c-white); box-shadow: inset 0 0 0 1px var(--ink-10); color: var(--c-ink); }
.pill--dark { background: var(--c-night-chip); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); color: var(--c-lavender); }

/* Filter chip (states sheet "Chip / filter") */
.fchip {
	display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: var(--r-pill);
	background: var(--c-white); box-shadow: inset 0 0 0 1px var(--ink-10);
	font: var(--fw-medium) 13px/18px var(--f-body); color: var(--c-ink);
	transition: background-color var(--dur-fast), color var(--dur-fast);
}
.fchip:hover { background: var(--c-lav-soft); }
.fchip[aria-pressed="true"], .fchip.is-selected { background: var(--c-blue); color: var(--c-white); box-shadow: none; }

/* ---------------------------------------------------------------- Icon tile (kit tile()) */
.tile {
	--s: 44px;
	display: inline-grid; place-items: center; flex: none;
	width: var(--s); height: var(--s); border-radius: calc(var(--s) * .26);
	background: var(--grad-brand); box-shadow: var(--sh-soft); color: var(--c-white);
}
.tile .ico { width: calc(var(--s) * .46); height: calc(var(--s) * .46); stroke-width: 2; }
.tile--lg { --s: 44px; }
.tile--md { --s: 42px; }
.tile--sm { --s: 38px; }
@media (min-width: 768px) {
	.tile--lg { --s: 52px; }
	.tile--md { --s: 48px; }
	.tile--sm { --s: 44px; }
}

/* ---------------------------------------------------------------- Cards (kit card()) */
.card {
	position: relative;
	background: var(--c-mist);
	border-radius: var(--r-card);
	box-shadow: var(--ring-card), var(--sh-soft);
}
.card--big { box-shadow: var(--ring-card), var(--sh-big); }
/* Link card: whole card is one link (stretched ::after on the anchor). */
.card-link { position: static; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.card-link:focus-visible { outline: none; }
[data-card-link]:has(.card-link:focus-visible) { outline: 2px solid var(--c-blue); outline-offset: 3px; }
[data-card-link] {
	transition: transform var(--dur-hover) var(--ease-out-quart), box-shadow var(--dur-hover) var(--ease-out-quart);
}
[data-card-link] .arrow-ne { transition: transform var(--dur-hover) var(--ease-out-quart); }
@media (hover: hover) and (pointer: fine) {
	[data-card-link]:hover, [data-card-link]:focus-within {
		transform: translateY(var(--lift-card));
		box-shadow: inset 0 0 0 2px var(--c-lav-glow), var(--sh-float);
	}
	[data-card-link]:hover .arrow-ne { transform: translate(2px, -2px); }
}
[data-card-link]:active { transform: scale(.99); }
.arrow-ne { width: 12px; height: 12px; color: var(--c-blue); stroke-width: 1.8; flex: none; }

/* ---------------------------------------------------------------- Floating tag (kit ftag()) */
.ftag {
	position: absolute; z-index: 2;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 12px; border-radius: 14px;
	background: var(--c-mist); box-shadow: var(--ring-card), var(--sh-big);
	font: var(--fw-medium) 12px/20px var(--f-body); color: var(--c-ink); white-space: nowrap;
}
@media (min-width: 768px) { .ftag { padding: 10px 15px; font-size: 14px; } }
.ftag__dot { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 9px; background: var(--grad-brand); color: var(--c-white); }
.ftag__dot .ico { width: 9px; height: 7px; stroke-width: 2.4; }
/* kit tagsIn(): m = 28 (16 mobile); 0 top-left, 1 right at 50%, 2 bottom-left +20 */
.ftag--tl { left: 16px; top: 16px; }
.ftag--mr { right: 16px; top: 50%; }
.ftag--bl { left: 16px; bottom: 16px; }
.ftag--d3 { display: none; }
@media (min-width: 768px) {
	.ftag--tl { left: 28px; top: 28px; }
	.ftag--mr { right: 28px; }
	.ftag--bl { left: 48px; bottom: 28px; }
	.ftag--d3 { display: inline-flex; }
}

/* ---------------------------------------------------------------- Image card (kit imgC) */
.imgcard { position: relative; }
.imgcard__frame {
	position: relative; overflow: hidden; height: 100%;
	padding: 10px; border-radius: 22px;
	background: var(--c-mist); box-shadow: var(--ring-card), var(--sh-big);
}
.imgcard__frame > img, .imgcard__frame > picture > img, .imgcard__frame > .pattern {
	width: 100%; height: 100%; object-fit: cover; border-radius: 12px;
}
.imgcard__frame > picture { display: block; width: 100%; height: 100%; }
@media (min-width: 768px) {
	.imgcard__frame { padding: 14px; border-radius: 28px; }
	.imgcard__frame > img, .imgcard__frame > picture > img, .imgcard__frame > .pattern { border-radius: 14px; }
}

/* Pattern panel for pending visuals (kit phF style 0) */
.pattern {
	position: relative; overflow: hidden; min-height: 150px;
	background:
		repeating-linear-gradient(90deg, transparent 0 39px, rgba(255, 255, 255, .6) 39px 40px),
		repeating-linear-gradient(0deg, transparent 0 39px, rgba(255, 255, 255, .6) 39px 40px),
		var(--grad-well);
	box-shadow: var(--sh-inset);
	color: var(--c-blue);
}
@media (min-width: 768px) {
	.pattern { background:
		repeating-linear-gradient(90deg, transparent 0 59px, rgba(255, 255, 255, .6) 59px 60px),
		repeating-linear-gradient(0deg, transparent 0 59px, rgba(255, 255, 255, .6) 59px 60px),
		var(--grad-well); }
}
.pattern__line { position: absolute; inset: 0; width: 100%; height: 100%; }
.pattern__dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 3px; background: var(--c-blue); }
.pattern__tag {
	position: absolute; left: 12px; bottom: 12px; padding: 7px 12px; border-radius: 20px;
	background: rgba(255, 255, 255, .94); font: var(--fw-medium) 12px/16px var(--f-body); color: var(--ink-72);
}
@media (min-width: 768px) { .pattern__tag { left: 20px; bottom: 20px; } }

/* ---------------------------------------------------------------- Facts (kit factsRow) */
.facts {
	display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0;
	color: var(--c-ink); /* tiles are always light, also inside dark heroes */
}
.facts__item {
	display: flex; flex-direction: column; gap: 2px; padding: 14px;
	background: var(--c-mist); border-radius: 16px; box-shadow: var(--ring-card), var(--sh-soft);
}
.facts__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.facts__v { font: var(--fw-medium) 19px/25px var(--f-head); }
.facts__item.is-mlong .facts__v { font-size: 15px; }
.facts__l { margin: 0; font-size: 12px; line-height: 17px; color: var(--ink-60); }
@media (min-width: 768px) {
	.facts {
		display: flex; gap: 0; padding: 26px 8px; border-radius: 22px;
		background: var(--c-mist); box-shadow: var(--ring-card), var(--sh-soft);
	}
	.facts__item { flex: 1 1 0; gap: 4px; padding: 0 24px; background: none; box-shadow: none; border-radius: 0; }
	.facts__item + .facts__item { border-left: 1px solid var(--ink-10); }
	.facts__v, .facts__item.is-mlong .facts__v { font-size: 26px; line-height: 32px; letter-spacing: -.5px; }
	.facts__item.is-long .facts__v { font-size: 21px; }
	.facts__l { font-size: 14px; line-height: 20px; color: var(--ink-62); }
}

/* Mini facts inside hero copy (kit miniFacts), desktop only */
.minifacts { display: none; }
@media (min-width: 1024px) {
	.minifacts { display: flex; gap: 24px; padding-top: 10px; margin: 0; }
	.minifacts__item { width: 172px; display: flex; flex-direction: column; gap: 2px; }
	.minifacts__v { font: var(--fw-medium) 24px/30px var(--f-head); letter-spacing: -.3px; }
	.minifacts__v--m { font-size: 20px; }
	.minifacts__v--s { font-size: 16px; }
	.minifacts__l { margin: 0; font-size: 13px; line-height: 18px; opacity: .6; }
}

/* Note (kit note()) */
.note {
	display: flex; gap: 12px; padding: 14px 18px; border-radius: 14px;
	background: var(--c-lav-soft); box-shadow: inset 0 0 0 1px rgba(1, 14, 208, .22);
	font: var(--fw-medium) 13px/20px var(--f-body); color: var(--c-ink);
}
.note .ico { width: 20px; height: 20px; color: var(--c-blue); stroke-width: 1.6; }
@media (min-width: 768px) { .note { font-size: 14px; } }

/* Pause animations control (states sheet "Keyboard and motion controls") */
.motion-toggle {
	display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px;
	border-radius: var(--r-pill); background: var(--c-white); box-shadow: inset 0 0 0 1px var(--ink-10);
	font: var(--fw-medium) 12px/16px var(--f-body); color: var(--c-ink);
	transition: background-color var(--dur-fast);
}
.motion-toggle:hover { background: var(--c-lav-soft); }
.motion-toggle .ico { width: 10px; height: 10px; stroke-width: 2; }
.motion-toggle__play, .motion-toggle__on { display: none; }
.motion-toggle[aria-pressed="true"] .motion-toggle__play,
.motion-toggle[aria-pressed="true"] .motion-toggle__on { display: inline; }
.motion-toggle[aria-pressed="true"] .motion-toggle__pause,
.motion-toggle[aria-pressed="true"] .motion-toggle__off { display: none; }

/* ---------------------------------------------------------------- Hero search field (kit PATCH7, spec 7.5)
   Desktop: one white field (600 wide, r16, 1.5px Ink 14% stroke, soft shadow, padding 8 8 8 22)
   holding the icon, the input and the Search button. Phones: the field alone (padding 16),
   the Search button full width below it (gap 10). */
.hsearch { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.hsearch__box, .hsearch {
	--hs-sh: inset 0 0 0 1.5px rgba(10, 13, 49, .45), var(--sh-soft); /* field edge 3.1:1 (WCAG 1.4.11) */
}
.hsearch__box {
	position: relative; display: flex; align-items: center; gap: 10px;
	padding: 16px; border-radius: 16px; background: var(--c-white); box-shadow: var(--hs-sh);
}
.hsearch__ico { flex: none; width: 18px; height: 18px; stroke-width: 2; color: var(--ink-60); }
.hsearch__input {
	flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--c-ink);
	font: 16px/24px var(--f-body); -webkit-appearance: none; appearance: none;
}
.hsearch__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.hsearch__input::placeholder { color: var(--c-ink); opacity: 1; }
.hsearch--ph .hsearch__input::placeholder { opacity: .62; } /* Was .45 (3.0:1); .62 gives 5.4:1 on white (WCAG 1.4.3). */
.hsearch__input:focus, .hsearch__input:focus-visible { outline: none; }
/* Focus ring on the field (7.6) and a deeper shadow through a pseudo-element (7.5). */
.hsearch__box::after, .hsearch::after {
	content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
	box-shadow: var(--sh-big); opacity: 0; transition: opacity var(--dur-fast) var(--ease-out-quart);
}
.hsearch::after { display: none; }
.hsearch__box:focus-within { outline: 2px solid var(--c-blue); outline-offset: 3px; }
.hsearch__box:focus-within::after { opacity: 1; }
.hsearch__btn { width: 100%; justify-content: center; }
.btns--after-search { margin-top: 10px; }
@media (min-width: 768px) {
	.hsearch {
		position: relative; flex-direction: row; align-items: center; gap: 10px;
		width: min(600px, 100%); padding: 8px 8px 8px 22px; border-radius: 16px;
		background: var(--c-white); box-shadow: var(--hs-sh);
	}
	.hsearch__box { flex: 1; padding: 0; border-radius: 0; background: none; box-shadow: none; }
	.hsearch__box::after { display: none; }
	.hsearch::after { display: block; }
	.hsearch__box:focus-within { outline: none; }
	.hsearch:focus-within { outline: 2px solid var(--c-blue); outline-offset: 3px; }
	.hsearch:focus-within::after { opacity: 1; }
	.hsearch__input { font-size: 17px; }
	.hsearch__btn { width: auto; flex: none; }
	.btns--after-search { margin-top: 12px; }
}
.hero--centered .hsearch { margin-inline: auto; }
.on-dark .hsearch:focus-within, .on-dark .hsearch__box:focus-within { outline-color: var(--c-white); }
.hero__btns:has(.hsearch) { width: 100%; }
@media (min-width: 768px) { .hero--centered .btns--after-search { justify-content: center; } }
