/* High Tea: "coming soon" bar + notify-me pop-up. Switch off: see inc/promo.php. */

/* ---------- Top bar (server-rendered, fixed height: no layout shift) ---------- */
.ht-bar {
	position: relative; z-index: 60; box-sizing: border-box; height: 40px; overflow: hidden;
	display: flex; align-items: center; gap: 8px; padding: 0 4px 0 16px;
	background: var(--wp--preset--color--card); border-bottom: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--text-85, rgba(247,245,243,.85));
	font: 600 11px/1 var(--wp--preset--font-family--body); letter-spacing: .2em; text-transform: uppercase;
}
.ht-bar::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: var(--ht-gradient); opacity: .9; }
.ht-bar-off .ht-bar { display: none; }
.ht-bar__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ht-bar__marquee {
	flex: 1 1 auto; min-width: 0; overflow: hidden; height: 100%; display: flex; align-items: center;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent);
}
.ht-bar__track { display: flex; flex: none; width: max-content; animation: ht-bar-scroll 110s linear infinite; will-change: transform; }
.ht-bar:hover .ht-bar__track { animation-play-state: paused; }
.ht-bar__group { display: flex; flex: none; }
.ht-bar__item { flex: none; white-space: nowrap; padding-right: 56px; position: relative; }
.ht-bar__item::after { content: "\2726"; position: absolute; right: 22px; color: #A1A1AA; font-size: 9px; }
.ht-bar__item em {
	font: italic 400 15px/1 var(--wp--preset--font-family--display); letter-spacing: .02em; text-transform: none;
	color: var(--wp--preset--color--foreground); padding: 0 .1em;
}
@keyframes ht-bar-scroll { to { transform: translateX(-50%); } }
.ht-bar__cta {
	flex: none; display: inline-flex; align-items: center; height: 26px; padding: 0 14px;
	border: 1px solid #6B6B73; color: var(--wp--preset--color--foreground); text-decoration: none;
	transition: background .3s, color .3s, border-color .3s;
}
.ht-bar__cta:hover, .ht-bar__cta:focus-visible { background: var(--wp--preset--color--foreground); border-color: var(--wp--preset--color--foreground); color: #0A0A0A; }
.ht-bar__x {
	flex: none; width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 0; padding: 0;
	color: var(--wp--preset--color--muted-foreground); cursor: pointer; transition: color .2s;
}
.ht-bar__x:hover, .ht-bar__x:focus-visible { color: var(--wp--preset--color--foreground); }
@media (max-width: 600px) {
	.ht-bar { height: 38px; padding-left: 12px; font-size: 10px; }
	.ht-bar__x { height: 38px; width: 38px; }
	.ht-bar__cta { height: 24px; padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
	.ht-bar__marquee { -webkit-mask-image: none; mask-image: none; }
	.ht-bar__track { animation: none; width: auto; }
	.ht-bar__group + .ht-bar__group, .ht-bar__group .ht-bar__item + .ht-bar__item { display: none; }
	.ht-bar__item { white-space: normal; padding-right: 0; line-height: 1.25; letter-spacing: .14em; }
	.ht-bar__item::after { display: none; }
}

/* ---------- Pop-up ---------- */
.ht-pop {
	position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 24px;
	visibility: hidden; overscroll-behavior: contain;
}
.ht-pop.is-ready { visibility: visible; }
.ht-pop__backdrop { position: absolute; inset: 0; background: rgba(14,14,16,.72); opacity: 0; transition: opacity .5s var(--ht-ease); }
.ht-pop.is-open .ht-pop__backdrop { opacity: 1; }
.ht-pop__card {
	position: relative; box-sizing: border-box; width: min(820px, 100%); max-height: calc(100dvh - 48px); overflow: auto;
	display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
	background: var(--wp--preset--color--card); border: 1px solid var(--wp--preset--color--border);
	box-shadow: 0 40px 120px rgba(0,0,0,.6);
	opacity: 0; transform: translateY(28px) scale(.985); transition: opacity .6s var(--ht-ease), transform .7s var(--ht-ease);
}
.ht-pop.is-open .ht-pop__card { opacity: 1; transform: none; }
.ht-pop__card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--ht-gradient); z-index: 2; }
.ht-pop__cover { position: relative; margin: 0; overflow: hidden; background: #0E0E10; aspect-ratio: 3 / 4; align-self: stretch; }
.ht-pop__cover img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.07); transition: transform 1.8s var(--ht-ease); }
.ht-pop.is-open .ht-pop__cover img { transform: scale(1); }
.ht-pop__cover::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 60px rgba(14,14,16,.55); pointer-events: none; }
.ht-pop__body { padding: 56px 48px 44px; display: flex; flex-direction: column; justify-content: center; gap: 0; }
.ht-pop__kicker { margin: 0 0 14px; font: 600 11px/1 var(--wp--preset--font-family--body); letter-spacing: .2em; text-transform: uppercase; color: var(--wp--preset--color--muted-foreground); }
.ht-pop__title { margin: 0 0 18px; font: 400 clamp(40px, 5vw, 60px)/1.02 var(--wp--preset--font-family--display); letter-spacing: -.01em; color: var(--wp--preset--color--foreground); }
.ht-pop__title em { font-style: italic; }
.ht-pop__text { margin: 0 0 10px; font: 400 16px/1.55 var(--wp--preset--font-family--body); color: var(--wp--preset--color--text-85, rgba(247,245,243,.85)); }
.ht-pop__form { margin-top: 18px; max-width: none; }
.ht-pop__fine { margin: 18px 0 0; font: 400 12px/1.5 var(--wp--preset--font-family--body); color: var(--wp--preset--color--muted-foreground); }
.ht-pop__close {
	position: absolute; top: 6px; right: 6px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
	background: none; border: 0; color: var(--wp--preset--color--foreground); cursor: pointer; opacity: .8; transition: opacity .2s;
}
.ht-pop__close:hover, .ht-pop__close:focus-visible { opacity: 1; }
.ht-pop__card:focus { outline: none; }
.ht-pop .ht-newsletter__row .ht-btn { padding: 16px 26px; }
/* staggered text reveal */
.ht-pop__body > * { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ht-ease), transform .8s var(--ht-ease); }
.ht-pop.is-open .ht-pop__body > * { opacity: 1; transform: none; }
.ht-pop.is-open .ht-pop__body > :nth-child(1) { transition-delay: .25s; }
.ht-pop.is-open .ht-pop__body > :nth-child(2) { transition-delay: .35s; }
.ht-pop.is-open .ht-pop__body > :nth-child(3) { transition-delay: .45s; }
.ht-pop.is-open .ht-pop__body > :nth-child(4) { transition-delay: .55s; }
.ht-pop.is-open .ht-pop__body > :nth-child(5) { transition-delay: .65s; }
.ht-pop.is-open .ht-pop__body > :nth-child(6) { transition-delay: .75s; }
.ht-pop.is-closing .ht-pop__card, .ht-pop.is-closing .ht-pop__backdrop { transition-duration: .25s; transition-delay: 0s; }

