/*
Theme Name: Nutrition Source
Theme URI: https://nutrition-source.com
Author: Nutrition Source
Description: Organic, produce-coloured block theme for Nutrition Source — a neighbourhood whole-foods, supplement and wellness store. Child of Twenty Twenty-Five.
Template: twentytwentyfive
Version: 2.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nutrition-source
Tags: block-theme, full-site-editing, one-column, wellness
*/

/* ==========================================================================
   DIRECTION CONTRACT — Nutrition Source v2 (Persuade)
   Form: the market table. Owner-pinned redirect from the apothecary label,
   which read as a newspaper. Replaces that world; does not polish it.

   THESIS: Food first. The page is a heap of produce on a linen cloth — colour
   fields shaped like things that grew, not columns ruled like a broadsheet.
   It refuses hairlines, tracked caps, and the didone masthead entirely.

   OWN-WORLD: Linen ground. Whole sections are rounded slabs of leaf green and
   beet, inset from the viewport like bowls on a table. Squash orange is the
   only "act" colour. Young Serif — chunky, low-contrast, a little wobbly —
   for every heading, sentence case, never caps. Figtree for reading. Produce
   is drawn flat and bright, seed-packet style, and sits inside soft blobs.
   Nothing has a corner.

   STORY: A neighbour sees real food colours and a friendly counter, learns
   we'll order any brand they name, and walks in — or calls.

   FIRST VIEWPORT: Two columns on linen. Left: a sentence-case Young Serif
   headline, one short line, a squash pill and a quiet leaf pill. Right: a
   large leaf-green blob holding a heap of drawn produce — beet, citrus wheel,
   avocado, blueberries — with a squash blob peeking behind. Under it, a soft
   pill strip with today's hours, address and phone.

   FORM: Rounded slab + blob. Motion is one moment — the produce heap settles
   into its blob and the blob breathes slowly; type never animates.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Foundations
   -------------------------------------------------------------------------- */

:root {
	--ns-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--ns-r-soft: 1.25rem;
	--ns-r-row: 0.9rem;
	--ns-r-mark: 0.35em;
	--ns-r-slab: clamp(1.5rem, 3vw, 2.75rem);
	--ns-gutter: clamp(0.5rem, 1.5vw, 1rem);
}

html,
body {
	overflow-x: clip;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.wp-site-blocks p:not([class*="has-text-align"]) {
	max-width: 66ch;
}

:where(a):focus-visible,
:where(button):focus-visible,
:where(.wp-block-button__link):focus-visible,
:where(input, select, textarea):focus-visible {
	outline: 3px solid var(--wp--preset--color--squash);
	outline-offset: 3px;
	border-radius: 999px;
}

/* Every drenched full-width section becomes a rounded slab, inset from the
   viewport edge like a bowl set on the cloth. */
.wp-block-post-content > .alignfull.has-background,
.ns-footer.has-background {
	margin-left: calc(var(--wp--style--root--padding-left) * -1 + var(--ns-gutter));
	margin-right: calc(var(--wp--style--root--padding-right) * -1 + var(--ns-gutter));
	border-radius: var(--ns-r-slab);
}

.wp-block-post-content > .alignfull.has-background + .alignfull.has-background {
	margin-top: var(--ns-gutter);
}

/* --------------------------------------------------------------------------
   2. Type on colour fields — tint out of the field's own hue, never gray.
   -------------------------------------------------------------------------- */

.has-leaf-background-color :is(h1, h2, h3, h4, h5, h6),
.has-beet-background-color :is(h1, h2, h3, h4, h5, h6),
.has-blueberry-background-color :is(h1, h2, h3, h4, h5, h6),
.has-bark-background-color :is(h1, h2, h3, h4, h5, h6) {
	color: var(--wp--preset--color--linen);
}

.has-leaf-background-color p { color: var(--wp--preset--color--leaf-tint); }
.has-beet-background-color p { color: var(--wp--preset--color--beet-tint); }
.has-blueberry-background-color p,
.has-bark-background-color p { color: var(--wp--preset--color--oat); }

.has-leaf-background-color a:not(.wp-block-button__link),
.has-beet-background-color a:not(.wp-block-button__link),
.has-blueberry-background-color a:not(.wp-block-button__link),
.has-bark-background-color a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--turmeric);
}

.has-leaf-soft-background-color :is(h1, h2, h3),
.has-oat-background-color :is(h1, h2, h3) {
	color: var(--wp--preset--color--leaf);
}

/* --------------------------------------------------------------------------
   3. Kicker — a small friendly label with a seed in front of it.
   -------------------------------------------------------------------------- */

.ns-kicker {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.9rem;
	max-width: none;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: var(--wp--preset--color--leaf);
}

.ns-kicker::before {
	content: "";
	flex: 0 0 auto;
	width: 0.7rem;
	height: 0.7rem;
	border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
	background: var(--wp--preset--color--squash);
}

.has-leaf-background-color .ns-kicker,
.has-beet-background-color .ns-kicker {
	color: var(--wp--preset--color--turmeric);
}

.has-leaf-background-color .ns-kicker::before,
.has-beet-background-color .ns-kicker::before {
	background: var(--wp--preset--color--turmeric);
}

/* --------------------------------------------------------------------------
   4. Section heads and ledes — spacing does the work, no rules.
   -------------------------------------------------------------------------- */

.ns-label-head {
	margin: 0 0 clamp(1.75rem, 3.5vw, 2.75rem);
}

