/**
 * BLOW — refinements for the BLOW preset.
 *
 * Loaded only while BLOW is the active or previewed design (body.ns-design-blow).
 * Colours, Jost, light weights, wide tracking and the button style come from
 * styles/blow.json; this file only adjusts what the shared CSS hard-codes and
 * a token cannot change:
 * - shapes: square cards, panels, chips and fields; hairlines instead of glow;
 * - light: no ambient orbs or glows, a quiet grid in the hero;
 * - type: bold display weights become light, labels become tracked capitals;
 * - brand: no Nightshift dot next to a logo, the wordmark sized like the PDF;
 * - footer: onyx ground with the palette inverted locally.
 * Values set in Appearance → Nightshift (radii, glow, lift) still win: they are
 * printed on :root only when changed, and these defaults sit on the body.
 */

/* ---------- Tokens ---------- */
.ns-design-blow {
	--blow-sage: var(--wp--custom--color--sage, #9fb0ab);
	--blow-onyx: var(--wp--custom--color--onyx, #0b0b0b);
	--blow-ivory: var(--wp--custom--color--ivory, #f4f1ec);
	--blow-hairline: 1px solid var(--wp--preset--color--border);
	--blow-label-tracking: .24em;
	--ns-panel-radius: var(--wp--custom--radius, 2px);
	--ns-glow: transparent;
	--ns-glow-secondary: transparent;
	--ns-glow-strength: 0;
	--ns-ambient-secondary: 0;
	--ns-lift: 0;
}

/* ---------- Base ---------- */
.ns-design-blow ::selection { background: var(--blow-sage); color: var(--blow-onyx); }
.ns-design-blow :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { border-radius: 0; outline-width: 1px; }
.ns-design-blow input[type="text"], .ns-design-blow input[type="email"], .ns-design-blow input[type="search"],
.ns-design-blow input[type="tel"], .ns-design-blow input[type="url"], .ns-design-blow input[type="password"],
.ns-design-blow input[type="number"], .ns-design-blow select, .ns-design-blow textarea {
	border-radius: 0;
	background: var(--wp--preset--color--surface-raised);
	border-color: var(--wp--preset--color--border-strong);
}
.ns-design-blow input:focus, .ns-design-blow select:focus, .ns-design-blow textarea:focus { box-shadow: none; border-color: var(--wp--preset--color--contrast); }

/* Bold display text in the shared CSS: light in BLOW, like the PDF's one-family system. */
.ns-design-blow :is(
	.ns-cat-card__name, .ns-card__title, .ns-search__name, .ns-contact-card__value,
	.nsc-report__title, .nsc-review__text, .nsc-report-details__facts dd, .ns-article__nav .wp-block-post-navigation-link a,
	.ns-pdp__claim, .wc-block-components-product-name, .wc-block-product-filters h3, .ns-faq__list .wp-block-accordion-heading__toggle
) { font-weight: 400; }
.ns-design-blow :is(.wc-block-cart__totals-title, .wc-block-components-checkout-order-summary__title-text, .wc-block-components-title,
	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title, .wc-block-mini-cart__footer-subtotal .wc-block-components-totals-item__label) { font-weight: 400 !important; }
.ns-design-blow :is(.ns-cat-card__name, .ns-card__title, .wc-block-components-product-name) { letter-spacing: .04em; }

/* Labels and eyebrows: Jost Regular, tracked capitals (PDF "Label"). */
.ns-design-blow :is(.ns-eyebrow, .ns-kicker, .ns-card__cat, .ns-chip, .ns-hero__chips p, .ns-ticker, .ns-badge, .wc-block-components-product-badge, .onsale) {
	font-weight: 400;
	letter-spacing: var(--blow-label-tracking);
	text-transform: uppercase;
}

/* ---------- Header ---------- */
.ns-design-blow .ns-header { border-bottom: var(--blow-hairline); }
.ns-design-blow .ns-brand.ns-has-kit-logo a::after,
.ns-design-blow .ns-brand.ns-has-kit-logo::after { display: none; }
.ns-design-blow .ns-kit-logo { display: block; width: auto; height: 22px; max-width: none; }
.ns-design-blow .ns-header__search .wp-block-search__input { text-transform: none; letter-spacing: .02em; font-weight: 300; border-radius: 0; }
.ns-design-blow :is(.ns-header__search .wp-block-search__button, .ns-header__account a, .ns-header__cart .wc-block-mini-cart__button) { border-radius: 0 !important; }
.ns-design-blow .ns-header__nav { letter-spacing: .12em; text-transform: uppercase; font-size: var(--wp--preset--font-size--x-small); font-weight: 400; }
@media (max-width: 781px) {
	.ns-design-blow .ns-kit-logo { height: 16px; }
}

/* ---------- Hero and ambient light ---------- */
.ns-design-blow .ns-hero::after,
.ns-design-blow .ns-hero__inner::before,
.ns-design-blow .ns-hero__inner::after,
.ns-design-blow .ns-fx::before,
.ns-design-blow .ns-fx--float::after { display: none; }
.ns-design-blow .ns-hero::before { opacity: .5; }
.ns-design-blow .ns-hero__title { font-weight: 300; }

/* ---------- Cards and panels ---------- */
.ns-design-blow .ns-card { background: var(--wp--preset--color--surface-raised); }
.ns-design-blow .ns-card:hover, .ns-design-blow .ns-card:focus-within { border-color: var(--wp--preset--color--contrast); box-shadow: none; }
.ns-design-blow .ns-card:hover .ns-card__image img { transform: none; }
.ns-design-blow .ns-cat-card { background: var(--wp--preset--color--surface-raised); box-shadow: none; }
.ns-design-blow :is(.wc-block-components-product-badge, .onsale) { background: var(--blow-sage) !important; color: var(--blow-onyx) !important; border: 0 !important; border-radius: 0 !important; }

/* ---------- Footer: onyx ---------- */
.ns-design-blow .ns-footer {
	--wp--preset--color--base: var(--blow-onyx);
	--wp--preset--color--surface: #141414;
	--wp--preset--color--surface-raised: #141414;
	--wp--preset--color--border: #242424;
	--wp--preset--color--border-strong: #4a4a4a;
	--wp--preset--color--contrast: var(--blow-ivory);
	--wp--preset--color--contrast-muted: #b9b2a8;
	--wp--preset--color--secondary: #a79e93;
	--wp--preset--color--accent: var(--blow-sage);
	--wp--preset--color--on-accent: var(--blow-onyx);
	background: var(--blow-onyx);
	color: var(--blow-ivory);
	border-top: 0;
}
.ns-design-blow .ns-footer :where(a) { color: inherit; }
.ns-design-blow .ns-footer__wordmark.ns-has-kit-logo {
	color: inherit !important;
	-webkit-text-stroke: 0;
	background: none;
	translate: none;
	padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2.5rem, 7vw, 5rem);
	display: flex;
	justify-content: center;
	border-top: 1px solid #242424;
}
.ns-design-blow .ns-footer__wordmark .ns-kit-logo { height: auto; width: min(100%, 1080px); }

/* ---------- Geometry: square corners where the shared CSS fixes a radius ---------- */
/* Circles (counters, toggles, swatches) and the hero illustration keep their shape. */
.ns-design-blow :is(
	.ns-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content,
	.ns-result__image, .ns-search__item, .ns-search__thumb, .nsc-form__alert, .nsc-report-details__facts > div,
	.nsc-reports__empty, .ns-article__nav .wp-block-post-navigation-link, .ns-article__content .is-style-fine-print,
	.ns-arrivals__stamp, :not(pre) > code,
	.ns-card .nsc-spec, .ns-pdp__spec .nsc-spec__value, .ns-pdp__spec .nsc-spec__format, .ns-mini__image, .ns-review,
	.ns-card .wc-block-components-product-sale-badge, .ns-pdp__gallery .wc-block-components-product-sale-badge,
	.wc-block-components-product-badge, .wc-block-product-gallery-thumbnails__thumbnail, .wc-block-product-gallery-large-image,
	.wc-block-cart-item__image img, .wc-block-components-order-summary-item__image img, .wc-block-mini-cart-items .wc-block-cart-item__image img,
	.wc-block-components-address-card, .wc-block-components-address-form textarea, .wc-block-order-confirmation-address-wrapper address,
	.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option, .wc-block-components-radio-control-accordion-option,
	.wc-block-components-text-input input, .wc-blocks-components-select .wc-blocks-components-select__select,
	.wc-block-components-combobox .wc-block-components-combobox-control input, .wc-block-components-notice-banner,
	.wc-block-product-filter-price-slider input[type="text"],
	.woocommerce table.shop_table, .woocommerce-orders-table, .woocommerce-Address, .woocommerce-message, .woocommerce-info, .woocommerce-error,
	.wp-block-image.has-custom-border img, .ns-lib-overlap__card, .ns-lib-layer__card,
	.woocommerce-Input, .woocommerce form .input-text, .wc-block-add-to-cart-with-options__quantity-selector, .wc-block-components-quantity-selector
) { border-radius: 0 !important; }
/* Library headings (h3/h4 default to 700 in theme.json): the family's light weight, one step up for legibility at small sizes. */
.ns-design-blow :is(h3, h4).wp-block-heading { font-weight: 400; }

/* ---------- Type details ---------- */
.ns-design-blow .ns-hero__title { letter-spacing: .06em !important; line-height: 1.04 !important; }
.ns-design-blow :is(.wc-block-components-product-price, .ns-pdp__price, .ns-card__price, .wc-block-formatted-money-amount) { font-weight: 400; letter-spacing: .02em; }
.ns-design-blow .ns-pdp__price { font-weight: 300; }
.ns-design-blow .ns-header__search .wp-block-search__button { font-weight: 400; letter-spacing: .16em; }

/* Buttons: tighter tracking where space is short (cards, narrow screens). */
.ns-design-blow :is(.ns-card, .wc-block-grid__product, .wc-block-product) :is(.wp-block-button__link, .wp-element-button, .add_to_cart_button) { letter-spacing: .16em; padding-inline: 1rem; }
@media (max-width: 781px) {
	.ns-design-blow :is(.wp-element-button, .wp-block-button__link) { letter-spacing: .18em; padding-inline: 1.25rem; }
	.ns-design-blow :is(.ns-card, .wc-block-grid__product, .wc-block-product) :is(.wp-block-button__link, .wp-element-button, .add_to_cart_button) { letter-spacing: .1em; padding-inline: .6rem; }
}
/* WooCommerce links styled as buttons elsewhere: the BLOW button. */
.ns-design-blow :is(.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title + p a, .wc-block-product-filters__open-overlay, .wc-block-product-filters__apply, .nsc-form__submit, .nsc-report-details__file, .nsc-newsletter__form button, .nsc-newsletter__form input[type="submit"]) {
	border-radius: 0 !important;
	font-weight: 500;
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: .24em;
	text-transform: uppercase;
}
.ns-design-blow .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title + p a { background: var(--wp--preset--color--contrast); color: var(--wp--preset--color--base); }
.ns-design-blow .wc-block-product-filters__open-overlay { font-weight: 400; }

/* ---------- Category cards: no orbs, hairline hover ---------- */
.ns-design-blow .ns-cat-card::before { display: none; }
.ns-design-blow .ns-cat-card:hover, .ns-design-blow .ns-cat-card:focus-within { border-color: var(--wp--preset--color--contrast); }

/* ---------- Pass 3 ---------- */
/* Hero: the claim fits in two lines, like the identity's display lockup. */
.ns-design-blow .ns-hero__title.has-huge-font-size { font-size: clamp(2.4rem, 4.6vw, 4.4rem) !important; }

/* Prices: light figures (the amount is set on inner elements). */
.ns-design-blow :is(.ns-pdp__price, .ns-card__price, .wc-block-components-product-price) :is(*, .woocommerce-Price-amount) { font-weight: inherit; }
.ns-design-blow :is(.ns-pdp__price, .wc-block-components-product-price) { font-weight: 300; }

/* Product names in WooCommerce collections (cross-sells, empty cart, related). */
.ns-design-blow :is(.wc-block-grid__product-title, .wc-block-components-product-name, .wp-block-woocommerce-product-collection .wp-block-post-title) { font-weight: 400 !important; letter-spacing: .04em; }

/* WooCommerce section titles: the identity's subhead (light, tracked capitals). */
.ns-design-blow :is(.wc-block-cart__totals-title, .wc-block-components-checkout-order-summary__title-text, .wc-block-components-title, .wc-block-components-checkout-step__title) {
	font-weight: 300 !important;
	letter-spacing: .14em !important;
	text-transform: uppercase !important;
}

/* Primary commerce actions: the BLOW button (onyx, sage on hover). */
.ns-design-blow :is(.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button, .wc-block-mini-cart__footer-checkout, .woocommerce-Button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button) {
	background: var(--wp--preset--color--contrast) !important;
	color: var(--wp--preset--color--base) !important;
	border-radius: 0 !important;
	font-weight: 500;
	letter-spacing: .24em;
	text-transform: uppercase;
}
.ns-design-blow :is(.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button, .wc-block-mini-cart__footer-checkout, .woocommerce-Button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button):is(:hover, :focus-visible) {
	background: var(--wp--preset--color--accent) !important;
	color: var(--wp--preset--color--on-accent) !important;
}

/* Add to cart next to the quantity field: one line on narrow screens. */
@media (max-width: 781px) {
	.ns-design-blow .wc-block-add-to-cart-with-options :is(button[type="submit"], .single_add_to_cart_button) { letter-spacing: .14em; white-space: nowrap; padding-inline: 1rem; }
}