/* Mobile: a compact bottom sheet, never a full-screen interstitial */
@media (max-width: 640px) {
	.ht-pop { align-items: end; padding: 0; }
	.ht-pop__backdrop { background: rgba(14,14,16,.35); }
	.ht-pop__card {
		width: 100%; max-height: min(62dvh, 440px); grid-template-columns: 92px minmax(0, 1fr); grid-template-areas: "cover head" "form form" "fine fine";
		border-width: 1px 0 0; transform: translateY(100%); column-gap: 16px; padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
		overflow: auto; box-shadow: 0 -20px 60px rgba(0,0,0,.5);
	}
	.ht-pop.is-open .ht-pop__card { transform: none; }
	.ht-pop__cover { grid-area: cover; aspect-ratio: 3 / 4; align-self: start; }
	.ht-pop__body { display: contents; }
	.ht-pop__head { grid-area: head; }
	.ht-pop__body > * { transition-delay: 0s !important; }
	.ht-pop__kicker { margin-bottom: 8px; padding-right: 36px; }
	.ht-pop__title { font-size: 32px; margin-bottom: 8px; }
	.ht-pop__text { font-size: 14px; margin: 0; }
	.ht-pop__text--more { display: none; }
	.ht-pop__form { grid-area: form; margin-top: 14px; }
	.ht-pop__fine { grid-area: fine; margin-top: 10px; font-size: 11px; }
	.ht-pop .ht-newsletter__row { gap: 10px; }
	.ht-pop .ht-newsletter__row .ht-btn { width: 100%; padding: 14px 20px; }
	.ht-pop__close { top: 2px; right: 2px; }
}
@media (prefers-reduced-motion: reduce) {
	.ht-pop__backdrop, .ht-pop__card, .ht-pop__cover img, .ht-pop__body > * { transition: none !important; transform: none !important; }
	.ht-pop__card { opacity: 1; }
	.ht-pop__body > * { opacity: 1; }
	.ht-pop__backdrop { opacity: 1; }
}
