/* Newsletter: −10% sign-up popup (bottom sheet on phones, centred modal from 640px) and the result notice.
   Spec "Global components" 5 (dark newsletter card), restyled with Oryon tokens. Owner: newsletter area. */

html.nl-lock { overflow: hidden; }

/* ---------- Popup shell ---------- */
.nl-pop { position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-end; justify-content: center; }
.nl-pop[hidden] { display: none; }
.nl-pop__scrim {
	position: absolute; inset: 0;
	background: color-mix(in srgb, var(--ink) 62%, transparent);
	-webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
	opacity: 0; transition: opacity .35s var(--ease);
}
.nl-pop__dialog {
	position: relative; width: 100%;
	padding: 48px 20px calc(20px + env(safe-area-inset-bottom));
	border-radius: var(--r-xl) var(--r-xl) 0 0;
	background: var(--grad-news);
	box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent) 35%, transparent), var(--sh-lg);
	color: var(--on-dark); text-align: center;
	transform: translateY(105%); transition: transform .45s var(--ease);
}
.nl-pop__dialog:focus { outline: none; }
.nl-pop.is-open .nl-pop__scrim { opacity: 1; }
.nl-pop.is-open .nl-pop__dialog { transform: none; }

/* The scroll container is the body, so the badge can overlap the top edge without being clipped. */
.nl-pop__body { max-height: calc(88dvh - 68px); overflow-y: auto; overscroll-behavior: contain; padding: 4px 2px 0; }

.nl-pop__badge {
	position: absolute; top: -32px; left: 50%; transform: translateX(-50%);
	display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
	background: var(--grad); color: var(--paper);
	box-shadow: 0 0 0 4px var(--paper), var(--sh-btn);
}
.nl-pop__mail { width: 26px; height: 26px; }
.nl-pop__close {
	position: absolute; top: 8px; right: 8px;
	display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
	background: color-mix(in srgb, var(--paper) 8%, transparent); color: var(--paper); cursor: pointer;
	transition: background-color .2s;
}
.nl-pop__close:hover { background: color-mix(in srgb, var(--paper) 16%, transparent); }
.nl-pop__x { width: 20px; height: 20px; }

.nl-pop__kicker, .nl-band__kicker {
	display: inline-flex; margin: 0 0 14px; padding: 6px 14px; border-radius: var(--r-tag);
	border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
	background: color-mix(in srgb, var(--accent) 16%, transparent);
	color: var(--orange-100); font: 500 11px/1.2 var(--font-text); letter-spacing: .1em; text-transform: uppercase;
}
.nl-pop__title {
	margin: 0 auto 12px; max-width: 16ch;
	font: 500 32px/1 var(--font-display); letter-spacing: -.04em;
	background: var(--grad-text-dark); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nl-pop__sub { margin: 0 auto 20px; max-width: 40ch; font-size: 15px; line-height: 1.45; color: var(--on-dark); }

/* ---------- Form (also reusable outside the popup) ---------- */
.nl-form { text-align: left; }
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nl-row { display: grid; gap: 10px; }
.nl-input {
	width: 100%; min-height: 54px; padding: 0 18px;
	border: 1.5px solid transparent; border-radius: var(--r-img);
	background: var(--paper); color: var(--ink); font-size: 16px;
	transition: border-color .2s, box-shadow .2s;
}
.nl-input::placeholder { color: var(--ink-70); }
.nl-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.nl-input[aria-invalid="true"] { border-color: var(--stock-out); }
.nl-submit { position: relative; min-height: 54px; width: 100%; font-size: 15px; }
.nl-submit:focus-visible { outline-color: var(--paper); }
.nl-submit[aria-busy="true"] { pointer-events: none; opacity: .85; }
.nl-spinner { display: none; width: 16px; height: 16px; border: 2px solid color-mix(in srgb, var(--paper) 40%, transparent); border-top-color: var(--paper); border-radius: 50%; animation: nl-spin .8s linear infinite; }
.nl-submit[aria-busy="true"] .nl-spinner { display: inline-block; }
@keyframes nl-spin { to { transform: rotate(360deg); } }

.nl-error, .nl-alert {
	display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0;
	font-size: 13px; line-height: 1.35; color: var(--orange-200);
}
.nl-error[hidden], .nl-alert[hidden] { display: none; }
.nl-error::before, .nl-alert::before {
	content: "!"; flex: none; display: grid; place-items: center; width: 16px; height: 16px; margin-top: 1px;
	border-radius: 50%; background: var(--stock-out); color: var(--paper); font: 500 11px/1 var(--font-text);
}
.nl-alert { padding: 10px 12px; border-radius: var(--r-img); background: color-mix(in srgb, var(--stock-out) 14%, transparent); }

.nl-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 4px 0; cursor: pointer; }
.nl-consent__box {
	flex: none; width: 20px; height: 20px; margin: 0; margin-top: 1px;
	accent-color: var(--accent); cursor: pointer;
}
.nl-consent__text { font-size: 12px; line-height: 1.45; color: color-mix(in srgb, var(--on-dark) 85%, transparent); }
.nl-consent__text a { color: var(--paper); }
.nl-consent__text a:hover { color: var(--orange-100); }
.nl-note { margin: 14px 0 0; font-size: 12px; font-style: italic; text-align: center; color: var(--ink-50); }