.ns-label-head h2,
.ns-label-head h3 {
	margin: 0;
	text-wrap: balance;
	max-width: 22ch;
}

.ns-label-head p {
	margin: 1rem 0 0;
	max-width: 58ch;
}

.ns-lede {
	font-size: clamp(1.1875rem, 2.2vw, 1.4375rem);
	line-height: 1.5;
	color: var(--wp--preset--color--bark);
	max-width: 44ch !important;
}

.has-leaf-background-color .ns-lede,
.has-beet-background-color .ns-lede {
	color: var(--wp--preset--color--linen);
}

/* --------------------------------------------------------------------------
   5. Hero — the market table
   -------------------------------------------------------------------------- */

.ns-hero {
	padding-top: clamp(2rem, 5vw, 4.5rem);
	padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.ns-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
}

.ns-hero__copy h1 {
	margin: 0;
	font-size: clamp(2.75rem, 5.6vw, 4.75rem);
	line-height: 1.02;
	letter-spacing: -0.015em;
	text-wrap: balance;
	color: var(--wp--preset--color--leaf);
}

.ns-hero__copy h1 em {
	font-style: normal;
	color: var(--wp--preset--color--beet);
}

.ns-hero__note {
	margin: 1.5rem 0 0;
	max-width: 42ch;
	font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
	line-height: 1.6;
}

.ns-hero__actions {
	margin-top: 2rem;
}

/* The blob: a leaf-green bowl with a squash one peeking from behind. */
.ns-hero__art {
	position: relative;
	aspect-ratio: 1;
	max-width: 34rem;
	margin-inline: auto;
	width: 100%;
}

.ns-blob {
	position: absolute;
	inset: 0;
	background: var(--wp--preset--color--leaf);
	border-radius: 64% 36% 56% 44% / 46% 66% 34% 54%;
}

.ns-blob--behind {
	inset: 10% -8% -8% 14%;
	background: var(--wp--preset--color--squash);
	border-radius: 38% 62% 46% 54% / 60% 40% 60% 40%;
	opacity: 0.95;
}

.ns-illo {
	position: absolute;
	inset: 6%;
	width: 88%;
	height: 88%;
	display: block;
	overflow: visible;
}

/* The hero photograph: real bottles on the counter, cut to the blob. The
   leaf blob sits just off-register behind it as a rim, the squash blob
   further back for depth. */
/* Doubled class: the generic .ns-photo rules (slab radius, height:auto) are
   declared later in this file and must not win here. */
.ns-hero__art .ns-photo.ns-hero__photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
	object-position: 34% 56%; /* keeps the bottle mouth and capsules in the blob's centre */
	border-radius: 64% 36% 56% 44% / 46% 66% 34% 54%;
	background: var(--wp--preset--color--leaf);
	box-shadow: 0 2px 6px rgba(43, 33, 24, 0.08), 0 30px 60px -34px rgba(43, 33, 24, 0.55);
}

.ns-blob--rim {
	inset: -3.5% 3.5% 3.5% -3.5%;
}

.ns-hero__art--illustration[hidden] {
	display: none;
}

.js .is-landing .ns-hero__photo {
	animation: ns-set-down 1s var(--ns-ease) 0.25s both;
}

@keyframes ns-set-down {
	from { transform: scale(1.08) translateY(-2%); opacity: 0; }
	55%  { opacity: 1; }
	to   { transform: scale(1) translateY(0); opacity: 1; }
}

.is-idle .ns-hero__photo {
	animation: ns-breathe 9s ease-in-out infinite alternate;
}

.is-idle .ns-blob--rim {
	animation: ns-breathe 9s ease-in-out infinite alternate;
}

.ns-piece {
	transform-box: fill-box;
	transform-origin: center;
}

/* ---- Focal moment: the heap is set down on the table. ----------------
   Only when the script has marked the document; otherwise the heap is
   simply there. The blob spreads, then each piece lands in turn. */

.js .is-landing .ns-blob {
	animation: ns-spread 0.9s var(--ns-ease) both;
}

.js .is-landing .ns-blob--behind {
	animation: ns-spread 1.1s var(--ns-ease) 0.08s both;
}

.js .is-landing .ns-piece {
	animation: ns-land 0.7s var(--ns-ease) both;
	animation-delay: calc(0.35s + var(--ns-order, 0) * 0.09s);
}

.js .is-landing .ns-piece--leaf    { --ns-order: 0; }
.js .is-landing .ns-piece--citrus  { --ns-order: 1; animation-name: ns-roll-in; animation-duration: 0.85s; }
.js .is-landing .ns-piece--beet    { --ns-order: 2; }
.js .is-landing .ns-piece--avocado { --ns-order: 3; }
.js .is-landing .ns-piece--berry-1 { --ns-order: 4; animation-name: ns-tumble; }
.js .is-landing .ns-piece--berry-2 { --ns-order: 5; animation-name: ns-tumble; }
.js .is-landing .ns-piece--berry-3 { --ns-order: 6; animation-name: ns-tumble; }
.js .is-landing .ns-piece--seeds   { --ns-order: 7; animation-name: ns-scatter; animation-duration: 0.55s; }

@keyframes ns-spread {
	from { transform: scale(0.82); opacity: 0; }
	to   { transform: scale(1);    opacity: 1; }
}

