/* Natlus Reviews — moving review cards in the Natlus Capital theme style. */

.ncr {
	--ink: var(--nc-ink, #181818);
	--char: var(--nc-char, #2a2726);
	--paper: var(--nc-paper, #fff);
	--primary: var(--nc-primary, #fd521d);
	--secondary: var(--nc-secondary, #ff7732);
	--peach: var(--nc-peach, #fff3ed);
	--peach-deep: var(--nc-peach-deep, #ffe2d4);
	--line: var(--nc-line, #ebdfd8);
	--muted: var(--nc-muted, #5c5450);
	--radius: var(--nc-radius, 22px);
	--display: var(--nc-display, "Saira Expanded", "Montserrat", system-ui, sans-serif);
	--body: var(--wp--preset--font-family--body, "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif);
	--gap: 1.25rem;
	position: relative;
	font-family: var(--body);
	color: var(--ink);
}

.ncr *,
.ncr *::before,
.ncr *::after { box-sizing: border-box; }

/* No published reviews: hide the whole section from visitors. */
.ncr--empty { display: none !important; }
.nc-reviews-section:has(.ncr--empty) { display: none !important; }

.nc-reviews-section { overflow-x: clip; }

/* ---------- Moving row ---------- */

.ncr-viewport {
	position: relative;
	width: 100vw;
	margin-inline: calc(50% - 50vw);
	padding-block: .75rem 1.5rem;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

.ncr-track {
	display: flex;
	gap: var(--gap);
	width: max-content;
	will-change: transform;
}

.ncr.is-moving .ncr-track { animation: ncr-scroll var(--ncr-duration, 40s) linear infinite; }

.ncr.is-paused .ncr-track,
.ncr.is-offscreen .ncr-track,
.ncr-viewport:hover .ncr-track,
.ncr-viewport:focus-within .ncr-track { animation-play-state: paused; }

@keyframes ncr-scroll {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(calc(-1 * var(--ncr-shift, 50%)), 0, 0); }
}

.ncr .ncr-group {
	display: flex;
	gap: var(--gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ncr .ncr-item { display: flex; margin: 0; padding: 0; }
.ncr .ncr-item::marker { content: none; }

/* Static row (reduced motion / no JavaScript): swipe instead of auto-move. */
.ncr:not(.is-moving) .ncr-viewport {
	width: auto;
	margin-inline: 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-mask-image: none;
	mask-image: none;
	scrollbar-width: thin;
}

.ncr:not(.is-moving) .ncr-item { scroll-snap-align: start; }

/* ---------- Card ---------- */

.ncr .ncr-card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: clamp(17.5rem, 30vw, 25rem);
	margin: 0;
	padding: 1.75rem 1.75rem 1.5rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--paper);
	box-shadow: 0 1px 2px rgb(24 24 24 / .04), 0 22px 44px -30px rgb(24 24 24 / .35);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease, border-color .35s ease;
}

.ncr .ncr-card::after {
	content: "";
	position: absolute;
	inset: 0 1.75rem auto;
	height: 3px;
	border-radius: 0 0 3px 3px;
	background: linear-gradient(90deg, var(--primary), var(--secondary));
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}

.ncr .ncr-card:hover {
	transform: translateY(-6px);
	border-color: var(--peach-deep);
	box-shadow: 0 1px 2px rgb(24 24 24 / .04), 0 30px 50px -28px rgb(24 24 24 / .42);
}

.ncr .ncr-card:hover::after { transform: scaleX(1); }

.ncr .ncr-card.is-draft { border-style: dashed; border-color: color-mix(in srgb, var(--primary) 45%, transparent); }

.ncr-card__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 2.125rem;
}

.ncr-stars { display: inline-flex; gap: .2rem; }

.ncr-star {
	display: block;
	fill: var(--line);
	transform-origin: 50% 55%;
}

.ncr-star.is-on { fill: var(--primary); }

.ncr-quote { display: block; flex: none; fill: var(--peach-deep); }

.ncr .ncr-draft {
	padding: .3rem .65rem;
	border-radius: 999px;
	background: var(--peach);
	font-size: .6875rem;
	font-weight: 700;
	letter-spacing: .04em;
	color: var(--nc-orange-ink, #bf3a0c);
	white-space: nowrap;
}

.ncr .ncr-text {
	flex: 1;
	margin: 1.15rem 0 0;
	padding: 0;
	border: 0;
	background: none;
	quotes: none;
}

.ncr .ncr-text::before,
.ncr .ncr-text::after { content: none; }

.ncr .ncr-text p {
	margin: 0;
	font-family: var(--body);
	font-size: 1.0625rem;
	font-style: normal;
	font-weight: 500;
	line-height: 1.65;
	color: var(--char);
}

.ncr .ncr-person {
	display: flex;
	align-items: center;
	gap: .85rem;
	margin: 1.5rem 0 0;
	padding-top: 1.15rem;
	border-top: 1px solid var(--line);
}

.ncr-avatar {
	display: grid;
	flex: none;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--primary), var(--secondary));
	box-shadow: 0 0 0 3px var(--peach);
	font-family: var(--display);
	font-size: .9375rem;
	font-weight: 600;
	letter-spacing: .02em;
	color: #fff;
}

.ncr-who { display: grid; gap: .1rem; min-width: 0; }
.ncr .ncr-name { font-size: .9375rem; font-weight: 700; line-height: 1.3; color: var(--ink); }
.ncr .ncr-meta { font-size: .8125rem; line-height: 1.35; color: var(--muted); }

/* ---------- Controls & notes ---------- */

.ncr-controls { display: flex; justify-content: flex-end; margin-top: .25rem; }

.ncr .ncr-toggle {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	margin: 0;
	padding: .55rem 1rem;
	border: 1.5px solid var(--line);
	border-radius: 999px;
	background: var(--paper);
	box-shadow: none;
	font: 600 .8125rem/1 var(--body);
	letter-spacing: 0;
	text-transform: none;
	color: var(--ink);
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease;
}

.ncr .ncr-toggle:hover { border-color: var(--ink); }
.ncr .ncr-toggle:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.ncr .ncr-toggle svg { fill: currentColor; }
.ncr .ncr-toggle[hidden] { display: none; }
.ncr .ncr-ico-play,
.ncr.is-paused .ncr-ico-pause { display: none; }
.ncr.is-paused .ncr-ico-play { display: block; }

.ncr .ncr-note {
	display: inline-block;
	margin: 0 0 1.25rem;
	padding: .6rem .95rem;
	border: 1px dashed color-mix(in srgb, var(--primary) 45%, transparent);
	border-radius: 12px;
	background: var(--paper);
	font-size: .875rem;
	line-height: 1.45;
	color: var(--muted);
}

.ncr .ncr-note a { font-weight: 700; color: var(--nc-orange-ink, #bf3a0c); }

/* ---------- Entrance ---------- */

.ncr.is-ready .ncr-viewport { opacity: 0; transform: translateY(24px); }

.ncr.is-in .ncr-viewport {
	opacity: 1;
	transform: none;
	transition: opacity .8s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
}

.ncr.is-in .ncr-star.is-on { animation: ncr-pop .5s cubic-bezier(.2, .9, .3, 1.4) both; animation-delay: calc(.35s + var(--s) * .09s); }

@keyframes ncr-pop {
	0% { opacity: 0; transform: scale(.2) rotate(-25deg); }
	100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
	.ncr { --gap: .9rem; }
	.ncr .ncr-card { width: min(82vw, 21rem); padding: 1.4rem 1.35rem 1.25rem; }
	.ncr .ncr-text p { font-size: 1rem; }
	.ncr-controls { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	.ncr .ncr-card,
	.ncr .ncr-card::after,
	.ncr.is-in .ncr-viewport { transition: none; }
	.ncr.is-in .ncr-star.is-on { animation: none; }
	.ncr.is-ready .ncr-viewport { opacity: 1; transform: none; }
}
