/*
 * Public pages: base layer (direction "Apothecary", the owner's pick on
 * 2026-12-03: "pens and social proof, less ai slop, have some sharp corners,
 * make it feel premium").
 *
 * Loads on every front-end page after build/index.css and responsive.css.
 * Plain CSS on purpose: deploys pull the repository and never run the npm
 * build, so styles that must reach the live site live in assets/, not only in
 * src/. The forest, bone and ink come from the brand tokens; night, brass and
 * the two bones below are this direction's additions, to move into the token
 * source (tokens/src) once the design settles.
 *
 * 1. Palette and shared atoms: wrap, rhythm, display type, buttons, links,
 *    meta lines, notes, focus, touch.
 * 2. Header: one row at every width; dark over a dark hero.
 * 3. Footer: one grid on forest night.
 */

:root {
	--pwp-gutter: var(--wp--style--root--padding-left, clamp(1.25rem, 5vw, 3rem));
	--pwp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--pwp-ap-night: #13211A;
	--pwp-ap-night-2: #1B2D23;
	--pwp-ap-forest: var(--pwp-color-brand-primary);
	--pwp-ap-bone: #EFEAE0;
	--pwp-ap-bone-2: #E3DCCF;
	--pwp-ap-paper: #F8F5EF;
	--pwp-ap-brass: #BC9A5E;
	--pwp-ap-brass-deep: #7C6236;
	--pwp-ap-ink: var(--pwp-color-neutral-900);
	--pwp-ap-ash: #5A544A;
	--pwp-ap-mist: rgba(239, 234, 224, 0.76);
	--pwp-ap-rule-dark: rgba(188, 154, 94, 0.5);
	--pwp-shadow-warm: 0 30px 60px -40px rgba(19, 33, 26, 0.45);
}

/* 1. Shared atoms ------------------------------------------------------- */

.pwp-wrap {
	width: min(var(--wp--style--global--wide-size, 1200px), 100% - 2 * var(--pwp-gutter));
	margin-inline: auto;
}

.pwp-band {
	padding-block: clamp(4.5rem, 8vw, 7.5rem) clamp(5rem, 9vw, 8.5rem);
}

.pwp-band > * {
	margin-block: 0;
}

/* A crisp, light Fraunces for the public pages' display type. */
.pwp-display {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-variation-settings: "SOFT" 0, "WONK" 0;
	font-weight: 330;
	font-size: clamp(2.2rem, 1.3rem + 2.8vw, 3.9rem);
	line-height: 1.04;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

h1.pwp-display {
	font-size: clamp(3rem, 1.3rem + 5.2vw, 6.25rem);
	line-height: 0.98;
	letter-spacing: -0.03em;
}

.pwp-title-sm {
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	font-size: 1.1875rem;
	line-height: 1.3;
	letter-spacing: -0.005em;
	text-wrap: balance;
}

.pwp-lead {
	font-size: 1.1875rem;
	line-height: 1.6;
	color: var(--pwp-ap-ash);
	text-wrap: pretty;
}

/* Buttons: square, forest by default, with hover, press and focus states. */
.wp-block-button__link {
	padding: 0.9rem 1.6rem;
	border-radius: 0;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s var(--pwp-ease), color 0.2s var(--pwp-ease), transform 0.2s var(--pwp-ease);
}

.wp-block-button__link:active {
	transform: translateY(1px);
}

/* Plain underlined text link: the quiet second action. */
.pwp-plain-link {
	display: inline-flex;
	align-items: center;
	color: var(--pwp-ap-forest);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
	transition: text-decoration-color 0.2s var(--pwp-ease), color 0.2s var(--pwp-ease);
}

.pwp-plain-link:hover {
	text-decoration-color: currentColor;
}

/* Older arrow links keep their words; the arrow goes (no decoration). */
.pwp-arrow-link {
	display: inline-flex;
	align-items: center;
	color: var(--pwp-ap-forest);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

.pwp-arrow-link:hover {
	text-decoration-color: currentColor;
}

.pwp-arrow-link svg {
	display: none;
}

/* Short facts under a button: time, privacy, review. */
.pwp-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin: 1.75rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
	color: var(--pwp-ap-ash);
}

.pwp-meta li {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.pwp-meta svg {
	flex: none;
	width: 1rem;
	height: 1rem;
	color: var(--pwp-ap-brass-deep);
}

.pwp-note {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--pwp-ap-ash);
}

/* Focus and touch for the links, rows and buttons. */
.pwp-plain-link:focus-visible,
.pwp-arrow-link:focus-visible,
.pwp-faq summary:focus-visible,
.pwp-footer a:focus-visible,
.pwp-header a:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--pwp-ap-forest);
	outline-offset: 3px;
}