@keyframes ns-land {
	from { transform: translateY(-14%) scale(0.92); opacity: 0; }
	60%  { opacity: 1; }
	to   { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes ns-roll-in {
	from { transform: translate(18%, -10%) rotate(-70deg); opacity: 0; }
	50%  { opacity: 1; }
	to   { transform: translate(0, 0) rotate(0); opacity: 1; }
}

@keyframes ns-tumble {
	from { transform: translateY(-40%) rotate(-25deg); opacity: 0; }
	55%  { opacity: 1; }
	to   { transform: translateY(0) rotate(0); opacity: 1; }
}

@keyframes ns-scatter {
	from { transform: scale(0.4); opacity: 0; }
	to   { transform: scale(1);   opacity: 1; }
}

/* ---- Idle: only while the heap is on screen. -------------------------- */

.is-idle .ns-blob {
	animation: ns-breathe 9s ease-in-out infinite alternate;
}

.is-idle .ns-blob--behind {
	animation: ns-breathe 11s ease-in-out infinite alternate-reverse;
}

.is-idle .ns-piece__spin {
	transform-box: fill-box;
	transform-origin: center;
	animation: ns-turn 48s linear infinite;
}

.is-idle .ns-piece--beet,
.is-idle .ns-piece--avocado,
.is-idle .ns-piece--leaf,
.is-idle .ns-piece--berry {
	animation: ns-bob 5.5s ease-in-out infinite alternate;
}

.is-idle .ns-piece--leaf    { animation-duration: 7s;   animation-delay: -1s; }
.is-idle .ns-piece--beet    { animation-duration: 6s;   animation-delay: -3s; }
.is-idle .ns-piece--avocado { animation-duration: 6.5s; animation-delay: -2s; }
.is-idle .ns-piece--berry-1 { animation-duration: 4.5s; animation-delay: -0.5s; }
.is-idle .ns-piece--berry-2 { animation-duration: 5s;   animation-delay: -2.5s; }
.is-idle .ns-piece--berry-3 { animation-duration: 4.8s; animation-delay: -1.5s; }

/* While landing, landing owns the pieces; the script removes .is-landing
   when the last piece has settled and idle takes over from rest. */
.is-landing .ns-piece,
.is-landing .ns-piece__spin {
	animation-name: none;
}

.js .is-landing .ns-piece {
	animation-name: ns-land;
}

.js .is-landing .ns-piece--citrus  { animation-name: ns-roll-in; }
.js .is-landing .ns-piece--berry   { animation-name: ns-tumble; }
.js .is-landing .ns-piece--seeds   { animation-name: ns-scatter; }

@keyframes ns-breathe {
	to { border-radius: 48% 52% 42% 58% / 58% 45% 55% 42%; }
}

@keyframes ns-turn {
	to { transform: rotate(360deg); }
}

@keyframes ns-bob {
	to { transform: translateY(-2.5%); }
}

/* ---- Continuity: slabs are set down on the cloth as you reach them. -- */

.js .ns-reveal:not(.is-in) {
	opacity: 0;
	transform: translateY(1.25rem);
}

.js .ns-reveal.is-in {
	opacity: 1;
	transform: none;
	transition: opacity 0.6s var(--ns-ease), transform 0.7s var(--ns-ease);
}

/* Keyboard users may reach a slab before scrolling to it — show it. */
.js .ns-reveal:not(.is-in):focus-within {
	opacity: 1;
	transform: none;
}

.js .ns-reveal--item.is-in {
	transition-delay: calc(var(--ns-i, 0) * 0.045s);
}

.js .ns-reveal.is-in--immediate {
	transition: none;
}

/* The kicker's seed pops as its section arrives. */
.js .ns-reveal:not(.is-in) .ns-kicker::before {
	transform: scale(0);
}

.js .ns-reveal.is-in .ns-kicker::before {
	transform: scale(1);
	transition: transform 0.45s var(--ns-ease) 0.25s;
}

/* ---- Feedback ------------------------------------------------------- */

.wp-block-button__link {
	transition: background-color 0.18s ease-out, color 0.18s ease-out,
		transform 0.18s var(--ns-ease), box-shadow 0.18s ease-out;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 14px -8px rgba(43, 33, 24, 0.45);
}

.wp-block-button__link:active {
	transform: translateY(0) scale(0.97);
	box-shadow: none;
	transition-duration: 0.08s;
}

.ns-strip li,
.ns-shelf li {
	transition: transform 0.2s var(--ns-ease), background-color 0.2s ease-out;
}

.ns-strip li:hover {
	transform: translateY(-2px);
}

.ns-shelf li:hover {
	transform: translateY(-2px) rotate(-1deg);
	background: rgba(244, 238, 226, 0.2);
}

.ns-header .wp-block-navigation .wp-block-navigation-item__content {
	transition: background-color 0.18s ease-out, color 0.18s ease-out, transform 0.18s var(--ns-ease);
}

.ns-header .wp-block-navigation .wp-block-navigation-item__content:hover {
	transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
	.ns-blob,
	.ns-blob--behind,
	.ns-piece,
	.ns-piece__spin,
	.ns-reveal,
	.ns-kicker::before,
	.wp-block-button__link,
	.ns-strip li,
	.ns-shelf li {
		animation: none !important;
		transition: none !important;
		transform: none !important;
		opacity: 1 !important;
	}
}

@media (max-width: 52rem) {
	.ns-hero__grid {
		grid-template-columns: 1fr;
	}
	.ns-hero__art {
		max-width: 22rem;
		order: -1;
	}
}

/* The strip under the hero: today's facts as soft pills. */
.ns-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
	padding: 0;
	list-style: none;
}

.ns-strip li {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.7rem 1.15rem;
	background: var(--wp--preset--color--leaf-soft);
	border-radius: 999px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--wp--preset--color--leaf);
	white-space: nowrap;
}

