/*
 * Founder's v-card (/amecc/), in the site's own look: white page, red logo
 * bar, the photo in a rounded panel under the hero wash, a red pill for the
 * main action, and white hairline cards with blush icon chips.
 * Scoped to .am so nothing leaks.
 */

body.haibo-amecc {
	background: #f7f3f4;
}

.am {
	--am-red: #ff0042;
	--am-red-deep: #d6003a;
	--am-blush: #ffe4eb;
	--am-wine: #2a0a16;
	--am-ink: #1c1c1c;
	--am-grey: #6b6669;
	--am-line: #ece6e8;
	--am-warm: #f7f3f4;
	--am-paper: #fff;
	--am-ease: cubic-bezier(0.22, 1, 0.36, 1);
	min-height: 100vh;
	min-height: 100svh;
	display: grid;
	place-items: start center;
	padding: clamp(0px, 4vw, 3rem) 0 clamp(1.5rem, 5vw, 3rem);
	color: var(--am-ink);
	font-family: Nunito, ui-rounded, system-ui, sans-serif;
	overflow-x: clip;
}

.am *,
.am *::before,
.am *::after {
	box-sizing: border-box;
}

.am p,
.am h1,
.am dl,
.am dd,
.am ul,
.am figure {
	margin: 0;
	padding: 0;
}

.am a {
	color: inherit;
	text-decoration: none;
}

.am-ico {
	width: 1.25rem;
	height: 1.25rem;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Card ------------------------------------------------------------------ */

.am-card {
	width: min(100%, 440px);
	background: var(--am-paper);
	border-radius: 32px;
	overflow: hidden;
	animation: am-rise 0.7s var(--am-ease) both;
}

@keyframes am-rise {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
}

/* Top bar: the site header in miniature ------------------------------------ */

.am-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1rem 0.75rem 1.5rem;
}

.am-top__brand .haibo-logo {
	display: block;
	width: auto;
	height: 30px;
}

.am-top__site {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	color: var(--am-ink);
	transition: color 0.2s;
}

.am-top__site:hover,
.am-top__site:focus-visible {
	color: var(--am-red);
}

/* Hero: photo panel with the site's wash ----------------------------------- */

.am-hero {
	position: relative;
	margin: 0 1rem;
	aspect-ratio: 4 / 4.4;
	border-radius: 32px;
	overflow: hidden;
	isolation: isolate;
	background: var(--am-wine);
}

.am-hero__photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 30%;
	z-index: -2;
}

.am-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(to top, rgba(20, 6, 12, 0.85) 0%, rgba(20, 6, 12, 0.4) 40%, rgba(20, 6, 12, 0) 65%),
		linear-gradient(125deg, rgba(42, 10, 22, 0.35), rgba(255, 0, 66, 0.12) 60%, transparent);
}

.am-hero__id {
	position: absolute;
	left: 1.5rem;
	right: 1.5rem;
	bottom: 1.4rem;
	color: #fff;
}

.am .am-name {
	font-size: clamp(1.9rem, 8vw, 2.25rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: #fff;
}

.am-role {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.4rem !important;
	font-size: 1rem;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.9);
}

.am-role::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--am-red);
	box-shadow: 0 0 0 4px rgba(255, 0, 66, 0.25);
}

/* Body ------------------------------------------------------------------- */

.am-body {
	display: grid;
	gap: 1.25rem;
	padding: 1.5rem 1.5rem 0.5rem;
}

.am-lede {
	font-size: 1.05rem;
	line-height: 1.5;
	color: var(--am-grey);
}

.am-quick {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.6rem;
}

.am-quick__btn {
	display: grid;
	justify-items: center;
	gap: 0.4rem;
	padding: 0.5rem 0.5rem 0.4rem;
	font-size: 0.9rem;
	font-weight: 800;
	transition: color 0.2s, transform 0.3s var(--am-ease);
}

.am-quick__btn .am-ico {
	color: var(--am-red);
}

.am-quick__btn .am-ico {
	width: 1.5rem;
	height: 1.5rem;
}