.wp-block-button__link,
.pwp-plain-link,
.pwp-arrow-link,
.pwp-faq summary {
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

@media (max-width: 781px) {
	.pwp-plain-link,
	.pwp-arrow-link {
		min-height: 44px;
	}
}

/* 2. Header: logo, links, Log in and the button on one row -------------- */

.pwp-header > .alignwide {
	flex-wrap: nowrap;
	gap: 1rem;
}

.pwp-header > .alignwide > .wp-block-group {
	flex-wrap: nowrap;
	column-gap: 1.75rem;
}

.pwp-header .pwp-logo {
	display: inline-flex;
	flex: none;
	color: var(--pwp-ap-forest);
}

.pwp-header .pwp-logo svg {
	display: block;
	width: 8.25rem;
	height: auto;
}

.pwp-header .wp-block-navigation .wp-block-navigation-item__content {
	color: var(--pwp-color-neutral-700);
	text-decoration: none;
	transition: color 0.2s var(--pwp-ease);
}

.pwp-header .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--pwp-ap-ink);
}

.pwp-header .pwp-header__login {
	margin: 0;
	white-space: nowrap;
}

.pwp-header .pwp-header__login a {
	color: var(--pwp-ap-ink);
	font-weight: 600;
	text-decoration: none;
}

.pwp-header .pwp-header__login a:hover {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.pwp-header .wp-block-button__link {
	white-space: nowrap;
	padding: 0.65rem 1.15rem;
}

/* Over a dark hero (home page, ad landers) the header turns dark too. */
.wp-site-blocks:has(.pwp-front-hero) .pwp-header {
	background: var(--pwp-ap-night);
	border-bottom: 1px solid rgba(239, 234, 224, 0.1);
	color: var(--pwp-ap-bone);
}

.wp-site-blocks:has(.pwp-front-hero) .pwp-header .pwp-logo,
.wp-site-blocks:has(.pwp-front-hero) .pwp-header .pwp-header__login a,
.wp-site-blocks:has(.pwp-front-hero) .pwp-header .wp-block-navigation__responsive-container-open {
	color: var(--pwp-ap-bone);
}

.wp-site-blocks:has(.pwp-front-hero) .pwp-header .wp-block-navigation .wp-block-navigation-item__content {
	color: var(--pwp-ap-mist);
}

.wp-site-blocks:has(.pwp-front-hero) .pwp-header .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--pwp-ap-bone);
}

.wp-site-blocks:has(.pwp-front-hero) .pwp-header .wp-block-button__link {
	background: var(--pwp-ap-bone);
	color: var(--pwp-ap-night);
}

.wp-site-blocks:has(.pwp-front-hero) .pwp-header .wp-block-button__link:hover {
	background: #FFFFFF;
}

.wp-site-blocks:has(.pwp-front-hero) .pwp-header a:focus-visible {
	outline-color: var(--pwp-ap-bone);
}

/* The open phone menu keeps dark words on a light sheet. */
.wp-site-blocks:has(.pwp-front-hero) .pwp-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--pwp-ap-paper);
	color: var(--pwp-ap-ink);
}

.wp-site-blocks:has(.pwp-front-hero) .pwp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	color: var(--pwp-ap-ink);
}

@media (max-width: 781px) {
	.pwp-header .pwp-logo svg {
		width: 6.5rem;
	}

	.pwp-header > .alignwide,
	.pwp-header > .alignwide > .wp-block-group {
		column-gap: 0.625rem;
	}

	.pwp-header .wp-block-button__link {
		padding: 0.6rem 0.9rem;
	}
}