.ns-strip li::before {
	content: "";
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: var(--wp--preset--color--squash);
}

.ns-strip li:nth-child(2)::before { background: var(--wp--preset--color--beet); }
.ns-strip li:nth-child(3)::before { background: var(--wp--preset--color--blueberry); }

.ns-strip a {
	color: inherit;
	text-decoration: none;
}

.ns-strip a:hover,
.ns-strip a:focus {
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   6. Run — what we carry, as a soft two-column list with produce bullets
   -------------------------------------------------------------------------- */

.ns-run {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
	gap: clamp(1.25rem, 2.5vw, 2rem) clamp(1.75rem, 4vw, 3.5rem);
}

.ns-run__item {
	position: relative;
	padding-left: 2.25rem;
}

.ns-run__item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.35rem;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
	background: var(--wp--preset--color--squash);
}

.ns-run__item:nth-child(6n+2)::before { background: var(--wp--preset--color--beet); }
.ns-run__item:nth-child(6n+3)::before { background: var(--wp--preset--color--turmeric); }
.ns-run__item:nth-child(6n+4)::before { background: var(--wp--preset--color--blueberry); }
.ns-run__item:nth-child(6n+5)::before { background: var(--wp--preset--color--leaf); }
.ns-run__item:nth-child(6n+6)::before { background: var(--wp--preset--color--beet-tint); }

.ns-run__term {
	margin: 0 0 0.35rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.375rem;
	font-weight: 400;
	line-height: 1.2;
	color: var(--wp--preset--color--bark);
}

.ns-run__desc {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.6;
}

.has-leaf-background-color .ns-run__term,
.has-beet-background-color .ns-run__term {
	color: var(--wp--preset--color--linen);
}

.has-leaf-background-color .ns-run__item:nth-child(6n+5)::before { background: var(--wp--preset--color--leaf-tint); }

/* --------------------------------------------------------------------------
   7. Shelf — brands as a heap of soft chips
   -------------------------------------------------------------------------- */

.ns-shelf {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ns-shelf li {
	display: inline-flex;
	flex-direction: column;
	gap: 0.1rem;
	padding: 0.75rem 1.2rem;
	background: var(--wp--preset--color--linen);
	color: var(--wp--preset--color--bark);
	border-radius: 1.25rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.0625rem;
	line-height: 1.25;
}

.ns-shelf__cat {
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--soil);
}

.has-leaf-background-color .ns-shelf li {
	background: rgba(244, 238, 226, 0.12);
	color: var(--wp--preset--color--linen);
}

.has-leaf-background-color .ns-shelf__cat {
	color: var(--wp--preset--color--leaf-tint);
}

.has-beet-background-color .ns-shelf li {
	background: rgba(244, 238, 226, 0.12);
	color: var(--wp--preset--color--linen);
}

.has-beet-background-color .ns-shelf__cat {
	color: var(--wp--preset--color--beet-tint);
}

/* --------------------------------------------------------------------------
   8. Hours — soft rows, no leaders, no rules
   -------------------------------------------------------------------------- */

.ns-hours {
	display: grid;
	gap: 0.35rem;
	margin: 0;
}

.ns-hours__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin: 0;
	padding: 0.6rem 0.9rem;
	border-radius: var(--ns-r-row);
	max-width: none !important;
	font-size: 1rem;
	line-height: 1.4;
	background: rgba(31, 90, 46, 0.06);
}

.ns-hours__row:nth-child(even) {
	background: transparent;
}

.ns-hours__day {
	font-weight: 600;
	color: var(--wp--preset--color--bark);
}

.ns-hours__dots {
	display: none;
}

.ns-hours__time {
	font-variant-numeric: tabular-nums;
	font-weight: 500;
	color: var(--wp--preset--color--leaf);
}

.ns-hours__row--closed .ns-hours__time {
	color: var(--wp--preset--color--soil);
}

.has-leaf-background-color .ns-hours__row {
	background: rgba(244, 238, 226, 0.1);
}

.has-leaf-background-color .ns-hours__row:nth-child(even) {
	background: transparent;
}

.has-leaf-background-color .ns-hours__day,
.has-leaf-background-color .ns-hours__time {
	color: var(--wp--preset--color--linen);
}

/* --------------------------------------------------------------------------
   9. Contact lines
   -------------------------------------------------------------------------- */

.ns-contact {
	display: grid;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ns-contact__label {
	display: block;
	margin-bottom: 0.2rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--wp--preset--color--leaf);
}

.ns-contact__value {
	display: block;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.25rem;
	line-height: 1.35;
	color: var(--wp--preset--color--bark);
}

.ns-contact__value a {
	color: inherit;
	text-decoration: none;
	border-bottom: 2px solid var(--wp--preset--color--squash);
	padding-bottom: 1px;
}

.ns-contact__value a:hover,
.ns-contact__value a:focus {
	color: var(--wp--preset--color--beet);
}

.has-leaf-background-color .ns-contact__label { color: var(--wp--preset--color--turmeric); }
.has-leaf-background-color .ns-contact__value,
.has-leaf-background-color .ns-contact__value a { color: var(--wp--preset--color--linen); }

