/*
 * Audience switch, popups, breadcrumbs, dark wholesale theme.
 */

/* ---------- Audience switch ---------- */

.k-switch {
	display: flex;
	padding: 3px;
	border-radius: var(--k-radius-round);
	background: rgba(255, 255, 255, 0.14);
}

.k-switch__btn {
	padding: 0.5rem 0.95rem;
	border-radius: var(--k-radius-round);
	font-size: var(--k-fs-xs);
	line-height: 1.1;
	text-decoration: none;
	color: var(--k-text-invert-soft);
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease;
}

/* Fixed colours, not theme tokens: the switch always sits on a photo or on
   glass, and in the dark theme --k-bg flips to near-black while --k-dark
   stays dark, which made the active label unreadable on itself. */
.k-switch__btn.is-active {
	background: #fff;
	color: #1a1a1a;
	font-weight: 600;
}

.k-mobile-nav .k-switch {
	margin-bottom: var(--k-space-3);
	background: rgba(255, 255, 255, 0.1);
}

/* In the hero rather than the header bar: the bar could not fit the switch
   alongside the phone, CTA and messenger icons without overflowing. */
.k-hero .k-switch {
	margin-inline: auto;
	margin-bottom: var(--k-space-2);
	background: rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(10px);
	width: fit-content;
}

/* ---------- First-visit chooser ---------- */

.k-gate {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: grid;
	place-items: center;
	padding: var(--k-gutter);
	background: rgba(20, 16, 14, 0.65);
	backdrop-filter: blur(6px);
}

.k-gate__box {
	width: min(34rem, 100%);
	padding: clamp(1.75rem, 5vw, 2.75rem);
	border-radius: var(--k-radius);
	background: var(--k-bg);
	text-align: center;
}

.k-gate__title { margin-bottom: 0.5rem; }

.k-gate__text {
	color: var(--k-text-muted);
	font-size: var(--k-fs-sm);
}

.k-gate__actions {
	display: grid;
	gap: var(--k-space-2);
	margin-block: var(--k-space-3) var(--k-space-2);
}

@media (min-width: 560px) {
	.k-gate__actions { grid-template-columns: 1fr 1fr; }
}

.k-gate__skip {
	border: 0;
	background: none;
	color: var(--k-text-soft);
	font: inherit;
	font-size: var(--k-fs-xs);
	text-decoration: underline;
	cursor: pointer;
}

/* ---------- Popups ---------- */

.k-no-scroll { overflow: hidden; }

.k-popup {
	position: fixed;
	inset: 0;
	z-index: 210;
	display: grid;
	place-items: center;
	padding: var(--k-gutter);
}

.k-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 16, 14, 0.6);
	backdrop-filter: blur(4px);
}

.k-popup__box {
	position: relative;
	width: min(30rem, 100%);
	max-height: 90vh;
	overflow-y: auto;
	padding: clamp(1.5rem, 4vw, 2.25rem);
	border-radius: var(--k-radius);
	background: var(--k-bg);
}

.k-popup__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: var(--k-radius-round);
	background: var(--k-bg-alt);
	color: var(--k-text);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}

.k-popup__title { margin-bottom: 0.5rem; padding-right: 2.5rem; }

.k-popup__text {
	margin-bottom: var(--k-space-3);
	font-size: var(--k-fs-sm);
	color: var(--k-text-muted);
}

/* ---------- Breadcrumbs ---------- */

.k-breadcrumbs { margin-bottom: var(--k-space-3); }

.k-breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--k-fs-xs);
	color: var(--k-text-soft);
}

.k-breadcrumbs__item { display: flex; gap: 0.4rem; }
.k-breadcrumbs__list a { color: var(--k-text-muted); text-decoration: none; }
.k-breadcrumbs__list a:hover { color: var(--k-brand); }
.k-breadcrumbs__sep { opacity: 0.5; }

/* ---------- Quiz placeholder ---------- */

.k-quiz-slot {
	position: relative;
	padding: clamp(2rem, 6vw, 3.5rem);
	border: 2px dashed var(--k-border);
	border-radius: var(--k-radius);
	background: var(--k-bg);
	text-align: center;
}

.k-quiz-slot p { color: var(--k-text-muted); font-size: var(--k-fs-sm); }

.k-quiz-slot__badge {
	display: inline-block;
	padding: 0.4rem 0.9rem;
	border-radius: var(--k-radius-round);
	background: var(--k-bg-alt);
	color: var(--k-text-soft);
	font-size: var(--k-fs-xs);
}

.k-link { color: var(--k-brand); font-size: var(--k-fs-sm); text-decoration: none; }

.k-case-card__title {
	display: block;
	font-size: var(--k-fs-md);
	line-height: 1.25;
}

/* ---------- Dark theme (wholesale) ---------- */

.k-theme--dark {
	background: var(--k-darker);
	color: var(--k-text-invert-soft);
	--k-heading: #f2f0ee;
	--k-bg: #2b2725;
	--k-bg-alt: #171717;
	--k-border: rgba(255, 255, 255, 0.14);
	--k-text: #f0eeec;
	--k-text-muted: #c3bfbb;
	--k-text-soft: #96918d;
}

/* The wholesale tiles sat a shade above the page and read as switched off.
   A lit edge and a top-down sheen give each one its own surface. */
.k-theme--dark .k-fact,
.k-theme--dark .k-segment,
.k-theme--dark .k-usp,
.k-theme--dark .k-person,
.k-theme--dark .k-review,
.k-theme--dark .k-faq__item,
.k-theme--dark .k-cat-card,
.k-theme--dark .k-catswitch__item {
	border: 1px solid rgba(255, 255, 255, 0.1);
	background:
		linear-gradient(168deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.015)),
		#2b2725;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.k-theme--dark .k-cat-card:hover,
.k-theme--dark .k-catswitch__item:hover { border-color: var(--k-brand); }

.k-theme--dark .k-segment__text { color: #ffb094; }
.k-theme--dark .k-fact__value { color: #ff8f6b; }

/* Already coloured tiles keep their own fill — the sheen would mute them. */
.k-theme--dark .k-usp--brand,
.k-theme--dark .k-usp--dark {
	background: var(--k-brand);
	box-shadow: none;
}

.k-theme--dark .k-usp--dark {
	background: #14100e;
	border-color: rgba(255, 255, 255, 0.14);
}

.k-theme--dark .k-quiz-slot { border-color: rgba(255, 255, 255, 0.18); }

.k-theme--dark .k-popup__box,
.k-theme--dark .k-gate__box {
	background: #201f1e;
	color: var(--k-text-invert-soft);
}

.k-theme--dark .k-popup__close {
	background: rgba(255, 255, 255, 0.1);
	color: var(--k-text-invert);
}

.k-theme--dark .k-field input,
.k-theme--dark .k-field textarea {
	background: #171717;
	border-color: rgba(255, 255, 255, 0.18);
	color: var(--k-text-invert);
}

.k-theme--dark .k-switch { background: rgba(255, 255, 255, 0.1); }

/* The dark theme redefines --k-bg, so the rule above must not be undone. */
.k-theme--dark .k-switch__btn.is-active {
	background: #fff;
	color: #1a1a1a;
}

.k-hero--dark { background: #14100e; }