/* Below 600px the links fold into the menu button, which then sits last, at
   the right edge, with its icon centred in the tap area. */
@media (max-width: 599px) {
	.pwp-header .wp-block-navigation {
		order: 3;
	}

	.pwp-header .wp-block-navigation__responsive-container-open {
		align-items: center;
		justify-content: center;
	}
}

@media (max-width: 380px) {
	.pwp-header .pwp-logo svg {
		width: 5.75rem;
	}

	.pwp-header .wp-block-button__link {
		padding-inline: 0.75rem;
	}
}

/* 3. Footer: brand, links and policies on one grid; fine print below ---- */

.pwp-footer {
	background-color: var(--pwp-ap-night) !important;
	font-size: 0.9375rem;
}

.pwp-footer a {
	color: var(--pwp-ap-bone);
	text-decoration: none;
}

.pwp-footer a:hover {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.pwp-footer :focus-visible {
	outline-color: var(--pwp-ap-bone);
}

.pwp-footer .pwp-footer__top {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 2.5rem 1.5rem;
}

.pwp-footer .pwp-footer__top > *,
.pwp-footer .pwp-footer__brand > * {
	margin: 0;
}

.pwp-footer .pwp-footer__brand {
	grid-column: 1 / span 5;
}

.pwp-footer .pwp-logo {
	display: inline-flex;
	color: var(--pwp-ap-bone);
}

.pwp-footer .pwp-logo svg {
	display: block;
	width: 9.5rem;
	height: auto;
}

.pwp-footer .pwp-footer__brand p {
	max-width: 26rem;
	margin-top: 1.25rem;
}

/* Each link on its own line: the paragraph is a grid, so the spaces between
   the links collapse away. */
.pwp-footer .pwp-footer__nav,
.pwp-footer .pwp-footer__legal {
	display: grid;
	align-content: start;
	gap: 0.7rem;
	font-size: 0.9375rem !important;
}

.pwp-footer .pwp-footer__nav {
	grid-column: 7 / span 2;
}

.pwp-footer .pwp-footer__legal {
	grid-column: 9 / span 4;
}

.pwp-footer .pwp-footer__nav a,
.pwp-footer .pwp-footer__legal a {
	justify-self: start;
}

.pwp-footer .pwp-footer__fine {
	margin-top: 3.5rem;
	padding-top: 2rem;
	border-top: 1px solid var(--pwp-ap-rule-dark);
	columns: 2;
	column-gap: 3rem;
}

.pwp-footer .pwp-footer__fine p {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem !important;
	line-height: 1.6;
	break-inside: avoid;
}

.pwp-footer .pwp-footer__fine > *,
.pwp-footer .pwp-footer__fine .wp-block-group > * {
	margin-block-start: 0;
	max-width: none;
}

.pwp-footer .pwp-footer__fine strong {
	color: var(--pwp-ap-bone);
	font-weight: 600;
}

.pwp-footer .pwp-footer__fine a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
	text-decoration-color: rgba(239, 234, 224, 0.4);
}

.pwp-footer .pwp-footer__base {
	margin-top: 1.5rem;
}

.pwp-footer .pwp-footer__base p {
	margin: 0;
	color: rgba(239, 234, 224, 0.6) !important;
}

@media (max-width: 781px) {
	.pwp-footer .pwp-footer__brand {
		grid-column: 1 / -1;
	}

	.pwp-footer .pwp-footer__nav,
	.pwp-footer .pwp-footer__legal {
		grid-column: span 6;
	}

	.pwp-footer .pwp-footer__fine {
		columns: 1;
	}
}

/* Reduced motion: hover and press effects stay put. */
@media (prefers-reduced-motion: reduce) {
	.wp-block-button__link,
	.pwp-plain-link,
	.pwp-arrow-link,
	.pwp-faq .pwp-faq__list summary::after {
		transition: none;
	}

	.wp-block-button__link:active {
		transform: none;
	}
}

/* Visually hidden, still read by screen readers. */
.pwp-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
