/* Celestial Yak — homepage only. A deck of posters that fans across the hero and deals into a row on scroll.
   Loaded on the front page after celestial-yak-theme.css. JS (celestial-home.js) writes --p (0→1 scroll) and --mx (pointer). */

body.home {
	--display: 'Inter Tight', 'Montserrat', 'Segoe UI', system-ui, sans-serif;
	--glow-pink: #FF4FD8;
}

/* ---------- deck hero ---------- */
.cy-deck { --p: 0; --mx: 0; --hdr: 78px; position: relative; background: #05050A; overflow-x: clip; }
.cy-deck.is-live { height: 230vh; }
.cy-deck__pin { position: relative; height: calc(100vh - var(--hdr)); height: calc(100svh - var(--hdr)); min-height: 560px; overflow: hidden; }
.cy-deck.is-live .cy-deck__pin { position: sticky; top: var(--hdr); }

/* grid floor + neon bloom */
.cy-deck__bg { position: absolute; inset: 0; pointer-events: none; }
.cy-deck__bg::before { content: ''; position: absolute; inset: 0;
	background-image: linear-gradient(rgba(245, 240, 232, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(245, 240, 232, .055) 1px, transparent 1px);
	background-size: 72px 72px; background-position: center top;
	-webkit-mask-image: radial-gradient(75% 70% at 50% 40%, #000 20%, transparent 78%); mask-image: radial-gradient(75% 70% at 50% 40%, #000 20%, transparent 78%); }
.cy-deck__bg::after { content: ''; position: absolute; left: 50%; top: 52%; width: min(1100px, 120vw); aspect-ratio: 2 / 1; transform: translate(-50%, -50%);
	background: radial-gradient(50% 50% at 38% 50%, rgba(139, 92, 246, .42), transparent 70%), radial-gradient(42% 46% at 66% 54%, rgba(79, 227, 240, .22), transparent 70%), radial-gradient(30% 34% at 52% 62%, rgba(255, 79, 216, .2), transparent 70%);
	filter: blur(30px); opacity: calc(.75 + var(--p) * .25); }

/* opening headline: fades up and away as the deck deals out */
.cy-deck__head { position: absolute; left: 0; right: 0; top: clamp(20px, 4.5vh, 60px); z-index: 3; text-align: center; padding: 0 20px;
	opacity: clamp(0, calc(1 - var(--p) * 3.2), 1); transform: translateY(calc(var(--p) * -70px)); }
.cy-deck.is-away .cy-deck__head { pointer-events: none; }
.cy-deck__pill { display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 15px; font-size: 10px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-l); background: rgba(255, 255, 255, .03); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cy-deck__pill b { width: 7px; height: 7px; border-radius: 50%; background: var(--grad); box-shadow: 0 0 12px rgba(94, 231, 242, .9); }
body.cy .cy-deck__title { font-family: var(--display); font-weight: 800; font-size: clamp(36px, min(6.6vw, 11vh), 104px); line-height: .94; letter-spacing: -.035em; text-transform: uppercase; color: #fff; margin: clamp(14px, 2.2vh, 26px) 0 0; text-shadow: 0 0 34px rgba(167, 139, 250, .55), 0 0 90px rgba(139, 92, 246, .4); }
.cy-deck__title span { display: block; }
.cy-deck__title em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 0 26px rgba(94, 231, 242, .45)); }
body.cy .cy-deck__sub { max-width: 560px; margin: clamp(12px, 2vh, 22px) auto 0; text-align: center; font-size: clamp(13px, 1.1vw, 16px); line-height: 1.6; color: var(--mute); }
.cy-deck__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: clamp(16px, 2.6vh, 30px); }
body.cy .cy-deck__go { display: inline-flex; align-items: center; gap: 10px; padding: 15px 28px; border-radius: 999px; font-family: var(--display); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #0A0A12; background: linear-gradient(180deg, #fff, #DCE2FF); border: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5), 0 12px 40px -8px rgba(139, 92, 246, .8); transition: transform .3s var(--ease), box-shadow .3s var(--ease); white-space: nowrap; }
body.cy .cy-deck__go:hover, body.cy .cy-deck__go:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 1px #fff, 0 18px 50px -8px rgba(94, 231, 242, .8); color: #0A0A12; }
body.cy .cy-deck__go--ghost { color: #fff; background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 1px var(--line-2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.cy .cy-deck__go--ghost:hover, body.cy .cy-deck__go--ghost:focus-visible { color: #fff; background: rgba(255, 255, 255, .12); box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }

/* the fan */
.cy-deck__fan { --w: clamp(96px, 12.2vw, 226px); --gap: clamp(8px, 1vw, 18px); --rot: 10deg; --half: 3; --s0: 1.42; --rest: 108%;
	position: absolute; left: 50%; bottom: 0; z-index: 2; width: var(--w); aspect-ratio: 13 / 19;
	/* fan: half the deck sits below the fold. row: rises to the middle of the viewport. */
	transform: translate(-50%, calc(var(--rest) * (1 - var(--p)) - var(--lift, 31vh) * var(--p))); }
.cy-deck__card { position: absolute; inset: 0; display: block; border-radius: clamp(8px, 1vw, 16px); transform-origin: 50% 240%; will-change: transform;
	transform:
		translateX(calc(var(--i) * (var(--w) + var(--gap)) * var(--p)))
		rotate(calc(var(--i) * var(--rot) * (1 - var(--p))))
		scale(calc(var(--s0) - (var(--s0) - 1) * var(--p)));
	/* cards beyond the visible arc fade out; once dealt, only the centred set remains */
	opacity: clamp(0, calc((var(--half) + 1.6 - var(--d) - var(--p)) * 4), 1); }
.cy-deck__card > span { display: block; height: 100%; border-radius: inherit; overflow: hidden; background: var(--s2);
	box-shadow: 0 30px 60px -18px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .1);
	transition: transform .5s var(--ease), box-shadow .5s var(--ease);
	animation: cy-deal .9s var(--ease) both; animation-delay: calc(.15s + var(--d) * .09s); }
.cy-deck__card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cy-deck__card:hover, .cy-deck__card:focus-visible { z-index: 40 !important; outline: 0; }
.cy-deck__card:hover > span, .cy-deck__card:focus-visible > span { transform: translateY(-7%) scale(1.05); box-shadow: 0 40px 70px -18px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .5), 0 0 46px rgba(139, 92, 246, .7); }
@keyframes cy-deal { from { opacity: 0; transform: translateY(60%) scale(.9); } to { opacity: 1; transform: none; } }

/* lines that light up word by word once the deck is dealt */
.cy-deck__say { position: absolute; z-index: 3; margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 4.4vw, 68px); line-height: 1.02; letter-spacing: -.03em; color: #fff; pointer-events: none; }
.cy-deck__say--a { left: clamp(20px, 4vw, 64px); top: clamp(22px, 6vh, 64px); }
.cy-deck__say--b { right: clamp(20px, 4vw, 64px); bottom: clamp(64px, 10.5vh, 120px); text-align: right; }
.cy-deck__say span { opacity: clamp(0, calc((var(--p) - var(--at)) * 9), 1); }
.cy-deck__say span:nth-child(even) { color: #B9B4FF; }
.cy-deck__foot { position: absolute; z-index: 3; left: 0; right: 0; bottom: clamp(20px, 4vh, 40px); display: flex; justify-content: center; gap: clamp(18px, 3vw, 46px); flex-wrap: wrap; padding: 0 20px;
	opacity: clamp(0, calc((var(--p) - .78) * 6), 1); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.cy-deck__foot strong { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0; color: #fff; margin-right: 8px; text-transform: none; }
.cy-deck__hint { position: absolute; z-index: 30; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: rgba(255, 255, 255, .75); padding: 6px 14px; border-radius: 999px; white-space: nowrap; background: rgba(5, 5, 10, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: clamp(0, calc(1 - var(--p) * 8), 1); pointer-events: none; }
.cy-deck:not(.is-live) .cy-deck__hint, .cy-deck:not(.is-live) .cy-deck__say, .cy-deck:not(.is-live) .cy-deck__foot { display: none; }

/* ---------- rest of the homepage: bolder type, rounder cards ---------- */
body.home .cy-strip h3, body.home .cy-section .cy-h2, body.home .cy-section .cy-h3, body.home .cy-tier__n, body.home .cy-tier__p, body.home .cy-col__label strong, body.home .cy-post h3, body.home .cy-faq summary { font-family: var(--display); letter-spacing: -.02em; }
body.home .cy-section .cy-h2 { font-weight: 700; font-size: clamp(32px, 4.4vw, 64px); line-height: 1.02; }
body.home .cy-section .cy-h3, body.home .cy-strip h3 { font-weight: 600; }
body.home .cy-section .cy-h2 em { font-style: normal; }
body.home .cy-tier__n, body.home .cy-tier__p { font-weight: 700; }
body.home .cy-col, body.home .cy-tier, body.home .cy-panel, body.home .cy-split__img, body.home .cy-post { border-radius: 18px; }
body.home .cy-col, body.home .cy-post { overflow: hidden; }
body.home .cy-col { transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
body.home .cy-col:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .35), 0 24px 60px -20px rgba(139, 92, 246, .75); }

/* ---------- small screens: five cards, larger fan ---------- */
@media (max-width: 760px) {
	.cy-deck.is-live { height: 210vh; }
	.cy-deck__fan { --w: 17vw; --gap: 2vw; --rot: 13deg; --half: 2; --s0: 2; --rest: 125%; --lift: 40vh; }
	.cy-deck__say--b { bottom: clamp(96px, 16vh, 140px); }
	.cy-deck__foot { font-size: 10px; gap: 6px 18px; }
	.cy-deck__foot strong { font-size: 13px; margin-right: 6px; }
	body.cy .cy-deck__go { padding: 13px 22px; font-size: 14px; }
}
@media (max-height: 640px) and (min-width: 761px) {
	body.cy .cy-deck__title { font-size: clamp(36px, 6.4vw, 84px); }
	.cy-deck__sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.cy-deck__card > span { animation: none; transition: none; }
}
