/* Nafasam story deck · Rose Atelier */
.nst {
	--w: #6E1A36; --plum: #2B1419; --rose: #F3DCD8; --pink: #E8A9B4; --mauve-l: #D9B9B5;
	--serif: 'Bodoni Moda', 'Didot', Georgia, serif; --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--ease: cubic-bezier(.2, .8, .2, 1);
	position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 56px;
	padding: 64px 64px 64px 72px; border-radius: 36px; overflow: hidden; isolation: isolate;
	background:
		radial-gradient(120% 90% at 100% 0%, rgba(110, 26, 54, .75) 0%, rgba(110, 26, 54, 0) 55%),
		radial-gradient(90% 80% at 0% 100%, rgba(232, 169, 180, .16) 0%, rgba(232, 169, 180, 0) 60%),
		var(--plum);
	color: #fff; font-family: var(--sans); text-align: left;
}

/* Copy */
.nst-eyebrow { margin: 0 0 14px !important; color: var(--pink) !important; font: 500 14px/1.3 var(--sans) !important; }
body .nst .nst-title { margin: 0 0 18px !important; color: #fff !important; font: 400 56px/1.04 var(--serif) !important; letter-spacing: -.8px !important; text-transform: none !important; }
.nst-title em { font-style: italic; color: var(--pink); }
.nst-text p { margin: 0 0 12px !important; color: var(--rose) !important; font: 400 17px/1.7 var(--sans) !important; max-width: 46ch; }

.nst-now { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); }
.nst-bars { display: flex; gap: 6px; margin-bottom: 18px; }
.nst-bar { position: relative; flex: 1; height: 3px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; cursor: pointer; }
.nst-bar::after { content: ''; position: absolute; inset: -8px 0; } /* bigger tap target */
.nst-bar i { position: absolute; inset: 0; width: 0; border-radius: inherit; background: var(--pink); }
.nst-bar.is-done i { width: 100%; }
.nst-bar.is-on i { animation: nst-fill var(--nst-ms, 5000ms) linear forwards; }
.nst.is-paused .nst-bar.is-on i { animation-play-state: paused; }
@keyframes nst-fill { from { width: 0; } to { width: 100%; } }