.am-quick__btn:hover,
.am-quick__btn:focus-visible {
	color: var(--am-red);
	transform: translateY(-2px);
}

.am-save {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	padding: 1rem 1.25rem;
	border-radius: 100px;
	background: var(--am-red);
	color: #fff !important;
	font-size: 1.05rem;
	font-weight: 800;
	transition: background-color 0.2s, transform 0.3s var(--am-ease);
}

.am-save:hover,
.am-save:focus-visible {
	background: var(--am-red-deep);
	transform: translateY(-2px);
}

.am-details {
	display: grid;
}

.am-details div {
	display: grid;
	grid-template-columns: 5rem 1fr;
	align-items: baseline;
	gap: 0.75rem;
	padding: 0.45rem 0;
}

.am-details dt {
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--am-grey);
}

.am-details dd {
	font-size: 1rem;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.am-details a:hover,
.am-details a:focus-visible {
	color: var(--am-red);
}

/* Links: the ecosystem cards in a list ------------------------------------- */

.am-links {
	display: grid;
	gap: 0.15rem;
	list-style: none;
}

.am-link {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0.65rem 0;
	transition: transform 0.4s var(--am-ease);
}

.am-link__icon {
	display: grid;
	place-items: center;
	width: 1.5rem;
	height: 1.5rem;
	flex: none;
	color: var(--am-red);
}

.am-link__text {
	display: grid;
	gap: 0.1rem;
	flex: 1;
	min-width: 0;
}

.am-link__text strong {
	font-size: 1rem;
	font-weight: 800;
}

.am-link__text small {
	font-size: 0.85rem;
	color: var(--am-grey);
}

.am-link__go {
	color: var(--am-grey);
	transition: color 0.2s, transform 0.3s var(--am-ease);
}

.am-link:hover,
.am-link:focus-visible {
	transform: translateX(3px);
}

.am-link:hover .am-link__go,
.am-link:focus-visible .am-link__go {
	color: var(--am-red);
	transform: translate(2px, -2px);
}

/* Social ------------------------------------------------------------------ */

.am-social {
	list-style: none;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem;
}

.am-social a {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.5rem 0;
	font-size: 0.92rem;
	font-weight: 800;
	transition: color 0.2s;
}

.am-social a span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.am-social .am-ico {
	color: var(--am-red);
	width: 1.1rem;
	height: 1.1rem;
}

.am-social a:hover,
.am-social a:focus-visible {
	color: var(--am-red);
}

/* QR + share ---------------------------------------------------------------- */

.am-tools {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem;
	align-items: start;
}

.am-tool {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0.6rem 0;
	border: 0;
	background: transparent;
	color: var(--am-ink);
	font: inherit;
	font-weight: 800;
	cursor: pointer;
	list-style: none;
	transition: background-color 0.2s, color 0.2s;
}

.am-tool::-webkit-details-marker {
	display: none;
}

.am-tool:hover,
.am-tool:focus-visible,
.am-qr[open] .am-tool {
	color: var(--am-red);
}

/* The panel opens under both buttons; Share keeps its place beside QR. */
.am-qr__panel {
	width: calc(200% + 0.6rem);
	display: grid;
	justify-items: center;
	gap: 0.6rem;
	margin-top: 0.75rem !important;
	padding: 0.5rem 0 0;
	font-weight: 700;
}

.am-qr__panel img {
	width: min(220px, 64vw);
	height: auto;
}

.am-qr__panel figcaption {
	font-size: 0.9rem;
	color: var(--am-grey);
}

.am-foot {
	padding: 1.25rem 1.5rem 1.5rem;
	text-align: center;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--am-red);
}

.am a:focus-visible,
.am button:focus-visible,
.am summary:focus-visible {
	outline: 3px solid var(--am-red);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.am-card {
		animation: none;
	}

	.am * {
		transition: none !important;
	}
}

/* Phones: the card is the page. */
@media (max-width: 480px) {
	body.haibo-amecc {
		background: #fff;
	}

	.am {
		padding: 0;
	}

	.am-card {
		width: 100%;
		border-radius: 0;
		box-shadow: none;
		min-height: 100svh;
	}
}
