/* NoteyStuff — content patterns (Phase R3).
 *
 * Styles for the block patterns used on Home, About and Contact, plus readable defaults
 * for the policy pages. Page content stays plain Gutenberg blocks carrying `ns-` classes,
 * so the markup is portable and the design lives here.
 */

/* ===============================================================
 * Section rhythm inside page content
 *
 * Kadence gives block groups no vertical rhythm of their own, which is how the old build
 * ended up with a 2000px band. .ns-section supplies a single clamped scale.
 * =============================================================== */

.entry-content > .ns-section {
	margin-block: 0;
}

/* Full-bleed sections need their own gutter.
 *
 * `.ns-section` is an alignfull group: it deliberately breaks out of Kadence's 24px-padded
 * `.content-container` so its background can run edge to edge. Its *contents* were relying on
 * the inner blocks' `max-width: 1200px` for their inset — which does nothing at all once the
 * viewport is narrower than 1200px. On a phone that put the hero heading, the body copy, the
 * buttons and the category cards flush against both edges of the screen with zero margin.
 *
 * The padding goes on the inner container, never on both, or it doubles. 24px matches the
 * site container exactly at mobile so full-bleed and normal sections line up. */
.entry-content > .ns-section > .wp-block-group__inner-container {
	padding-inline: clamp(1.5rem, 4vw, 2rem);
}

/* Kadence stacks its own content padding above the first block; with full-bleed sections
 * that reads as a dead band under the header. Page vertical padding is set to "hide" in the
 * Customizer and this removes the remaining wrapper gap. */
.page .content-wrap,
.page .entry-content {
	padding-block: 0;
}

/* A lazy-load placeholder must never collapse a hero image and shift the page. */
.ns-hero__media img[data-lazyloaded],
.ns-about-media img[data-lazyloaded] {
	min-height: 240px;
}

/* Kadence sets large top margins on headings inside .entry-content (h1 gets 84px), which
 * fights the section rhythm and opens dead space under every eyebrow. Vertical rhythm comes
 * from .ns-section and the block spacing below, not from heading margins. */
.entry-content :is(h1, h2, h3, h4, h5, h6) {
	margin-top: 0;
}

.entry-content .ns-eyebrow {
	margin-bottom: var(--ns-space-2);
}

.entry-content .ns-lead {
	margin-top: var(--ns-space-4);
}

.ns-section-sub {
	margin-inline: auto;
	margin-bottom: var(--ns-space-6);
}

/* The bare `.ns-center-actions` rule lost to WordPress's block layout margins, so the "See all
 * six designs" button sat hard against the product grid. */
.entry-content .ns-center-actions {
	justify-content: center;
	margin-top: var(--ns-space-6);
}

/* A section's last child does not need a bottom margin — the section's own padding is the
 * spacing. Without this the value strip added 32px on top of two 80px band paddings. */
.entry-content > .ns-section > .wp-block-group__inner-container > *:last-child {
	margin-bottom: 0;
}

/* Buttons authored in content ----------------------------------- */

.wp-block-button.ns-secondary .wp-block-button__link {
	background-color: transparent;
	border-color: var(--ns-color-border-strong);
	color: var(--ns-color-text);
}

.wp-block-button.ns-secondary .wp-block-button__link:hover {
	background-color: var(--ns-color-surface-accent);
	border-color: var(--ns-color-accent-ink);
	color: var(--ns-color-text);
}

/* ===============================================================
 * Hero
 * =============================================================== */

.ns-hero {
	background: linear-gradient(180deg, var(--ns-rose-wash) 0%, var(--ns-color-bg) 100%);
}

.ns-hero h1 {
	margin-bottom: var(--ns-space-4);
}

.ns-hero .ns-lead {
	margin-bottom: var(--ns-space-5);
}

.ns-hero__actions {
	gap: var(--ns-space-3);
	margin-bottom: var(--ns-space-4);
}

.ns-hero__note {
	font-size: var(--ns-text-sm);
	margin-bottom: 0;
}

.ns-hero__media img {
	border-radius: var(--ns-radius-xl);
	box-shadow: var(--ns-shadow-lg);
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
}

