/**
 * Redix Academy: the opening of the course catalog and of ארגז הכלים ("כותרת עמוד" widget,
 * includes/page-hero.php). Text on the right, a picture drawn in code on the left; on a phone, the picture
 * goes under the text, smaller.
 */

.rac-ph {
	--ph-ink: #f2f6ff;
	--ph-text-2: #c2cde8;
	--ph-text-3: #8b99bc;
	--ph-cyan: #2fe0e6;
	--ph-cyan-2: #7df0f4;
	--ph-blue: #8aa4ff;
	--ph-line: rgba(194, 205, 232, .12);
	--ph-glass: rgba(16, 26, 60, .62);
	--ph-ease: cubic-bezier(.22, 1, .36, 1);
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
	align-items: center;
	gap: clamp(28px, 5vw, 76px);
	padding: clamp(28px, 5vw, 72px) 0 clamp(20px, 3vw, 40px);
	font-family: var(--ra-font, Assistant, sans-serif);
}

/* The light behind: two soft glows and a faint grid that fades out at the edges. */
.rac-ph-bg {
	position: absolute;
	z-index: -1;
	top: -70px;
	bottom: -20px;
	/* Out to the screen's sides, but never past them (the +8px leaves room for a scrollbar). */
	inset-inline: max(-8vw, calc((100% - 100vw) / 2 + 8px));
	pointer-events: none;
	/* "closest-side": each glow fades out before it reaches the box's edge, so no edge ever shows. */
	background:
		radial-gradient(ellipse closest-side at 30% 52%, rgba(47, 224, 230, .15), transparent),
		radial-gradient(ellipse closest-side at 74% 40%, rgba(110, 132, 255, .13), transparent);
}
.rac-ph-bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(194, 205, 232, .055) 1px, transparent 1px),
		linear-gradient(90deg, rgba(194, 205, 232, .055) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: radial-gradient(ellipse 70% 75% at 35% 45%, #000 20%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 75% at 35% 45%, #000 20%, transparent 75%);
}

/* ---------------------------------------------------------------- text */
.rac-ph-k {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	color: var(--ph-cyan-2);
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .02em;
}
.rac-ph-k::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: currentColor; }
.rac-ph-title {
	margin: 14px 0 18px;
	color: var(--ph-ink);
	font-family: inherit;
	font-size: clamp(2.6rem, 1.3rem + 4.2vw, 4.75rem);
	font-weight: 800;
	line-height: 1.04;
	letter-spacing: -.035em;
	text-wrap: balance;
}
.rac-ph-hl {
	background: linear-gradient(100deg, var(--ph-blue) 0%, var(--ph-cyan) 55%, var(--ph-cyan-2) 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.rac-ph-lead {
	max-width: 54ch;
	margin: 0;
	color: var(--ph-text-2);
	font-size: clamp(1.08rem, 1rem + .35vw, 1.28rem);
	line-height: 1.65;
	text-wrap: pretty;
}
.rac-ph-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 30px 0 0;
	padding: 0;
	list-style: none;
}
.rac-ph-stats li {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 132px;
	padding: 14px 18px 13px;
	border: 1px solid var(--ph-line);
	border-radius: 16px;
	background: var(--ph-glass);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}
.rac-ph-stats b {
	color: var(--ph-ink);
	font-size: 27px;
	font-weight: 800;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
	direction: ltr;
	unicode-bidi: isolate;
	text-align: right;
}
.rac-ph-stats li:first-child b { color: var(--ph-cyan-2); }
.rac-ph-stats span { color: var(--ph-text-3); font-size: 14.5px; line-height: 1.4; }

/* ---------------------------------------------------------------- picture: courses */
.rac-ph-visual { position: relative; min-width: 0; }
.rac-ph-stack { position: relative; width: min(100%, 540px); aspect-ratio: 4 / 3; margin-inline: auto; }
.rac-ph-card {
	position: absolute;
	border: 1px solid rgba(194, 205, 232, .14);
	border-radius: 24px;
	background: linear-gradient(160deg, #142050 0%, #0b1330 100%);
	box-shadow: 0 40px 80px -36px rgba(0, 0, 0, .95);
}
/* The cards have the cover's own shape (16:9), so the cover is never cut. */
.rac-ph-card { aspect-ratio: 16 / 9; }
.rac-ph-card--3 { top: 6%; right: 7%; width: 84%; transform: rotate(-8deg); opacity: .4; }
.rac-ph-card--2 { top: 12%; right: 3%; width: 88%; transform: rotate(-4deg); opacity: .65; }
.rac-ph-card--1 {
	top: 20%;
	right: 0;
	width: 92%;
	overflow: hidden;
	transform: rotate(1.5deg);
	border-color: rgba(125, 240, 244, .28);
	box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .95), 0 0 0 1px rgba(47, 224, 230, .06), 0 0 60px -10px rgba(47, 224, 230, .22);
}
.rac-ph-card--1 img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rac-ph-cap {
	position: absolute;
	z-index: 1;
	top: 14px;
	left: 14px;
}
.rac-ph-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(6, 12, 32, .82);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(125, 240, 244, .35);
	color: var(--ph-cyan-2);
	font-size: 13px;
	font-weight: 800;
}
.rac-ph-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ph-cyan); box-shadow: 0 0 10px var(--ph-cyan); }