.nst-caption-row { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; min-height: 56px; }
.nst-count { margin: 2px 0 0 !important; color: var(--mauve-l) !important; font: 500 13px/1.4 var(--sans) !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nst-n { color: #fff; }
.nst-captions { position: relative; }
.nst-cap { position: absolute; inset: 0 auto auto 0; margin: 0 !important; color: #fff !important; font: 400 italic 22px/1.3 var(--serif) !important;
	opacity: 0; transform: translateY(10px); filter: blur(4px); transition: opacity .5s ease, transform .6s var(--ease), filter .5s ease; }
.nst-cap.is-on { position: relative; opacity: 1; transform: none; filter: none; transition-delay: .12s; }

.nst-nav { display: flex; gap: 10px; margin-top: 22px; }
body .nst .nst-btn {
	display: grid; place-items: center; width: 46px; height: 46px; min-height: 0 !important; padding: 0 !important; border-radius: 50% !important;
	border: 1px solid rgba(255, 255, 255, .22) !important; background: rgba(255, 255, 255, .04) !important; color: #fff !important; box-shadow: none !important;
	cursor: pointer; transition: background .25s, border-color .25s, transform .25s var(--ease);
}
body .nst .nst-btn:hover { background: #fff !important; border-color: #fff !important; color: var(--w) !important; transform: translateY(-2px); }
.nst-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nst-play .i-play { display: none; fill: currentColor; stroke: none; }
.nst-play[aria-pressed="true"] .i-play { display: block; }
.nst-play[aria-pressed="true"] .i-pause { display: none; }
.nst :focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }

/* Stage + deck */
.nst-stage { position: relative; display: grid; place-items: center; min-height: 520px; }
.nst-glow { position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(232, 169, 180, .38), rgba(110, 26, 54, 0) 68%);
	filter: blur(20px); animation: nst-breathe 7s ease-in-out infinite; z-index: -1; }
@keyframes nst-breathe { 0%, 100% { transform: scale(.94); opacity: .75; } 50% { transform: scale(1.06); opacity: 1; } }

.nst-deck { position: relative; width: min(400px, 82%); aspect-ratio: 5 / 6; perspective: 1400px; outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.nst-card {
	position: absolute; inset: 0; margin: 0; padding: 10px; border-radius: 210px 210px 28px 28px; background: #FBF3F1;
	box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .06);
	transform-origin: 50% 85%; cursor: grab; will-change: transform;
	transition: transform .75s var(--ease), opacity .5s ease, filter .6s ease;
}
.nst-card img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 200px 200px 20px 20px; pointer-events: none; }
.nst-card[data-pos="0"] { z-index: 4; transform: translate3d(var(--dx, 0px), 0, 0) rotate(var(--rot, 0deg)); }
.nst-card[data-pos="1"] { z-index: 3; transform: translate3d(19%, 3%, -80px) rotate(8deg) scale(.9); filter: brightness(.72) saturate(.9); }
.nst-card[data-pos="2"] { z-index: 2; transform: translate3d(-18%, 5%, -160px) rotate(-9deg) scale(.84); filter: brightness(.55) saturate(.8); }
.nst-card[data-pos="3"] { z-index: 1; transform: translate3d(0, 6%, -220px) scale(.76); opacity: 0; }
.nst-card.is-drag { transition: none; cursor: grabbing; }
.nst-card.is-out { z-index: 5; opacity: 0; transition: transform .45s cubic-bezier(.5, 0, .75, 0), opacity .4s ease; }
.nst-card.is-out[data-out="left"] { transform: translate3d(-120%, -6%, 0) rotate(-22deg) !important; }
.nst-card.is-out[data-out="right"] { transform: translate3d(120%, -6%, 0) rotate(22deg) !important; }
.nst-card.is-return { transition: none !important; opacity: 0; transform: translate3d(-120%, -6%, 0) rotate(-22deg) !important; z-index: 5; }

/* One orchestrated entrance: the prints fan out when the panel arrives */
.nst:not(.is-in) .nst-card { transform: translate3d(0, 10%, 0) rotate(0) scale(.9) !important; opacity: 0; filter: none; }
.nst.is-in .nst-card { transition-delay: calc(var(--d, 0) * 1ms); }
.nst.is-in .nst-card[data-i="1"] { --d: 120; }
.nst.is-in .nst-card[data-i="2"] { --d: 240; }
.nst.is-in .nst-card.is-drag, .nst.is-in .nst-card.is-out { transition-delay: 0s; }
.nst-copy > * { transition: opacity .8s ease, transform .9s var(--ease); }
.nst:not(.is-in) .nst-copy > * { opacity: 0; transform: translateY(16px); }
.nst.is-in .nst-copy > :nth-child(2) { transition-delay: .08s; }
.nst.is-in .nst-copy > :nth-child(3) { transition-delay: .16s; }
.nst.is-in .nst-copy > :nth-child(4) { transition-delay: .24s; }

@media (max-width: 1024px) {
	.nst { gap: 32px; padding: 48px 40px; }
	body .nst .nst-title { font-size: 44px !important; }
}
@media (max-width: 760px) {
	.nst { grid-template-columns: 1fr; gap: 8px; padding: 36px 22px 30px; border-radius: 28px; }
	.nst-stage { order: -1; min-height: 0; padding: 8px 0 24px; }
	.nst-deck { width: min(280px, 66%); }
	body .nst .nst-title { font-size: 36px !important; }
	.nst-text p { font-size: 16px !important; }
	.nst-now { margin-top: 24px; }
	.nst-cap { font-size: 19px !important; }
}

@media (prefers-reduced-motion: reduce) {
	.nst-card, .nst-cap, .nst-copy > *, .nst .nst-btn { transition: none !important; }
	.nst-glow { animation: none; }
	.nst:not(.is-in) .nst-copy > * { opacity: 1; transform: none; }
}