/* Banner-ready hero: supplied artwork can replace the image without changing the layout. */
@media (min-width: 782px) {
	.ns-hero__cols,
	.page-id-115 .ns-hero > .wp-block-group__inner-container > .wp-block-columns {
		position: relative;
		isolation: isolate;
		min-height: clamp(520px, 72vh, 720px);
		align-items: stretch;
	}

	.ns-hero__cols > .wp-block-column:first-child,
	.page-id-115 .ns-hero > .wp-block-group__inner-container > .wp-block-columns > .wp-block-column:first-child {
		position: relative;
		z-index: 2;
		display: flex;
		flex-direction: column;
		justify-content: center;
		max-width: 54%;
		padding: clamp(2rem, 5vw, 5rem);
		background: linear-gradient(90deg, rgb(255 251 253 / 0.96) 0%, rgb(255 251 253 / 0.84) 70%, transparent 100%);
	}

	.ns-hero__cols > .wp-block-column:last-child,
	.page-id-115 .ns-hero > .wp-block-group__inner-container > .wp-block-columns > .wp-block-column:last-child {
		position: absolute;
		inset: 0;
		z-index: 1;
		width: 100%;
	}

	.ns-hero__cols > .wp-block-column:last-child .ns-hero__media,
	.ns-hero__cols > .wp-block-column:last-child .ns-about-media,
	.page-id-115 .ns-hero .ns-about-media {
		position: absolute;
		inset: 0;
		margin: 0;
	}

	.ns-hero__cols > .wp-block-column:last-child img,
	.page-id-115 .ns-hero .ns-about-media img {
		width: 100%;
		height: 100%;
		border-radius: 0;
		aspect-ratio: auto;
		object-fit: cover;
	}
}

/* Stack the hero before the columns block would squeeze the copy. */
@media (max-width: 781px) {
	.ns-hero__cols {
		gap: var(--ns-space-6);
	}

	.ns-hero__media img {
		aspect-ratio: 3 / 2;
	}

	.ns-hero__cols > .wp-block-column:first-child,
	.page-id-115 .ns-hero > .wp-block-group__inner-container > .wp-block-columns > .wp-block-column:first-child {
		order: 1;
	}

	.ns-hero__cols > .wp-block-column:last-child,
	.page-id-115 .ns-hero > .wp-block-group__inner-container > .wp-block-columns > .wp-block-column:last-child {
		order: 2;
	}
}

/* Contact and About calls-to-action share one dark-pink primary treatment. */
.entry-content > .ns-art-hero {
	padding: 0;
	background: #f9f9f6;
}
.entry-content > .ns-art-hero > .wp-block-group__inner-container {
	position: relative;
	isolation: isolate;
	max-width: 1440px;
	margin: auto;
	padding: 0;
}
.ns-art-hero__picture { display: block; overflow: hidden; margin: 0; }
.ns-art-hero__picture img { display: block; width: 100%; height: 100%; object-fit: cover; box-shadow: none; border-radius: 0; }
.entry-content .ns-art-hero__copy {
	position: relative;
	z-index: 1;
	padding: clamp(1.5rem, 4vw, 3rem);
	margin: 0;
}
.ns-art-hero__copy h1 { font-size: clamp(2.1rem, 4.1vw, 3.6rem); line-height: 1.08; }
.ns-art-hero__copy .ns-lead { font-size: clamp(1rem, 1.3vw, 1.2rem); }
.ns-art-hero__copy .wp-block-button__link { background: var(--ns-color-cta-solid); color: #fff; }
.ns-art-hero__copy .wp-block-button__link:hover { background: var(--ns-color-cta-solid-hover); color: #fff; }
/* WordPress's constrained-layout rules force auto inline margins with !important. */
.ns-art-hero > .wp-block-group__inner-container > .ns-art-hero__copy { margin-inline: 0 !important; }
@media (min-width: 782px) {
	.entry-content > .ns-art-hero > .wp-block-group__inner-container { min-height: clamp(540px, 55.85vw, 740px); display: flex; align-items: center; }
	.ns-art-hero__picture { position: absolute; inset: 0; z-index: 0; }
	.entry-content .ns-art-hero__copy { width: 47%; padding: clamp(2rem, 4.5vw, 4.5rem); }
	.entry-content .ns-art-hero--about .ns-art-hero__copy { width: 46%; }
}
@media (max-width: 781px) {
	.ns-art-hero__picture { aspect-ratio: 955 / 850; }
	.ns-art-hero__picture img { object-position: center bottom; }
	.ns-art-hero--about .ns-art-hero__picture { aspect-ratio: 1024 / 700; }
	.entry-content .ns-art-hero__copy { padding-bottom: .5rem; }
	.ns-art-hero__copy .ns-lead { max-width: 540px; }
}

.page-id-144 .ns-contact-card .wp-block-button__link,
.page-id-115 .ns-cta .wp-block-button__link {
	background-color: var(--ns-color-cta-solid);
	border-color: var(--ns-color-cta-solid);
	color: var(--ns-color-text-inverse);
}

.page-id-144 .ns-contact-card .wp-block-button__link:hover,
.page-id-115 .ns-cta .wp-block-button__link:hover {
	background-color: var(--ns-color-cta-solid-hover);
	border-color: var(--ns-color-cta-solid-hover);
	color: var(--ns-color-text-inverse);
}

/* ===============================================================
 * Category cards
 * =============================================================== */

.ns-cat-grid {
	gap: var(--ns-space-5);
	margin-top: var(--ns-space-6);
}

.ns-cat-card {
	background-color: var(--ns-color-surface);
	border: 1px solid var(--ns-color-border);
	border-radius: var(--ns-radius-lg);
	overflow: hidden;
	height: 100%;
	transition: transform var(--ns-transition), box-shadow var(--ns-transition);
}

.ns-cat-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--ns-shadow-lg);
}