/* Small glass notes floating at the cards' edges. */
.rac-ph-float {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px 10px 14px;
	border: 1px solid rgba(194, 205, 232, .16);
	border-radius: 14px;
	background: rgba(14, 22, 52, .82);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9);
	color: var(--ph-ink);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}
.rac-ph-float--a { top: 8%; left: -2%; }
.rac-ph-float--b { bottom: 4%; right: 6%; }
.rac-ph-play {
	position: relative;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--ph-cyan);
	box-shadow: 0 0 16px rgba(47, 224, 230, .55);
}
.rac-ph-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 52%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 5px 0 5px 8px;
	border-color: transparent transparent transparent #041018;
}
.rac-ph-dots { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.rac-ph-dots i { width: 6px; border-radius: 3px; background: rgba(194, 205, 232, .25); }
.rac-ph-dots i:nth-child(1) { height: 7px; background: var(--ph-cyan); }
.rac-ph-dots i:nth-child(2) { height: 11px; background: var(--ph-cyan); }
.rac-ph-dots i:nth-child(3) { height: 15px; }
.rac-ph-dots i:nth-child(4) { height: 18px; }

/* ---------------------------------------------------------------- picture: tutorials */
.rac-ph-player { position: relative; width: min(100%, 540px); aspect-ratio: 6 / 5; margin-inline: auto; }
.rac-ph-screen {
	position: absolute;
	top: 14%;
	right: 4%;
	left: 4%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border: 1px solid rgba(125, 240, 244, .26);
	border-radius: 24px;
	background:
		radial-gradient(60% 80% at 80% 10%, rgba(110, 132, 255, .35), transparent 70%),
		radial-gradient(60% 70% at 15% 90%, rgba(47, 224, 230, .28), transparent 70%),
		linear-gradient(160deg, #142050 0%, #0a1230 100%);
	box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .95), 0 0 60px -12px rgba(47, 224, 230, .22);
}
.rac-ph-lines { position: absolute; top: 18%; right: 9%; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; width: 46%; }
.rac-ph-lines i { display: block; height: 10px; border-radius: 6px; background: rgba(242, 246, 255, .85); }
.rac-ph-lines i:nth-child(1) { width: 100%; }
.rac-ph-lines i:nth-child(2) { width: 72%; }
.rac-ph-lines i:nth-child(3) { width: 40%; height: 7px; background: rgba(125, 240, 244, .6); }
.rac-ph-bigplay {
	position: absolute;
	top: 50%;
	left: 30%;
	width: 72px;
	height: 72px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: var(--ph-cyan);
	box-shadow: 0 0 0 10px rgba(47, 224, 230, .14), 0 0 40px rgba(47, 224, 230, .55);
}
.rac-ph-bigplay::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 53%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 12px 0 12px 19px;
	border-color: transparent transparent transparent #041018;
}
.rac-ph-track {
	position: absolute;
	right: 10%;
	left: 10%;
	top: calc(14% + 54%);
	height: 6px;
	border-radius: 999px;
	background: rgba(194, 205, 232, .14);
}
.rac-ph-track span {
	position: absolute;
	inset-block: 0;
	right: 0;
	width: 58%;
	border-radius: inherit;
	background: linear-gradient(270deg, var(--ph-cyan-2), var(--ph-cyan));
	box-shadow: 0 0 14px rgba(47, 224, 230, .6);
}
.rac-ph-track span::after {
	content: "";
	position: absolute;
	top: 50%;
	left: -7px;
	width: 14px;
	height: 14px;
	transform: translateY(-50%);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 12px rgba(125, 240, 244, .9);
}
.rac-ph-topic {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	border: 1px solid rgba(194, 205, 232, .16);
	border-radius: 999px;
	background: rgba(14, 22, 52, .84);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	box-shadow: 0 16px 36px -18px rgba(0, 0, 0, .9);
	color: var(--ph-ink);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
}
.rac-ph-topic b {
	display: inline-grid;
	place-items: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: rgba(47, 224, 230, .16);
	color: var(--ph-cyan-2);
	font-size: 12px;
}
.rac-ph-topic--a { top: 4%; right: 10%; }
.rac-ph-topic--b { top: 32%; left: -3%; }
.rac-ph-topic--c { bottom: 6%; right: 2%; }
.rac-ph-topic--d { bottom: 12%; left: 16%; }