/* Result panels (replace the form after sign-up) */
.nl-result { padding: 8px 0 4px; text-align: center; }
.nl-result[hidden] { display: none; }
.nl-result__icon {
	display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%;
	background: color-mix(in srgb, var(--mint) 18%, transparent); color: var(--mint);
}
.nl-result--exists .nl-result__icon { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--orange-300); }
.nl-result__svg { width: 24px; height: 24px; }
.nl-result__title { margin: 0 0 8px; font: 500 26px/1.05 var(--font-display); letter-spacing: -.03em; color: var(--paper); }
.nl-result__title:focus { outline: none; }
.nl-result__text { margin: 0 auto 20px; max-width: 38ch; font-size: 15px; line-height: 1.45; }
.nl-result__text strong { color: var(--paper); font-weight: 500; overflow-wrap: anywhere; }
.nl-result__btn { min-height: 48px; }
.nl-done .nl-pop__head { display: none; }

/* ---------- Band above the footer (template-parts/newsletter-band.php) ----------
   A ticket: orange −10% stub, perforated edge with notches in the page colour, dark body with the form.
   Phones: stub on top. ≥ 900px: stub left, copy and form side by side. */
.nl-band { padding: 32px 0 48px; background: var(--paper); }
.nl-band__ticket { position: relative; display: flex; flex-direction: column; border-radius: var(--r-xl); box-shadow: var(--sh-lg); }
.nl-band__stub {
	position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
	padding: 26px 20px 28px; border-bottom: 2px dashed color-mix(in srgb, var(--paper) 55%, transparent);
	border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--grad); color: var(--paper); text-align: center;
}
.nl-band__stub::before, .nl-band__stub::after {
	content: ""; position: absolute; bottom: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper);
}
.nl-band__stub::before { left: -12px; }
.nl-band__stub::after { right: -12px; }
.nl-band__value { font: 500 64px/.9 var(--font-display); letter-spacing: -.05em; }
.nl-band__for { font-size: 14px; line-height: 1.3; color: color-mix(in srgb, var(--paper) 88%, transparent); }
.nl-band__body {
	padding: 28px 20px 24px; border-radius: 0 0 var(--r-xl) var(--r-xl);
	background: var(--grad-news); color: var(--on-dark);
}
.nl-band__kicker { margin-bottom: 12px; }
.nl-band__title {
	margin: 0 0 10px; font: 500 28px/1.05 var(--font-display); letter-spacing: -.04em;
	background: var(--grad-text-dark); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nl-band__sub { margin: 0 0 20px; max-width: 46ch; font-size: 15px; line-height: 1.45; }
.nl-form-wrap--band .nl-note { text-align: left; }
.nl-form-wrap--band .nl-result__btn { display: none; } /* "Continue shopping" closes the popup; the band has nothing to close */
.nl-form-wrap--band .nl-result__text { margin-bottom: 0; }

@media (min-width: 640px) {
	.nl-form-wrap--band .nl-row { grid-template-columns: 1fr auto; }
	.nl-form-wrap--band .nl-submit { width: auto; padding-inline: 28px; }
}
@media (min-width: 900px) {
	.nl-band { padding: 40px 0 72px; }
	.nl-band__ticket { flex-direction: row; }
	.nl-band__stub {
		flex: 0 0 240px; padding: 32px 24px;
		border-bottom: 0; border-right: 2px dashed color-mix(in srgb, var(--paper) 55%, transparent);
		border-radius: var(--r-xl) 0 0 var(--r-xl);
	}
	.nl-band__stub::before, .nl-band__stub::after { left: auto; right: -13px; bottom: auto; }
	.nl-band__stub::before { top: -12px; }
	.nl-band__stub::after { bottom: -12px; }
	.nl-band__value { font-size: 84px; }
	.nl-band__body {
		flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 24px 48px; align-items: center;
		padding: 40px 44px; border-radius: 0 var(--r-xl) var(--r-xl) 0;
	}
	.nl-band__title { font-size: 36px; }
	.nl-band__sub { margin-bottom: 0; }
}

/* ---------- Result notice (no-JS post, unsubscribe link) ---------- */
.nl-notice {
	position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 140;
	display: flex; gap: 12px; align-items: flex-start;
	padding: 16px 8px 16px 16px; border-radius: var(--r-card);
	background: var(--ink); color: var(--on-dark);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--paper) 12%, transparent), var(--sh-lg);
	animation: nl-rise .5s var(--ease) both;
}
.nl-notice__icon {
	flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
	background: color-mix(in srgb, var(--mint) 18%, transparent); color: var(--mint);
}
.nl-notice--error .nl-notice__icon { background: color-mix(in srgb, var(--stock-out) 18%, transparent); color: var(--orange-200); }
.nl-notice__svg { width: 20px; height: 20px; }
.nl-notice__body { flex: 1; min-width: 0; padding-top: 2px; }
.nl-notice__title { margin: 0 0 4px; font: 500 16px/1.2 var(--font-display); color: var(--paper); }
.nl-notice__text { margin: 0; font-size: 14px; line-height: 1.4; }
.nl-notice__close {
	flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -10px 0 -10px; border-radius: 50%;
	color: var(--paper);
}
.nl-notice__close:hover { color: var(--orange-100); }
.nl-notice__x { width: 18px; height: 18px; }
@keyframes nl-rise { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
	.nl-pop { align-items: center; padding: 48px 24px; }
	.nl-pop__dialog {
		max-width: 520px; padding: 56px 40px 32px; border-radius: var(--r-xl);
		box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent), var(--sh-lg);
		transform: translateY(24px) scale(.96); opacity: 0;
		transition: transform .45s var(--ease), opacity .3s var(--ease);
	}
	.nl-pop.is-open .nl-pop__dialog { opacity: 1; }
	.nl-pop__body { max-height: calc(100dvh - 200px); }
	.nl-pop__close { top: 12px; right: 12px; }
	.nl-pop__title { font-size: 38px; }
	.nl-row { grid-template-columns: 1fr auto; }
	.nl-submit { width: auto; padding-inline: 24px; }
	.nl-notice { left: 24px; right: auto; bottom: 24px; max-width: 420px; }
}

@media (prefers-reduced-motion: reduce) {
	.nl-pop__dialog, .nl-pop.is-open .nl-pop__dialog { transform: none; }
}
