/* Klashify header, direction B "Pearl": floating pill, cool greys, rounded, Bricolage Grotesque + Figtree.
   Layers: header 1000 (the bar and the full-screen menu live inside it).

   COLOURS AND THE BOOKING PLUGIN'S DARK PAGE
   The booking plugin's whole-page dark mode (/staff-bookings/, html[data-kb-page="dark"]) sets a light colour on every
   a, p, li, span, label and h1-h4 outside its own cards, and a light colour on body. Those selectors beat any class rule of ours,
   which used to turn the header into light-on-light.
   Instead of copying every colour rule behind the plugin's selector, the header works like this:
     1. Every colour is a token on .kh (--kh-ink, --kh-mute, --kh-on-ink, tints as an "r g b" triplet). One block below
        (html[data-kb-page="dark"] .kh) swaps the tokens, so the pill and the mobile menu get a real dark look that matches the
        plugin's page (sheet = the plugin's own page colour) and nothing is repeated.
     2. Text colour is never set with `color:` on a component. A component sets --kh-fg, and ONE rule (".kh, .kh *", !important
        because it has to win against the plugin's and the parent theme's own link colours) turns --kh-fg into `color`.
        --kh-fg inherits like colour does, so children follow their parent. Add a new component: set --kh-fg, done.
   Backgrounds, borders and shadows were never touched by the plugin, so they need no guard. */