/* ---------------------------------------------------------------- picture: ארגז הכלים
   The player, with a tool card at its top (logo, name, price) and the newest article from the blog at its
   bottom. The logo tile and the price pill come from rac-toolbox.css, loaded by the toolbox widget. */
.rac-ph-tool { top: 0; right: 0; gap: 12px; padding: 10px 16px 10px 12px; }
.rac-ph-tool .rac-tool-logo { width: 42px; height: 42px; border-radius: 12px; font-size: 15px; }
.rac-ph-tool .rac-tool-logo.has-img { padding: 6px; }
.rac-ph-tool-text { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.rac-ph-tool-text b { color: var(--ph-ink); font-size: 15px; font-weight: 800; line-height: 1.2; }
.rac-ph-tool .rac-tprice { padding: 2px 9px; font-size: 12px; }
.rac-ph-art {
	bottom: 2%;
	left: -2%;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	max-width: 250px;
	padding: 12px 16px;
	white-space: normal;
}
.rac-ph-art-k { color: #ffd27a; font-size: 12px; font-weight: 800; }
.rac-ph-art-t {
	display: -webkit-box;
	overflow: hidden;
	color: var(--ph-ink);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* ---------------------------------------------------------------- arrival (only the numbers and the picture) */
@media (prefers-reduced-motion: no-preference) {
	html:not(.no-motion) .rac-ph-stats li { animation: rac-ph-rise .7s var(--ph-ease) both; animation-delay: calc(120ms + var(--i, 0) * 80ms); }
	html:not(.no-motion) .rac-ph-visual { animation: rac-ph-in .9s var(--ph-ease) both .1s; }
	html:not(.no-motion) .rac-ph-float,
	html:not(.no-motion) .rac-ph-topic { animation: rac-ph-rise .7s var(--ph-ease) both .45s, rac-ph-drift 7s ease-in-out infinite 1.2s; }
	html:not(.no-motion) .rac-ph-float--b,
	html:not(.no-motion) .rac-ph-art,
	html:not(.no-motion) .rac-ph-topic--c { animation-delay: .6s, 2s; }
	html:not(.no-motion) .rac-ph-topic--b,
	html:not(.no-motion) .rac-ph-topic--d { animation-delay: .7s, 2.8s; }
	/* The chips blur what is behind them, so while they move that blur is drawn again on every frame; they hold
	   still while the page scrolls (html.rac-scrolling, redix-academy.js). */
	html.rac-scrolling .rac-ph-float,
	html.rac-scrolling .rac-ph-topic { animation-play-state: paused; }
}
@keyframes rac-ph-rise {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}
@keyframes rac-ph-in {
	from { opacity: 0; transform: translateY(18px) scale(.98); }
	to { opacity: 1; transform: none; }
}
@keyframes rac-ph-drift {
	0%, 100% { translate: 0 0; }
	50% { translate: 0 -6px; }
}

/* ---------------------------------------------------------------- tablet and phone */
@media (max-width: 1024px) {
	.rac-ph { grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
	.rac-ph-float--a { left: 0; }
	.rac-ph-topic--b { left: 0; }
}
@media (max-width: 767px) {
	.rac-ph { grid-template-columns: 1fr; gap: 26px; padding-top: 22px; }
	.rac-ph-stats { gap: 10px; margin-top: 24px; }
	.rac-ph-stats li { flex: 1 1 0; min-width: 0; padding: 12px 14px; }
	.rac-ph-stats b { font-size: 23px; }
	.rac-ph-stats span { font-size: 13px; }
	.rac-ph-stack,
	.rac-ph-player { width: min(100%, 400px); }
	.rac-ph-float,
	.rac-ph-topic { font-size: 13px; padding: 8px 12px; }
	.rac-ph-topic--d { display: none; }
	.rac-ph-art { left: 0; max-width: 200px; padding: 10px 12px; }
	.rac-ph-tool .rac-tool-logo { width: 34px; height: 34px; font-size: 13px; }
	.rac-ph-bigplay { width: 56px; height: 56px; }
}
@media (max-width: 400px) {
	.rac-ph-stats li:nth-child(3) span { font-size: 12.5px; }
}