.ns-cat-card__media {
	margin: 0;
	overflow: hidden;
	aspect-ratio: 1;
	background-color: var(--ns-white);
}

.ns-cat-card__media a { display:block; width:100%; height:100%; }

.ns-cat-card__media img {
	width: 100%;
	height: 100%;
	aspect-ratio: 1;
	object-fit: contain;
	transition: transform 400ms var(--ns-ease);
}

.ns-cat-card:hover .ns-cat-card__media img {
	transform: none; /* Keep poster lettering visible at the edges. */
}

.entry-content .ns-cat-card__title {
	font-size: var(--ns-h4);
	margin: var(--ns-space-5) var(--ns-space-5) var(--ns-space-2);
}

.ns-cat-card__title a {
	color: var(--ns-color-text);
	text-decoration: none;
}

.ns-cat-card__title a:hover {
	color: var(--ns-color-link-hover);
}

.entry-content .ns-cat-card p {
	margin: 0 var(--ns-space-5) var(--ns-space-5);
	font-size: var(--ns-text-sm);
}

/* ===============================================================
 * Value / feature strip
 * =============================================================== */

.ns-value-grid {
	gap: var(--ns-space-6);
}

.ns-value-grid h3 {
	font-size: var(--ns-h4);
	margin-bottom: var(--ns-space-2);
}

.ns-value-grid p {
	color: var(--ns-color-text-muted);
	font-size: var(--ns-text-sm);
	margin-bottom: 0;
}

/* ===============================================================
 * Instagram block wrapper as authored in content
 * =============================================================== */

.entry-content .ns-ig__handle-wrap {
	margin-bottom: 0;
}

/* R6: the handle is the only link in this section header and measured 25px tall. */
.ns-ig__handle-wrap a,
.ns-ig__handle a {
	display: inline-block;
	padding-block: var(--ns-space-3);
}

/* The head is a row: identity on the left, follow button on the right.
 *
 * WordPress wraps a group's children in .wp-block-group__inner-container, so the flex row has
 * to be declared on whichever element actually holds the children — both are covered here. */
.ns-ig__head,
.ns-ig__head > .wp-block-group__inner-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--ns-space-4);
	width: 100%;
}

.ns-ig__head .wp-block-group:not(.ns-ig__head) {
	flex: 1 1 260px;
	min-width: 0;
}

.ns-ig__head .wp-block-buttons {
	flex: 0 0 auto;
	margin: 0;
}

.entry-content .ns-ig__sub {
	margin-bottom: 0;
	margin-top: var(--ns-space-2);
}

/* Smaller desktop posts, with the section header aligned to the same centred row.
 * The live feed and the curated fallback share the cap; mobile scroll-snap is unchanged. */
@media (min-width: 992px) {
	.home .ns-ig .ns-ig__head,
	.home .ns-ig #sb_instagram,
	.home .ns-ig .ns-ig__grid {
		max-width: 900px;
		margin-inline: auto;
	}
}

/* ===============================================================
 * Closing CTA
 * =============================================================== */

.ns-cta {
	background-color: var(--ns-color-surface-accent);
	text-align: center;
}

.ns-cta p {
	color: var(--ns-color-text-muted);
	margin-inline: auto;
	max-width: var(--ns-measure-narrow);
}

/* ===============================================================
 * Contact
 * =============================================================== */

.ns-contact-grid {
	gap: var(--ns-space-5);
	margin-top: var(--ns-space-6);
}

.ns-contact-card {
	background-color: var(--ns-color-surface);
	border: 1px solid var(--ns-color-border);
	border-radius: var(--ns-radius-lg);
	padding: var(--ns-space-5);
	height: 100%;
	display: flex;
	flex-direction: column;
	gap: var(--ns-space-2);
}

.ns-contact-card h3 {
	font-size: var(--ns-h4);
	margin-bottom: 0;
}

.ns-contact-card p {
	color: var(--ns-color-text-muted);
	font-size: var(--ns-text-sm);
	margin-bottom: 0;
}

.ns-contact-card .wp-block-buttons {
	margin-top: auto;
	padding-top: var(--ns-space-3);
}