.kh {
	--kh-ink: var(--k-ink, #14171a);
	--kh-mute: var(--k-mute, #566066);
	--kh-pearl: var(--k-pearl, #e9ebee);
	--kh-ink-hover: var(--k-ink-hover, #2b3137);
	--kh-on-ink: #fff;                 /* text and icons on anything filled with --kh-ink */
	--kh-tint: 20 23 26;               /* "r g b": hover washes, hairlines, shadows (dark: light tint) */
	--kh-onink-tint: 255 255 255;      /* the circles inside ink buttons */
	--kh-shade: 20 23 26;              /* shadow colour */
	--kh-island: rgba(255, 255, 255, .8);
	--kh-hair: rgb(var(--kh-tint) / .08);
	--kh-edge: rgba(255, 255, 255, .7);   /* top highlight of the glass */
	--kh-glow-a: rgba(255, 255, 255, .85);  /* soft light in the corners of the menu sheet */
	--kh-glow-b: rgba(255, 255, 255, .55);
	--kh-tray: rgba(255, 255, 255, .5);   /* tray of the feature card */
	--kh-card: #fff;
	--kh-btn: rgba(255, 255, 255, .7);    /* quiet buttons in the menu */
	--kh-ease: var(--k-ease, cubic-bezier(.32, .72, 0, 1));
	--kh-fg: var(--kh-ink);
	--kh-h: 56px;
	position: sticky;
	top: 0;
	z-index: 1000;
	height: 76px;              /* room for the pill; the strip itself lets clicks through */
	padding-top: 12px;
	pointer-events: none;
	font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.admin-bar .kh { top: 32px; }
@media (max-width: 782px) { .admin-bar .kh { top: 46px; } }
/* Under 601 px WordPress stops pinning its admin bar (it scrolls away), so the pill must stick to the very top, not 46 px below it. */
@media (max-width: 600px) { .admin-bar .kh { top: 0; } }

/* The one place where text colour is applied (see the note at the top). */
.kh, .kh * { color: var(--kh-fg) !important; }

/* Dark page (booking plugin): same layout, dark tokens. The sheet takes the plugin's page colour, so it reads as part of that page. */
html[data-kb-page="dark"] .kh {
	--kh-ink: #f3f4f6;
	--kh-mute: #a8b0b6;
	--kh-pearl: var(--kb-page-bg, #0e1013);
	--kh-ink-hover: #d9dce0;
	--kh-on-ink: #14171a;
	--kh-tint: 255 255 255;
	--kh-onink-tint: 20 23 26;
	--kh-shade: 0 0 0;
	--kh-island: rgba(30, 34, 39, .78);
	--kh-hair: rgb(var(--kh-tint) / .12);
	--kh-edge: rgba(255, 255, 255, .1);
	--kh-glow-a: rgba(255, 255, 255, .07);
	--kh-glow-b: rgba(255, 255, 255, .04);
	--kh-tray: rgba(255, 255, 255, .06);
	--kh-btn: rgba(255, 255, 255, .06);
}

.kh *, .kh *::before, .kh *::after { box-sizing: border-box; }
.kh ul { list-style: none; margin: 0; padding: 0; }
.kh a { text-decoration: none; }

/* ---------- the pill ---------- */
.kh-island {
	pointer-events: auto;
	display: flex;
	align-items: center;
	gap: 28px;
	width: max-content;
	max-width: calc(100% - 24px);
	min-height: var(--kh-h);
	margin: 0 auto;
	padding: 6px 6px 6px 26px;
	background: var(--kh-island);
	-webkit-backdrop-filter: blur(18px) saturate(1.4);
	backdrop-filter: blur(18px) saturate(1.4);
	border: 1px solid var(--kh-hair);
	border-radius: 999px;
	box-shadow: inset 0 1px 0 var(--kh-edge), 0 18px 40px -24px rgb(var(--kh-shade) / .35);
}

.kh-logo {
	--kh-fg: var(--kh-ink);
	font: 700 19px/1 "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
	letter-spacing: -.02em;
	padding: 8px 0;
	transition: color .3s var(--kh-ease);
}
.kh-logo:hover { --kh-fg: var(--kh-mute); }   /* logo goes grey on hover */

.kh-nav ul { display: flex; align-items: center; gap: 2px; }
.kh-nav a {
	--kh-fg: var(--kh-mute);
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	transition: color .25s var(--kh-ease), background-color .25s var(--kh-ease);
}
.kh-nav a:hover { --kh-fg: var(--kh-ink); background: rgb(var(--kh-tint) / .05); }
.kh-nav a[aria-current] { --kh-fg: var(--kh-ink); background: rgb(var(--kh-tint) / .07); }

.kh-actions { display: flex; align-items: center; gap: 4px; }

/* Cart */
.kh-cart {
	--kh-fg: var(--kh-ink);
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	transition: background-color .25s var(--kh-ease);
}
.kh-cart:hover { background: rgb(var(--kh-tint) / .06); }
.kh-cart-count {
	--kh-fg: var(--kh-on-ink);
	position: absolute;
	top: 5px;
	right: 3px;
	min-width: 17px;
	height: 17px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--kh-ink);
	font-size: 10px;
	font-weight: 600;
	line-height: 17px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}
.kh-cart-count.is-empty { display: none; }

/* Log in / Account pill with the arrow in its own circle */
.kh-pill {
	--kh-fg: var(--kh-on-ink);
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 0 6px 0 20px;
	border-radius: 999px;
	background: var(--kh-ink);
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 0 0 rgb(var(--kh-shade) / 0);
	transition: transform .35s var(--kh-ease), background-color .3s var(--kh-ease), box-shadow .35s var(--kh-ease);
}
/* The circle keeps its size; only its fill and the arrow inside it move. */
.kh-pill i {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgb(var(--kh-onink-tint) / .14);
	transition: background-color .3s var(--kh-ease);
}
.kh-pill i svg { display: block; transition: transform .35s var(--kh-ease); }
@media (hover: hover) {
	/* The whole button answers: it lifts, lightens and gets a soft shadow. */
	.kh-pill:hover {
		background: var(--kh-ink-hover);
		transform: translateY(-1px);
		box-shadow: 0 10px 22px -12px rgb(var(--kh-shade) / .6);
	}
	.kh-pill:hover i { background: rgb(var(--kh-onink-tint) / .22); }
	.kh-pill:hover i svg { transform: translate(1.5px, -1.5px); }
}
.kh-pill:active { transform: scale(.98); box-shadow: none; }

.kh a:focus-visible, .kh button:focus-visible { outline: 2px solid var(--kh-ink); outline-offset: 3px; }

/* ---------- burger (small screens) ---------- */
.kh-burger {
	--kh-fg: var(--kh-ink);
	display: none;
	position: relative;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.kh-burger span {
	position: absolute;
	left: 13px;
	right: 13px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .5s var(--kh-ease), opacity .25s ease;
}
.kh-burger span:nth-child(1) { transform: translateY(-6px); }
.kh-burger span:nth-child(3) { transform: translateY(6px); }
.kh-burger span { top: 21px; }
.kh.is-open .kh-burger span:nth-child(1) { transform: rotate(45deg); }
.kh.is-open .kh-burger span:nth-child(2) { opacity: 0; }
.kh.is-open .kh-burger span:nth-child(3) { transform: rotate(-45deg); }

/* ---------- full-screen menu ----------
   Composition, top to bottom: tag "Menu", three numbered link rows (big Bricolage labels with a short descriptor),
   then the actions grouped at the bottom: Book (only when the booking plugin is on), a double-bezel feature card with the
   model portrait that links to the product, Account + Cart, and a quiet contact line.
   Opening: a pearl sheet grows out of the burger corner (transform only), link labels rise out of a mask, the rest follows 70 ms apart.
   Everything animates transform/opacity only and can be interrupted (a class toggle, no animation-end logic). */
.kh-panel {
	pointer-events: auto;
	position: fixed;
	inset: 0;
	z-index: -1;               /* under the pill, inside the header layer */
	padding: var(--kh-top, 88px) 0 0;   /* set from the pill position in header.js, so it also works with the admin bar */
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}
.kh-panel[hidden] { display: none; }
.kh-panel:focus { outline: none; }
.admin-bar .kh-panel { padding-top: var(--kh-top, calc(88px + 44px)); }
@media (max-width: 782px) { .admin-bar .kh-panel { padding-top: var(--kh-top, calc(88px + 58px)); } }

/* The sheet: opaque so nothing behind it shows through. It scales up from the burger corner. */
.kh-panel__bg {
	position: fixed;
	inset: 0;
	z-index: -1;
	background:
		radial-gradient(90% 46% at 100% 0%, var(--kh-glow-a), transparent 70%),
		radial-gradient(80% 40% at 0% 100%, var(--kh-glow-b), transparent 70%),
		var(--kh-pearl);
	transform-origin: var(--kh-ox, calc(100% - 36px)) var(--kh-oy, 36px);
	transform: scale(.04);
	opacity: 0;
	transition: transform .5s var(--kh-ease), opacity .3s var(--kh-ease) .12s;
}
.kh.is-open .kh-panel__bg {
	transform: none;
	opacity: 1;
	transition: transform .75s var(--kh-ease), opacity .2s var(--kh-ease);
}

.kh-panel__in {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	max-width: 480px;
	min-height: 100%;
	margin: 0 auto;
	padding: 0 22px 20px;
}

/* Blocks that rise in one after another (--i is set in the markup). On close they leave at once, no stagger. */
.kh-panel__tag, .kh-panel__book, .kh-panel__feature, .kh-panel__pair, .kh-panel__meta {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .25s var(--kh-ease), transform .35s var(--kh-ease), scale .35s var(--kh-ease), background-color .25s var(--kh-ease);
}
.kh.is-open .kh-panel__tag, .kh.is-open .kh-panel__book, .kh.is-open .kh-panel__feature, .kh.is-open .kh-panel__pair, .kh.is-open .kh-panel__meta {
	opacity: 1;
	transform: none;
	transition: opacity .6s var(--kh-ease) calc(var(--i) * 70ms + 140ms), transform .8s var(--kh-ease) calc(var(--i) * 70ms + 140ms), scale .35s var(--kh-ease), background-color .25s var(--kh-ease);
}
.kh-panel__tag { --kh-fg: var(--kh-mute); align-self: flex-start; margin: 0; background: rgb(var(--kh-tint) / .06); }

/* Link rows */
.kh-panel__nav { margin-top: 4px; }
.kh-panel__nav li { position: relative; }
.kh-panel__nav li::before, .kh-panel__nav li:last-child::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 1px;
	background: var(--kh-hair);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .3s var(--kh-ease);
}
.kh-panel__nav li::before { top: 0; }
.kh-panel__nav li:last-child::after { bottom: 0; }
.kh.is-open .kh-panel__nav li::before, .kh.is-open .kh-panel__nav li:last-child::after {
	transform: none;
	transition: transform .9s var(--kh-ease) calc(var(--i) * 70ms + 100ms);
}
.kh-panel__nav a {
	--kh-fg: var(--kh-ink);
	display: grid;
	grid-template-columns: 30px 1fr 40px;
	align-items: center;
	column-gap: 6px;
	min-height: clamp(64px, 9.5svh, 92px);
	padding: 10px 0;
	-webkit-tap-highlight-color: transparent;
}
.kh-panel__num { --kh-fg: var(--kh-mute); font-size: 12px; font-weight: 600; letter-spacing: .1em; font-variant-numeric: tabular-nums; align-self: start; padding-top: calc(clamp(34px, min(12.5vw, 6svh + 8px), 52px) * .34); }
.kh-panel__num { opacity: 0; transition: opacity .2s var(--kh-ease); }
.kh.is-open .kh-panel__num { opacity: 1; transition: opacity .7s var(--kh-ease) calc(var(--i) * 70ms + 200ms); }
.kh-panel__txt { display: block; min-width: 0; }
.kh-panel__mask { display: block; overflow: hidden; padding: 2px 0 6px; margin: -2px 0 -6px; }
.kh-panel__mask b {
	display: block;
	font: 700 clamp(34px, min(12.5vw, 6svh + 8px), 52px)/1 "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
	letter-spacing: -.04em;
	transform: translateY(115%);
	transition: transform .35s var(--kh-ease), color .25s var(--kh-ease);
}
.kh.is-open .kh-panel__mask b { transform: none; transition: transform .9s var(--kh-ease) calc(var(--i) * 70ms + 80ms), color .25s var(--kh-ease); }
.kh-panel__txt small {
	--kh-fg: var(--kh-mute);
	display: block;
	margin-top: 6px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	opacity: 0;
	transition: opacity .2s var(--kh-ease);
}
.kh.is-open .kh-panel__txt small { opacity: 1; transition: opacity .7s var(--kh-ease) calc(var(--i) * 70ms + 380ms); }
.kh-panel__nav a i {
	display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
	background: rgb(var(--kh-tint) / .06);
	opacity: 0; transform: scale(.6);
	transition: opacity .2s var(--kh-ease), transform .3s var(--kh-ease), background-color .25s var(--kh-ease), color .25s var(--kh-ease);
}
.kh.is-open .kh-panel__nav a i { opacity: 1; transform: none; transition: opacity .5s var(--kh-ease) calc(var(--i) * 70ms + 300ms), transform .7s var(--kh-ease) calc(var(--i) * 70ms + 300ms), background-color .25s var(--kh-ease), color .25s var(--kh-ease); }
.kh-panel__nav a i svg { transition: transform .5s var(--kh-ease); }
/* pressed / current: the arrow circle fills (a:active is "pressed" on touch, where there is no hover) */
.kh-panel__nav a:active i, .kh-panel__nav a[aria-current] i { --kh-fg: var(--kh-on-ink); background: var(--kh-ink); }
@media (hover: hover) {
	.kh-panel__nav a:hover i { --kh-fg: var(--kh-on-ink); background: var(--kh-ink); }
	.kh-panel__nav a:hover i svg { transform: translate(1.5px, -1.5px); }
}

/* Actions */
.kh-panel__foot { display: grid; gap: 12px; margin-top: auto; padding-top: 18px; }
.kh-panel__book {
	--kh-fg: var(--kh-on-ink);
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	min-height: 60px; padding: 0 8px 0 24px; border-radius: 999px;
	background: var(--kh-ink); font: 600 16px/1 "Figtree", system-ui, sans-serif;
	box-shadow: 0 16px 30px -18px rgb(var(--kh-shade) / .55);
}
.kh-panel__book i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgb(var(--kh-onink-tint) / .14); }
.kh-panel__book:active, .kh-panel__btn:active, .kh-panel__feature:active { scale: .98; }

/* Feature card: double bezel (tray + glass plate) around the portrait.
   The plate stays a light card in both looks: the portrait is blended with `multiply` and only reads right on a light ground,
   so the plate re-declares the light tokens for everything inside it. */
.kh-panel__feature {
	--kh-fg: var(--kh-ink);
	display: block;
	padding: 6px;
	border-radius: 28px;
	background: var(--kh-tray);
	box-shadow: 0 0 0 1px var(--kh-hair), 0 22px 40px -30px rgb(var(--kh-shade) / .4);
	-webkit-tap-highlight-color: transparent;
}
.kh-panel__core {
	--kh-ink: var(--k-ink, #14171a);
	--kh-mute: var(--k-mute, #566066);
	--kh-on-ink: #fff;
	--kh-onink-tint: 255 255 255;
	--kh-fg: var(--kh-ink);
	position: relative;
	display: flex;
	min-height: clamp(116px, 17svh, 148px);
	overflow: hidden;
	border-radius: 22px;
	background: var(--kh-card);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.kh-panel__copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 62%; padding: 16px 0 14px 18px; }
.kh-panel__kicker { --kh-fg: var(--kh-mute); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.kh-panel__title { --kh-fg: var(--kh-ink); font: 700 clamp(19px, 5.6vw, 22px)/1.05 "Bricolage Grotesque", "Figtree", system-ui, sans-serif; letter-spacing: -.03em; }
.kh-panel__go {
	--kh-fg: var(--kh-on-ink);
	display: inline-flex; align-items: center; gap: 8px; margin-top: auto;
	padding: 0 4px 0 14px; min-height: 34px; border-radius: 999px;
	background: var(--kh-ink); font-size: 13px; font-weight: 600;
}
.kh-panel__go i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgb(var(--kh-onink-tint) / .16); }
.kh-panel__go i svg { transition: transform .5s var(--kh-ease); }
.kh-panel__photo { position: absolute; top: 0; right: 0; bottom: 0; width: 56%; pointer-events: none; }
.kh-panel__photo img {
	display: block; width: calc(100% + 10px); max-width: none; height: 100%; object-fit: cover; object-position: 40% 34%;   /* +10px pushes the source file's thin dark right edge out of the clip */
	mix-blend-mode: multiply;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 42%);
	mask-image: linear-gradient(90deg, transparent 0, #000 42%);
	transform: scale(1.06);
	transition: transform 1.1s var(--kh-ease);
}
.kh.is-open .kh-panel__photo img { transform: none; }
@media (hover: hover) { .kh-panel__feature:hover .kh-panel__go i svg { transform: translate(1.5px, -1.5px); } }

.kh-panel__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kh-panel__btn {
	--kh-fg: var(--kh-ink);
	display: flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 52px; padding: 0 16px; border-radius: 999px;
	background: var(--kh-btn); box-shadow: inset 0 0 0 1px rgb(var(--kh-tint) / .14);
	font: 600 15px/1 "Figtree", system-ui, sans-serif;
	transition: background-color .25s var(--kh-ease), scale .35s var(--kh-ease);
}
.kh-panel__btn[aria-current] { --kh-fg: var(--kh-on-ink); background: var(--kh-ink); }
.kh-panel__btn .kh-cart-count { position: static; }
.kh-panel__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding-top: 2px; border-top: 1px solid var(--kh-hair); font-size: 14px; }
.kh-panel__meta a { --kh-fg: var(--kh-mute); display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; text-decoration: underline; text-decoration-color: rgb(var(--kh-tint) / .25); text-underline-offset: 3px; }
/* Scroll lock while the menu is open. The theme gives <body> overflow-x:hidden; once <html> is overflow:hidden the viewport no longer takes
   that value from <body>, so <body> becomes a scroll container itself and the sticky pill stops sticking (it scrolled away and the
   panel was measured from a pill at -500 px on a scrolled page). Keeping <body> visible while locked leaves the viewport as the only scroller. */
html.kh-lock { overflow: hidden; }
html.kh-lock body { overflow: visible; }

/* Short screens (small phones, landscape): tighter rows, the panel scrolls if it still does not fit. */
@media (max-height: 660px) {
	.kh-panel { padding-top: var(--kh-top, 80px); }
	.kh-panel__nav a { min-height: 60px; padding: 6px 0; }
	.kh-panel__core { min-height: 112px; }
	.kh-panel__btn { min-height: 48px; }
	.kh-panel__in { gap: 10px; }
}

@media (max-width: 900px) {
	.kh { height: 72px; padding-top: 8px; }
	.kh-island { width: calc(100% - 16px); justify-content: space-between; gap: 12px; padding-left: 20px; }
	.kh-nav { display: none; }
	.kh-account { display: none; }
	.kh-burger { display: block; }
}

@media (prefers-reduced-motion: reduce) {
	.kh *, .kh *::before, .kh *::after { transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* Very narrow phones (320): keep "Book a lash appointment" on one line. */
@media (max-width: 350px) {
	.kh-panel__in { padding-left: 18px; padding-right: 18px; }
	.kh-panel__book { padding-left: 20px; font-size: 14px; }
}
