/* GENERATED by tools/gen_ltr.js from motion.css (theme 3.82). Do not edit: change the RTL file and re-run. */
/* 3.77 motion pack: section illustrations, icon redraw, 3D book covers, calmer reveal.
 * Everything is still with prefers-reduced-motion. Accent = #41C48D (theme 3.60+). */

/* ---------- 1. Section illustrations (inc/illustrations.php) ---------- */
.ia { display: block; width: 100%; height: 100%; overflow: visible; --ia-hi: #FFFDF8; --ia-ink: #0D0D0D; }
.ia :is(.ia-ln, .ia-dr, .ia-ax, .ia-edge, .ia-hi-st, .ia-ink) { fill: none; stroke: currentColor; stroke-width: 2.2; }
.ia .ia-ln.ia-thick { stroke-width: 3; }
.ia .ia-soft { opacity: .45; }
.ia .ia-ax { stroke-width: 1.4; opacity: .5; }
.ia .ia-dash { stroke-dasharray: 3 5; opacity: .55; }
.ia .ia-edge { stroke-width: 1.2; opacity: .35; }
.ia .ia-hi-st { stroke: var(--ia-hi); stroke-width: 2.6; }
.ia .ia-ink { stroke: var(--ia-ink); }
.ia .ia-band { fill: var(--ia-hi); fill-opacity: .35; stroke: none; }
.ia :is(.ia-bar, .ia-node) { fill: currentColor; stroke: none; }
.ia .ia-node { fill: var(--ia-hi); stroke: currentColor; stroke-width: 2; }
.ia .ia-hi { fill: var(--ia-hi); stroke: currentColor; stroke-width: 2; }
.ia circle.ia-hi:not([r="4.5"]) { stroke-width: 1.6; }
.ia .ia-tx { fill: currentColor; stroke: none; font: 900 22px/1 Cairo, system-ui, sans-serif; }
.ia .ia-tx.ia-hi-tx { fill: var(--ia-hi); paint-order: stroke; stroke: currentColor; stroke-width: 2.4px; }
.ia .ia-tx.ia-sm { font-size: 11px; font-weight: 800; }
.ia :is(.ia-pop, .ia-hop, .ia-node, .ia-hi, .ia-bar, .ia-blinky) { transform-box: fill-box; transform-origin: center; }
.ia :is(.ia-grow) { transform-box: fill-box; transform-origin: 0% 50%; }
.ia :is(.ia-rise) { transform-box: fill-box; transform-origin: 50% 100%; }

@keyframes iaDraw { 0% { stroke-dashoffset: 100; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes iaPop { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.22); } }
@keyframes iaHop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }
@keyframes iaGrow { 0% { transform: scaleX(0); } 40%, 100% { transform: scaleX(1); } }
@keyframes iaRise { 0% { transform: scaleY(.15); } 45%, 100% { transform: scaleY(1); } }
@keyframes iaBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes iaEyes { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes iaEdge { 0%, 100% { opacity: .25; } 40% { opacity: .9; stroke: var(--ia-hi); } }
@keyframes iaPulse { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.25); } }
@keyframes iaSwarm { 0% { transform: translate(var(--dx), var(--dy)); } 60%, 100% { transform: translate(0, 0); } }
@keyframes iaLayer { 0%, 100% { fill: transparent; } 30%, 55% { fill: var(--ia-hi); } }
@keyframes iaSweep { to { transform: rotate(-360deg); } }
@keyframes iaBlip { 0%, 70%, 100% { opacity: .2; transform: scale(.7); } 78% { opacity: 1; transform: scale(1.3); } }
@keyframes iaScan { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-44px, -8px); } 66% { transform: translate(-22px, 12px); } }
@keyframes iaSlide { 0%, 20%, 100% { transform: translate(0, 0); } 50%, 70% { transform: translate(-14px, -2px); } }
@keyframes iaFlip { 0%, 30% { transform: scaleX(1); } 55% { transform: scaleX(0); } 56%, 100% { transform: scaleX(0); } }
@keyframes iaClimb { 0% { transform: translate(0, 0); } 25% { transform: translate(-24px, -12px); } 50% { transform: translate(-48px, -24px); } 75%, 90% { transform: translate(-72px, -36px); } 100% { transform: translate(0, 0); } }
@keyframes iaSwing { 0%, 100% { transform: rotate(12deg); } 50% { transform: rotate(-12deg); } }
@keyframes iaRays { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes iaOrbit { to { transform: rotate(-360deg); } }
@keyframes iaTilt { 0%, 100% { transform: rotate(7deg); } 45%, 60% { transform: rotate(0deg); } }

/* Static (default, reduced motion, off-screen): the finished picture. */
.ia .ia-dr { stroke-dasharray: 100; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
	.ia.is-vis .ia-dr { animation: iaDraw 3.6s ease-in-out var(--d, 0s) infinite; }
	.ia.is-vis .ia-pop { animation: iaPop 2.8s ease-in-out var(--d, 0s) infinite; }
	.ia.is-vis .ia-hop { animation: iaHop 1.6s ease-in-out var(--d, 0s) infinite; }
	.ia.is-vis .ia-grow { animation: iaGrow 3.2s cubic-bezier(.3,.7,.3,1) var(--d, 0s) infinite; }
	.ia.is-vis .ia-rise { animation: iaRise 3.2s cubic-bezier(.3,.7,.3,1) var(--d, 0s) infinite alternate; }
	.ia.is-vis .ia-blink { animation: iaBlink 1s steps(1) infinite; }
	.ia.is-vis .ia-blinky { animation: iaEyes 4s ease-in-out infinite; }
	.ia.is-vis .ia-edge { animation: iaEdge 2.4s ease-in-out var(--d, 0s) infinite; }
	.ia.is-vis .ia-pulse { animation: iaPulse 2.4s ease-in-out var(--d, 0s) infinite; }
	.ia.is-vis .ia-swarm { animation: iaSwarm 3.4s cubic-bezier(.4,.1,.3,1) var(--d, 0s) infinite alternate; }
	.ia.is-vis .ia-layer { animation: iaLayer 2.8s ease-in-out var(--d, 0s) infinite; }
	.ia.is-vis .ia-sweep { transform-origin: 60px 32px; animation: iaSweep 3s linear infinite; }
	.ia.is-vis .ia-blip { animation: iaBlip 3s ease-out var(--d, 0s) infinite; }
	.ia.is-vis .ia-scan { animation: iaScan 6s ease-in-out infinite; }
	.ia.is-vis .ia-slide { animation: iaSlide 3.6s ease-in-out infinite; }
	.ia.is-vis .ia-flip { transform-box: view-box; transform-origin: 60px 32px; animation: iaFlip 3.6s ease-in-out infinite; }
	.ia.is-vis .ia-climb { animation: iaClimb 4.8s ease-in-out infinite; }
	.ia.is-vis .ia-swing { transform-box: fill-box; transform-origin: 50% 100%; animation: iaSwing 2.4s ease-in-out infinite; }
	.ia.is-vis .ia-rays { animation: iaRays 1.8s ease-in-out infinite; }
	.ia.is-vis .ia-orbit { transform-origin: 60px 32px; animation: iaOrbit 6s linear infinite; }
	.ia.is-vis .ia-orbit.ia-slow { animation-duration: 9s; }
	.ia.is-vis .ia-tilt { transform-origin: 60px 16px; animation: iaTilt 4s ease-in-out infinite; }
	.ia.is-vis .ia-loop { animation-duration: 2.4s; }
}

/* Inside the bento cards: the framed box grows into an illustration panel. */
.bento-ico.has-art { width: 104px; height: 60px; padding: 6px 8px; }
.bento-ico.has-art .ia { color: #0D0D0D; --ia-hi: #FFFDF8; }
.bento--w .bento-ico.has-art .ia { color: #41C48D; --ia-hi: #FFFDF8; --ia-ink: #0D0D0D; }
.bento--xl .bento-ico.has-art, .bento-lead .bento-ico.has-art { width: 176px; height: 96px; padding: 10px 12px; }
html body a.bento-card:hover .bento-ico.has-art { box-shadow: -3px 3px 0 currentColor; }
@media (max-width: 760px) {
	.bento-ico.has-art { width: 92px; height: 52px; }
	.bento--xl .bento-ico.has-art, .bento-lead .bento-ico.has-art { width: 132px; height: 72px; }
}

/* ---------- 2. Line icons redraw themselves on hover (same stroke style everywhere) ---------- */
@keyframes idIcoDraw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: no-preference) and (hover: hover) {
	:is(a, button):hover > .id-ico > *, :is(a, button):hover .jr-ico .id-ico > *, :is(a, button):hover .bento-ico .id-ico > *,
	.drawer-item:hover .id-ico > * { stroke-dasharray: 100; animation: idIcoDraw .8s ease-out both; }
}

/* ---------- 3. Book covers in a 3D frame (assets/js/motion.js sets --rx/--ry/--gx/--gy on .card-thumb) ---------- */
.book-card .card-thumb { perspective: 900px; }
.book-card .bk3d {
	position: relative; display: block; height: 100%; max-width: 100%; margin-inline: auto; width: fit-content;
	transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
	transition: transform .5s cubic-bezier(.2,.7,.2,1);
	/* page block under the cover, on the open side (left: Arabic books bind on the right) */
	box-shadow: 3px 3px 0 #FFFDF8, 4px 4px 0 #0D0D0D, 7px 7px 0 #FFFDF8, 8px 8px 0 #0D0D0D;
}
.book-card .card-thumb:not(.has-ac) .bk3d { margin-block: 6% ; height: 88%; }
.book-card .bk3d > img { display: block; width: auto !important; height: 100% !important; max-width: 100%; object-fit: contain; transform: none !important; }
.book-card .card-thumb.has-ac .bk3d { width: 100%; }
.book-card .bk3d > .ac { height: 100%; width: 100%; }
.book-card .bk3d::before { /* spine shading on the binding side */
	content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 8%; z-index: 2; pointer-events: none;
	background: linear-gradient(to right, rgba(13,13,13,.34), rgba(255,255,255,.12) 55%, transparent);
}
.book-card .bk3d::after { /* light that follows the pointer */
	content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .4s;
	background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255,255,255,.4), transparent 58%);
}
.book-card.is-tilt .bk3d { transition: transform .12s linear; }
.book-card.is-tilt .bk3d::after { opacity: 1; }
html[data-theme="dark"] .book-card .bk3d { box-shadow: 3px 3px 0 #111, 4px 4px 0 #41C48D, 7px 7px 0 #111, 8px 8px 0 #41C48D; }
@media (prefers-reduced-motion: reduce) {
	.book-card .bk3d { transform: none !important; transition: none !important; }
	.book-card .bk3d::after { display: none; }
}

/* ---------- 4. Calmer scroll reveal (design.js adds .rv / .rv-in) ---------- */
html.rv-on .rv { opacity: 0; transform: translateY(26px) scale(.985); }
html.rv-on .rv.rv-in { opacity: 1; transform: none; transition: opacity .8s ease var(--rv-d, 0ms), transform .9s cubic-bezier(.16,.84,.3,1) var(--rv-d, 0ms); }
@media (prefers-reduced-motion: reduce) {
	html.rv-on .rv { opacity: 1 !important; transform: none !important; }
}

/* 3.77.2: cards grow with their text, so the bottom button is never cut off (bento rows were a fixed height). */
html body .bento { grid-auto-rows: minmax(188px, auto); }
@media (max-width: 980px) { html body .bento { grid-auto-rows: minmax(166px, auto); } }