/* --------------------------------------------------------------------------
   10. Plate — now a soft card, like a recipe card left on the counter
   -------------------------------------------------------------------------- */

.ns-plate {
	position: relative;
	background: var(--wp--preset--color--linen);
	border-radius: var(--ns-r-slab);
	padding: clamp(1.25rem, 3vw, 2.5rem);
	box-shadow: 0 2px 6px rgba(43, 33, 24, 0.06), 0 28px 56px -30px rgba(43, 33, 24, 0.4);
}

.ns-plate__inner {
	padding: clamp(0.5rem, 1.5vw, 1rem);
}

.has-leaf-soft-background-color .ns-plate,
.has-oat-background-color .ns-plate {
	background: var(--wp--preset--color--linen);
}

/* The plate is linen wherever it sits; a field's tints must not leak in. */
.ns-plate.ns-plate :is(h1, h2, h3, h4, h5, h6),
.ns-plate.ns-plate .ns-contact__value,
.ns-plate.ns-plate .ns-run__term,
.ns-plate.ns-plate .ns-hours__day {
	color: var(--wp--preset--color--bark);
}

.ns-plate.ns-plate p {
	color: var(--wp--preset--color--soil);
}

.ns-plate.ns-plate .ns-kicker,
.ns-plate.ns-plate .ns-contact__label,
.ns-plate.ns-plate .ns-hours__time {
	color: var(--wp--preset--color--leaf);
}

.ns-plate.ns-plate .ns-hours__row {
	background: rgba(31, 90, 46, 0.06);
}

.ns-plate.ns-plate .ns-hours__row:nth-child(even) {
	background: transparent;
}

.ns-plate.ns-plate a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--leaf);
}

/* --------------------------------------------------------------------------
   11. Placeholder marker — every value the owner still has to supply.
   -------------------------------------------------------------------------- */

.ns-tbd {
	background: rgba(231, 132, 43, 0.16);
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--squash);
	padding: 0 0.25em;
	border-radius: var(--ns-r-mark);
}

:is(.has-leaf-background-color, .has-beet-background-color) .ns-tbd:not(.ns-plate *) {
	background: rgba(233, 185, 73, 0.18);
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--turmeric);
}

/* --------------------------------------------------------------------------
   12. Coming-soon pill
   -------------------------------------------------------------------------- */

.ns-pending {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	background: var(--wp--preset--color--turmeric);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--wp--preset--color--bark);
}

/* --------------------------------------------------------------------------
   13. Buttons
   -------------------------------------------------------------------------- */

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--leaf);
	border: 2px solid var(--wp--preset--color--leaf);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus {
	background: var(--wp--preset--color--leaf);
	color: var(--wp--preset--color--linen);
	border-color: var(--wp--preset--color--leaf);
}

:is(.has-leaf-background-color, .has-beet-background-color)
	.wp-block-button.is-style-outline:not(.ns-plate *) > .wp-block-button__link {
	color: var(--wp--preset--color--linen);
	border-color: rgba(244, 238, 226, 0.6);
}

:is(.has-leaf-background-color, .has-beet-background-color)
	.wp-block-button.is-style-outline:not(.ns-plate *) > .wp-block-button__link:hover,
:is(.has-leaf-background-color, .has-beet-background-color)
	.wp-block-button.is-style-outline:not(.ns-plate *) > .wp-block-button__link:focus {
	background: var(--wp--preset--color--linen);
	color: var(--wp--preset--color--leaf);
	border-color: var(--wp--preset--color--linen);
}

/* --------------------------------------------------------------------------
   14. Header
   -------------------------------------------------------------------------- */

.ns-header {
	background: var(--wp--preset--color--linen);
}

.ns-identity {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.ns-identity__mark {
	width: 2.25rem;
	height: 2.25rem;
	flex: 0 0 auto;
}

.ns-identity .wp-block-site-title {
	margin: 0;
}

.ns-identity .wp-block-site-title a {
	display: inline-block;
	line-height: 1;
}

.ns-identity__sub {
	display: block;
	margin: 0.3rem 0 0;
	max-width: none;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--soil);
}

.ns-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.45rem 0.9rem;
	border-radius: 999px;
	transition: background-color 0.18s ease-out, color 0.18s ease-out;
}

.ns-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.ns-header .wp-block-navigation .current-menu-item .wp-block-navigation-item__content {
	background: var(--wp--preset--color--leaf-soft);
	color: var(--wp--preset--color--leaf);
}

.ns-header .wp-block-navigation__responsive-container-open,
.ns-header .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--leaf);
}

.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--leaf) !important;
	padding-top: clamp(3rem, 8vw, 5rem);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	color: var(--wp--preset--color--linen) !important;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.5rem;
}

.ns-header__cta .wp-block-button__link {
	padding: 0.7rem 1.3rem;
	font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   15. Footer — a leaf-green slab
   -------------------------------------------------------------------------- */

.ns-footer {
	margin-top: var(--ns-gutter);
	margin-bottom: var(--ns-gutter);
}

.ns-footer__cols {
	gap: clamp(2rem, 5vw, 4rem) clamp(2rem, 6vw, 5rem);
}

.ns-footer h2,
.ns-footer h3 {
	font-family: var(--wp--preset--font-family--text);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--wp--preset--color--turmeric);
	margin: 0 0 1rem;
}

