/* ==========================================================================
   ebg choose - ebg h01: Layout H01 "Choose the Best" (.tj-choose-section,
   .choose-box). Centred head (dashed chip, 550px heading with one accent
   phrase), three white cards 24px apart; on hover a card turns accent, its
   text white, and the icon wobbles (ebg gelatine). The icons are Lucide
   masks on the card's ::before (lightbulb, award, headset), one per card
   modifier, instead of the ebg-icons glyphs. Cards swing in from the end
   with a 20deg turn as the row scrolls into view (ebg right-swipe, GSAP:
   x 10rem, rotateY -20deg, perspective 1200, all at once), done with
   .ebg-reveal-children (--ebg-reveal-from / -turn / -step).
   ========================================================================== */

@layer components {

	.ebg-chs {
		--ebg-chs-band: var(--ebg-surface-0);
		--ebg-chs-icon-size: 88px;
		--ebg-chs-icon-gap: 43px;

		inline-size: 100%;
		margin-block: 0;
		padding-block: var(--section-py);
		background-color: var(--ebg-chs-band);
		overflow-x: clip; /* the cards start 10rem to the end */

		& > .ebg-shell {
			margin-block: 0; /* Blocksy flow spacing */
		}

		& :where(p, h2, h3) { margin: 0; }
	}

	/* Darker band, for pages where the section next to it uses surface-0. */
	.ebg-chs.ebg-chs--alt { --ebg-chs-band: var(--ebg-surface-3); }

	.ebg-chs__head {
		display: flex;
		flex-direction: column;
		align-items: center;
		max-inline-size: 550px;
		margin-inline: auto;
		margin-block-end: 52px;
		text-align: center;

		& > * { margin-block: 0; }
	}

	.ebg-chs .ebg-chs__sub {
		--ebg-glyph: "\e90d"; /* ebg tji-box */
		--ebg-chip-line: #C9D1D1;

		margin-block-end: 20px;
		padding: 2px 10px;
		color: var(--ebg-heading-ink);
	}

	.ebg-chs .ebg-chs__title {
		color: var(--ebg-heading-ink);
		font-family: var(--font-display);
		font-size: 3rem;
		font-weight: 500;
		line-height: 1.125;
	}

	.ebg-chs__cards {
		--ebg-reveal-from: 10rem 0;
		--ebg-reveal-turn: y -20deg;
		--ebg-reveal-step: 0ms;

		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px;
		perspective: 1200px;

		& > * { margin-block: 0; }
	}

	.ebg-chs .ebg-chs__card {
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
		padding: 50px 28px 45px;
		border-radius: 10px;
		background-color: #FFFFFF;
		transform-origin: right center;
		transition: background-color 0.4s ease-in-out;

		& > * { margin-block: 0; }

		/* the icon */
		&::before {
			content: "";
			flex-shrink: 0;
			inline-size: var(--ebg-chs-icon-size);
			block-size: var(--ebg-chs-icon-size);
			margin-block-end: var(--ebg-chs-icon-gap);
			background-color: var(--ebg-accent);
			mask: var(--ebg-chs-icon) center / contain no-repeat;
			transition: background-color 0.4s ease-in-out;
		}

		&.ebg-chs__card--idea { --ebg-chs-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5'/%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3C/svg%3E"); }
		&.ebg-chs__card--award { --ebg-chs-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526'/%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3C/svg%3E"); }
		&.ebg-chs__card--support { --ebg-chs-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z'/%3E%3Cpath d='M21 16v2a4 4 0 0 1-4 4h-5'/%3E%3C/svg%3E"); }

		/* More Lucide icons (ISC): graduation-cap, calendar, mail, receipt-euro, mic, database. */
		&.ebg-chs__card--students { --ebg-chs-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 10v6M2 10l10-5 10 5-10 5z'/%3E%3Cpath d='M6 12v5c3 3 9 3 12 0v-5'/%3E%3C/svg%3E"); }
		&.ebg-chs__card--calendar { --ebg-chs-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18M8 14h.01M12 14h.01M16 14h.01M8 18h.01M12 18h.01'/%3E%3C/svg%3E"); }
		&.ebg-chs__card--mail { --ebg-chs-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='16' x='2' y='4' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E"); }
		&.ebg-chs__card--receipt { --ebg-chs-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z'/%3E%3Cpath d='M8 12h5M16 9.5a4 4 0 1 0 0 5.2'/%3E%3C/svg%3E"); }
		&.ebg-chs__card--voice { --ebg-chs-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2M12 19v3'/%3E%3C/svg%3E"); }
		&.ebg-chs__card--data { --ebg-chs-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cellipse cx='12' cy='5' rx='9' ry='3'/%3E%3Cpath d='M3 5v14a9 3 0 0 0 18 0V5'/%3E%3Cpath d='M3 12a9 3 0 0 0 18 0'/%3E%3C/svg%3E"); }

		&:hover {
			background-color: var(--ebg-accent);

			&::before {
				background-color: var(--ebg-on-accent);
			}

			& :is(.ebg-chs__card-title, .ebg-chs__desc) { color: var(--ebg-on-accent); }
		}
	}

	.ebg-chs .ebg-chs__card-title {
		margin-block-end: 20px;
		color: var(--ebg-heading-ink);
		font-family: var(--font-display);
		font-size: 1.5rem;
		font-weight: 600;
		line-height: 1.333;
		transition: color 0.4s ease-in-out;
	}

	.ebg-chs .ebg-chs__desc {
		color: var(--ebg-ink-2);
		font-size: var(--text-base);
		line-height: var(--lh-body);
		transition: color 0.4s ease-in-out;
	}

	/* ebg breakpoints: 1399 / 1200 / 1024 / 767. */
	@media (max-width: 1399px) {
		.ebg-chs { --ebg-chs-icon-gap: 30px; }
		.ebg-chs .ebg-chs__card { padding: 40px 20px; }
	}

	@media (max-width: 1200px) {
		.ebg-chs { --ebg-chs-icon-gap: 45px; }
		.ebg-chs .ebg-chs__card { padding: 30px 20px; }
		.ebg-chs .ebg-chs__card-title { font-size: 1.25rem; }
	}

	@media (max-width: 1024px) {
		.ebg-chs {
			--ebg-chs-icon-size: 65px;
			--ebg-chs-icon-gap: 20px;
		}

		.ebg-chs__head { margin-block-end: 35px; }
		.ebg-chs .ebg-chs__sub { margin-block-end: 15px; font-size: 0.8125rem; }
		.ebg-chs .ebg-chs__title { font-size: 2.5rem; }

		.ebg-chs__cards {
			grid-template-columns: minmax(0, 1fr);
			max-inline-size: 720px;
			margin-inline: auto;
		}

		.ebg-chs .ebg-chs__card { padding: 40px 20px; }
		.ebg-chs .ebg-chs__card-title { margin-block-end: 10px; font-size: 1.125rem; }
	}

	@media (max-width: 767px) {
		.ebg-chs .ebg-chs__title { font-size: 1.875rem; }
		.ebg-chs .ebg-chs__card { min-block-size: 250px; padding: 30px 15px; }
	}

	@media (prefers-reduced-motion: reduce) {
		.ebg-chs .ebg-chs__card,
		.ebg-chs .ebg-chs__card::before,
		.ebg-chs .ebg-chs__card-title,
		.ebg-chs .ebg-chs__desc { transition: none; }

		.ebg-chs .ebg-chs__card:hover::before { animation: none; }
	}
}