.ns-faq {
	margin-top: var(--ns-space-6);
}

.ns-faq h3 {
	font-size: var(--ns-text-lg);
	margin-bottom: var(--ns-space-2);
}

.ns-faq p {
	color: var(--ns-color-text-muted);
	margin-bottom: var(--ns-space-5);
	max-width: var(--ns-measure);
}

/* ===============================================================
 * About
 * =============================================================== */

.ns-about-media img {
	border-radius: var(--ns-radius-xl);
	box-shadow: var(--ns-shadow-md);
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background-color: var(--ns-color-surface-warm);
	padding: var(--ns-space-6);
}

/* ===============================================================
 * Policy pages — long-form legal copy, kept readable
 * =============================================================== */

.page-id-3 .entry-content,
.page-id-10 .entry-content,
.page-id-543 .entry-content {
	max-width: var(--ns-measure);
	margin-inline: auto;
	padding-block: var(--ns-section-y);
}

.page-id-3 .entry-content h2,
.page-id-10 .entry-content h2,
.page-id-543 .entry-content h2 {
	font-size: var(--ns-h3);
	margin-top: var(--ns-space-7);
}

.page-id-3 .entry-content h3,
.page-id-10 .entry-content h3,
.page-id-543 .entry-content h3 {
	font-size: var(--ns-text-lg);
	margin-top: var(--ns-space-5);
}

/* ===============================================================
 * WooCommerce product grid where it appears inside page content.
 * The full shop treatment lands in R4; this keeps the homepage row coherent.
 * =============================================================== */

.entry-content .woocommerce ul.products {
	display: grid;
	/* 2-up from ~370px: four stacked cards at 320 made the row 2400px tall, which is the
	 * endless-scroll problem this redesign exists to fix. Below that it falls back to one
	 * column rather than shrinking cards to an unreadable 130px. */
	grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
	gap: var(--ns-space-3);
	margin: var(--ns-space-6) 0 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.entry-content .woocommerce ul.products {
		grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
		gap: var(--ns-space-5);
	}
}

.entry-content .woocommerce ul.products::before,
.entry-content .woocommerce ul.products::after {
	display: none; /* Woo's float clearfix fights the grid */
}

.entry-content .woocommerce ul.products li.product {
	width: auto !important; /* overrides Woo's inline float widths */
	margin: 0 !important;
	float: none !important;
	background-color: var(--ns-color-surface);
	border: 1px solid var(--ns-color-border);
	border-radius: var(--ns-radius-lg);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform var(--ns-transition), box-shadow var(--ns-transition);
}

.entry-content .woocommerce ul.products li.product:hover {
	transform: translateY(-2px);
	box-shadow: var(--ns-shadow-lg);
}

.entry-content .woocommerce ul.products li.product img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	margin: 0;
}

.entry-content .woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--ns-font-display);
	font-size: var(--ns-text-base);
	line-height: var(--ns-leading-snug);
	padding: var(--ns-space-4) var(--ns-space-4) 0;
	margin: 0;
}

@media (min-width: 640px) {
	.entry-content .woocommerce ul.products li.product .woocommerce-loop-product__title {
		font-size: var(--ns-text-lg);
	}
}

.entry-content .woocommerce ul.products li.product .price {
	font-family: var(--ns-font-display);
	font-weight: var(--ns-weight-display);
	color: var(--ns-color-link);
	padding: var(--ns-space-2) var(--ns-space-4) 0;
	display: block;
}

.entry-content .woocommerce ul.products li.product .button {
	margin: var(--ns-space-4);
	margin-top: auto;
}

/* Homepage section palette, November 2026. */
.home .ns-section { background-color: var(--ns-white); }
.home .ns-section--quiet { background-color: var(--ns-home-paper); }
.home .ns-section--warm { background-color: var(--ns-home-trust); }
.home .ns-journal-feed { background-color: var(--ns-white); }
.home .ns-ig { background-color: var(--ns-home-instagram); }
.home .ns-cta { background-color: var(--ns-home-contact); }
.home .ns-product-strip { background: var(--ns-product-strip); color: var(--ns-white); padding: 0 16px; margin-block: 0; text-align: center; }
.ns-product-strip__inner { display: flex; justify-content: center; align-items: center; gap: clamp(8px, 2vw, 32px); flex-wrap: nowrap; min-height:44px; }
.ns-product-strip a { color: inherit; text-decoration: none; font-weight: 600; padding: 12px 0; white-space:nowrap; font-size:clamp(12px, 1.2vw, 15px); line-height:20px; }
.ns-product-strip__inner > span { flex:none; font-size:10px; }
.ns-product-strip a:hover { text-decoration: underline; }