.ns-footer__mark {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.75rem;
	line-height: 1.1;
	color: var(--wp--preset--color--linen);
	margin: 0 0 0.6rem;
	max-width: none;
}

.ns-footer .ns-hours__row {
	padding-inline: 0.75rem;
}

.ns-footer__colophon {
	margin-top: var(--wp--preset--spacing--50);
	padding-top: 1.5rem;
	font-size: 0.875rem;
	color: var(--wp--preset--color--leaf-tint);
}

.ns-footer__colophon p {
	margin: 0;
	max-width: none;
	color: var(--wp--preset--color--leaf-tint);
}

/* Licence credit takes its own line under the colophon pair. */
.ns-footer__credit {
	flex-basis: 100%;
	margin-top: 0.5rem !important;
	font-size: 0.8125rem;
}

.ns-footer__credit a {
	color: var(--wp--preset--color--leaf-tint);
	text-decoration: underline;
}

.ns-social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.9375rem;
	font-weight: 700;
}

.ns-social a {
	display: inline-block;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	background: rgba(244, 238, 226, 0.12);
	color: var(--wp--preset--color--linen);
	text-decoration: none;
}

.ns-social a:hover,
.ns-social a:focus {
	background: var(--wp--preset--color--turmeric);
	color: var(--wp--preset--color--bark);
}

/* --------------------------------------------------------------------------
   16. Interior page head
   -------------------------------------------------------------------------- */

.ns-page-head {
	padding-top: clamp(2.5rem, 6vw, 5rem);
	padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.ns-page-head h1 {
	margin: 0;
	font-size: clamp(2.5rem, 5.4vw, 4.25rem);
	line-height: 1.04;
	letter-spacing: -0.015em;
	text-wrap: balance;
	color: var(--wp--preset--color--leaf);
	max-width: 18ch;
}

.ns-page-head__lede {
	margin: 1.25rem 0 0;
	max-width: 52ch;
	font-size: clamp(1.125rem, 2vw, 1.3125rem);
	line-height: 1.55;
}

/* --------------------------------------------------------------------------
   17. Utilities
   -------------------------------------------------------------------------- */

.ns-quiet-link {
	font-weight: 700;
	text-decoration: none;
	border-bottom: 2px solid var(--wp--preset--color--squash);
	padding-bottom: 2px;
}

.ns-sprig {
	width: clamp(3rem, 6vw, 4.5rem);
	height: auto;
	display: block;
	margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   17b. Contact form. Fields are rounded like everything else; the form sits
   on a linen card so it reads as a note left on the counter.
   -------------------------------------------------------------------------- */

.ns-form {
	scroll-margin-top: 6rem;
}

.ns-form__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1.25rem clamp(1rem, 2.5vw, 1.75rem);
}

.ns-field {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	margin: 0 0 1.25rem;
	max-width: none !important;
}

.ns-field label {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--wp--preset--color--bark);
}

.ns-field__hint {
	font-weight: 500;
	color: var(--wp--preset--color--soil);
}

.ns-field__hint--below {
	font-size: 0.875rem;
	line-height: 1.5;
	margin-top: 0.15rem;
}

.ns-field input,
.ns-field select,
.ns-field textarea {
	width: 100%;
	padding: 0.9rem 1.15rem;
	border: 2px solid var(--wp--preset--color--oat);
	border-radius: var(--ns-r-soft);
	background: #fff;
	color: var(--wp--preset--color--bark);
	font: inherit;
	font-size: 1.0625rem;
	line-height: 1.4;
	transition: border-color 0.18s ease-out, box-shadow 0.18s ease-out;
}

.ns-field textarea {
	resize: vertical;
	min-height: 9rem;
}

.ns-field input:hover,
.ns-field select:hover,
.ns-field textarea:hover {
	border-color: var(--wp--preset--color--leaf-tint);
}

.ns-field input:focus-visible,
.ns-field select:focus-visible,
.ns-field textarea:focus-visible {
	outline: none;
	border-color: var(--wp--preset--color--leaf);
	box-shadow: 0 0 0 4px rgba(31, 90, 46, 0.14);
	border-radius: var(--ns-r-soft);
}

/* Native select with the theme's own arrow. */
.ns-select {
	position: relative;
	display: block;
}

.ns-select select {
	appearance: none;
	padding-right: 3rem;
	cursor: pointer;
}

.ns-select::after {
	content: "";
	position: absolute;
	right: 1.25rem;
	top: 50%;
	width: 0.6rem;
	height: 0.6rem;
	border-right: 2px solid var(--wp--preset--color--leaf);
	border-bottom: 2px solid var(--wp--preset--color--leaf);
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}

/* Error state: beet, named next to the field. */
.ns-field--error input,
.ns-field--error select,
.ns-field--error textarea {
	border-color: var(--wp--preset--color--beet);
}

.ns-field__error {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--beet);
}

.ns-form__alert {
	margin: 0 0 1.5rem;
	padding: 0.9rem 1.15rem;
	border-radius: var(--ns-r-soft);
	background: var(--wp--preset--color--beet-tint);
	color: var(--wp--preset--color--beet);
	font-weight: 600;
}

.ns-form__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
	margin-top: 0.5rem;
}

.ns-form__actions button {
	cursor: pointer;
	border: 0;
}

.ns-form__note {
	font-size: 0.9375rem;
	color: var(--wp--preset--color--soil);
}

/* Honeypot: off-canvas, not display:none, so naive bots still fill it. */
.ns-form__hp {
	position: absolute;
	left: -200vw;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Success: a leaf card in place of the form. */
.ns-form__sent {
	padding: clamp(1.5rem, 3vw, 2.5rem);
	border-radius: var(--ns-r-slab);
	background: var(--wp--preset--color--leaf);
	color: var(--wp--preset--color--leaf-tint);
}

/* Specificity matches the plate reset (.ns-plate.ns-plate p), which would
   otherwise paint this card's text soil-brown on leaf. */
.ns-form .ns-form__sent p {
	margin: 0;
	max-width: 48ch;
	color: var(--wp--preset--color--leaf-tint);
}

.ns-form .ns-form__sent .ns-form__sent-title {
	margin: 0 0 0.6rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.5rem, 3vw, 2rem);
	line-height: 1.15;
	color: var(--wp--preset--color--linen);
}

.ns-form .ns-form__alert {
	color: var(--wp--preset--color--beet);
}

@media (prefers-reduced-motion: reduce) {
	.ns-field input,
	.ns-field select,
	.ns-field textarea {
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   17c. Blog: a list of notes, a single note, and the latest three on the home
   page. Rows, not cards: image beside text, separated by air.
   -------------------------------------------------------------------------- */

.ns-posts {
	display: grid;
	gap: clamp(2.5rem, 5vw, 4rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ns-posts > li {
	margin: 0;
}

.ns-post {
	display: grid;
	grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
	grid-template-rows: auto auto auto auto;
	column-gap: clamp(1.5rem, 3.5vw, 3rem);
	row-gap: 0.6rem;
	align-items: start;
}

.ns-post > .ns-post__image {
	grid-row: 1 / span 4;
	margin: 0;
}

.ns-post__image img {
	border-radius: var(--ns-r-soft);
	background: var(--wp--preset--color--oat);
}

.ns-post__image a {
	display: block;
	border-radius: var(--ns-r-soft);
	transition: transform 0.3s var(--ns-ease);
}

.ns-post__image a:hover {
	transform: rotate(-1deg) translateY(-0.2rem);
}

.ns-post__meta {
	gap: 0.6rem 1rem;
	align-items: center;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--soil);
}

.ns-post__cats a {
	display: inline-block;
	padding: 0.35rem 0.85rem;
	border-radius: 999px;
	background: var(--wp--preset--color--leaf-soft);
	color: var(--wp--preset--color--leaf);
	text-decoration: none;
	transition: background-color 0.18s ease-out, color 0.18s ease-out;
}

.ns-post__cats a:hover {
	background: var(--wp--preset--color--leaf);
	color: var(--wp--preset--color--linen);
}

.ns-post__cats .wp-block-post-terms__separator {
	display: none;
}

.ns-post__cats a + a {
	margin-left: 0.4rem;
}

.ns-post__title {
	margin: 0;
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	line-height: 1.15;
	text-wrap: balance;
}

.ns-post__title a {
	color: var(--wp--preset--color--bark);
	text-decoration: none;
	transition: color 0.18s ease-out;
}

.ns-post__title a:hover {
	color: var(--wp--preset--color--leaf);
}

.ns-post__excerpt {
	margin: 0;
}

.ns-post__excerpt p {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.6;
}

.ns-post__more {
	display: inline-block;
	margin-top: 0.25rem;
	font-weight: 700;
	color: var(--wp--preset--color--leaf);
	text-decoration: none;
	border-bottom: 2px solid var(--wp--preset--color--squash);
	padding-bottom: 2px;
}

.ns-post__more:hover {
	color: var(--wp--preset--color--beet);
}

@media (max-width: 40rem) {
	.ns-post {
		grid-template-columns: 1fr;
		grid-template-rows: none;
	}
	.ns-post > .ns-post__image {
		grid-row: auto;
		margin-bottom: 0.5rem;
		max-width: 26rem;
	}
}

/* Pagination as pills. */
.ns-pagination {
	margin-top: clamp(2.5rem, 5vw, 4rem);
	font-weight: 700;
}

.ns-pagination a,
.ns-pagination .page-numbers {
	padding: 0.5rem 1rem;
	border-radius: 999px;
	text-decoration: none;
	color: var(--wp--preset--color--leaf);
}

.ns-pagination a:hover {
	background: var(--wp--preset--color--leaf-soft);
}

.ns-pagination .page-numbers.current {
	background: var(--wp--preset--color--leaf);
	color: var(--wp--preset--color--linen);
}

/* Single note. */
.ns-page-head--post h1 {
	font-size: clamp(2.25rem, 4.8vw, 3.75rem);
	color: var(--wp--preset--color--bark);
	max-width: 22ch;
}

.ns-page-head--post .ns-post__meta {
	margin-bottom: 1.25rem;
}

.ns-post__hero {
	margin-top: clamp(1.5rem, 3vw, 2.5rem);
	margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.ns-post__hero img {
	border-radius: var(--ns-r-slab);
	background: var(--wp--preset--color--oat);
}

.ns-prose > * + * {
	margin-top: 1.25rem;
}

/* One left edge for everything in a note. The global 66ch paragraph cap
   would otherwise make paragraphs a different width from headings and,
   because the layout centres each child, put them on a different edge. */
.ns-prose > :not(.alignwide):not(.alignfull) {
	max-width: var(--wp--style--global--content-size);
	margin-left: auto;
	margin-right: auto;
}

.ns-prose h2 {
	margin-top: 2.75rem;
	font-size: clamp(1.625rem, 3vw, 2.125rem);
	color: var(--wp--preset--color--leaf);
}

.ns-prose h3 {
	margin-top: 2rem;
}

.ns-prose p,
.ns-prose li {
	font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
	line-height: 1.7;
}

.ns-prose ul,
.ns-prose ol {
	padding-left: 1.4rem;
}

.ns-prose blockquote {
	margin: 2rem 0;
	padding: 1.5rem 1.75rem;
	border: 0;
	border-radius: var(--ns-r-soft);
	background: var(--wp--preset--color--leaf-soft);
}

.ns-prose blockquote p {
	margin: 0;
	color: var(--wp--preset--color--leaf);
}

.ns-prose img {
	border-radius: var(--ns-r-soft);
}

/* The placeholder line at the top of each seeded post. */
.ns-prose .ns-placeholder-note {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--wp--preset--color--soil);
}

/* Older / newer. */
.ns-post-nav__links {
	gap: 1rem 2rem;
}

.ns-post-nav__links .wp-block-post-navigation-link {
	max-width: 24rem;
	font-weight: 600;
	color: var(--wp--preset--color--soil);
}

/* Core folds the label into the accessible name when the title is shown;
   give sighted readers the direction as well. */
.ns-post-nav__links .post-navigation-link-previous::before {
	content: "Older note";
	display: block;
	font-size: 0.875rem;
}

.ns-post-nav__links .post-navigation-link-next::before {
	content: "Newer note";
	display: block;
	font-size: 0.875rem;
	text-align: right;
}

.ns-post-nav__links .post-navigation-link-next {
	text-align: right;
}

.ns-post-nav__links .wp-block-post-navigation-link a {
	display: block;
	margin-top: 0.15rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.25rem;
	line-height: 1.25;
	color: var(--wp--preset--color--bark);
	text-decoration: none;
}

.ns-post-nav__links .wp-block-post-navigation-link a:hover {
	color: var(--wp--preset--color--leaf);
}

/* Latest three on the home page: image over text, three across, no boxes. */
.ns-posts--latest {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: clamp(1.5rem, 3vw, 2.5rem);
}

.ns-posts--latest .ns-post {
	grid-template-columns: 1fr;
	grid-template-rows: none;
	row-gap: 0.5rem;
}

.ns-posts--latest .ns-post > .ns-post__image {
	grid-row: auto;
	margin-bottom: 0.5rem;
}

.ns-posts--latest .ns-post__title {
	font-size: clamp(1.25rem, 2vw, 1.5rem);
}

.ns-posts--latest .ns-post__excerpt {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.ns-post__image a,
	.ns-post__title a,
	.ns-post__cats a {
		transition: none;
	}
}

/* --------------------------------------------------------------------------
   18. Photography — real things on the table. Every photo sits in a rounded
   or blob frame like everything else here; nothing has a corner.
   -------------------------------------------------------------------------- */

.ns-photo {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: var(--ns-r-slab);
	background: var(--wp--preset--color--oat);
}

.ns-photo--wide {
	aspect-ratio: 16 / 7;
}

.ns-photo--tall {
	aspect-ratio: 4 / 5;
}

.ns-photo--blob {
	aspect-ratio: 1;
	border-radius: 64% 36% 56% 44% / 46% 66% 34% 54%;
}

.ns-photo--blob-alt {
	aspect-ratio: 1;
	border-radius: 38% 62% 46% 54% / 60% 40% 60% 40%;
}

/* A photo tucked under a section heading, sized to the column. */
.ns-photo-col {
	margin-top: clamp(1.5rem, 3vw, 2.5rem);
	max-width: 22rem;
}

/* Three things from the shelf, laid down slightly askew. */
.ns-band {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.9rem, 2vw, 1.5rem);
	margin: 0 0 clamp(2rem, 4vw, 3rem);
	padding: 0;
	list-style: none;
}

.ns-band li {
	margin: 0;
}

.ns-band .ns-photo {
	aspect-ratio: 4 / 3;
	transition: transform 0.35s var(--ns-ease);
}

.ns-band li:nth-child(1) .ns-photo { transform: rotate(-1.5deg); }
.ns-band li:nth-child(2) .ns-photo { transform: translateY(0.75rem); }
.ns-band li:nth-child(3) .ns-photo { transform: rotate(1.5deg); }

.ns-band li:hover .ns-photo {
	transform: rotate(0) translateY(-0.25rem);
}

.ns-band figcaption {
	margin: 0.6rem 0.25rem 0;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--soil);
}

.has-leaf-background-color .ns-band figcaption,
.has-beet-background-color .ns-band figcaption {
	color: var(--wp--preset--color--leaf-tint);
}

@media (max-width: 40rem) {
	.ns-band {
		grid-template-columns: 1fr 1fr;
	}
	.ns-band li:nth-child(3) {
		grid-column: 1 / -1;
	}
	.ns-band li:nth-child(3) .ns-photo {
		aspect-ratio: 16 / 9;
		transform: none;
	}
}

/* A photo inside the recipe card, above the two columns. */
.ns-plate .ns-photo--wide {
	margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
	border-radius: var(--ns-r-soft);
}

@media (prefers-reduced-motion: reduce) {
	.ns-band .ns-photo {
		transition: none;
	}
}
