/*
 * norabouz.ca site styles.
 * Colours, fonts and sizes come from theme.json; this file holds layout and
 * the few things theme.json cannot express. Values at a 1280px window are in
 * the handoff, section 3.
 */

:root {
	--nb-edge: max(20px, 6.25vw);           /* header and footer side margin */
	--nb-card-hover: #ECE5D9;
	--nb-arrow: #A69D95;
	--nb-line: color-mix(in srgb, var(--wp--preset--color--text) 15%, transparent);
	--nb-thread: var(--wp--preset--color--place); /* footer rule; set per page */
}

/* ---------- Dark mode: follows the visitor's device setting ---------- */
@media (prefers-color-scheme: dark) {
	body {
		--wp--preset--color--background: #2A2724;
		--wp--preset--color--surface: #36322E;
		--wp--preset--color--text: #F4EFE6;
		--wp--preset--color--text-secondary: #C9BFB3;
		--wp--preset--color--green: #9BC7B3;
		--wp--preset--color--green-hover: #C3DFD1;
		--nb-card-hover: #433E38;
		--nb-arrow: #8F867E;
		--nb-line: color-mix(in srgb, #F4EFE6 17%, transparent);
	}
}

/* ---------- Basics ---------- */
a:hover {
	text-underline-offset: 3px;
}

:where(a, button, .wp-block-button__link):focus-visible {
	outline: 2px solid var(--wp--preset--color--green);
	outline-offset: 3px;
	border-radius: 2px;
}

.wp-site-blocks > * {
	margin-block-start: 0;
}

.wp-site-blocks > main {
	padding-block: var(--wp--preset--spacing--60);
	min-height: 40vh;
}

.p-lead {
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 300;
	line-height: 1.5;
}

/* ---------- The name ---------- */
/* Stretched with a transform, which does not reserve space, so a margin
   stands in for the extra 40% of width. */
.wp-block-site-title,
.nb-name {
	display: inline-block;
	width: fit-content;
	margin-block: 0;
	margin-inline-end: 2.6em;
	font-family: var(--wp--preset--font-family--name);
	letter-spacing: 0.09em;
	line-height: 1.2;
	white-space: nowrap;
	transform: scaleX(1.4);
	transform-origin: left center;
}

.wp-block-site-title a,
.wp-block-site-title a:hover {
	color: var(--wp--preset--color--text);
	font-family: inherit;
	text-decoration: none;
}

/* ---------- Header ---------- */
.nb-header {
	padding: 24px var(--nb-edge);
	border-bottom: 1px solid var(--nb-line);
	align-items: center;
	gap: 12px 40px;
}

.nb-header__nav {
	align-items: center;
	gap: 26px;
}

.wp-block-navigation .wp-block-navigation-item__content {
	color: var(--wp--preset--color--text);
}

.wp-block-navigation .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation .wp-block-navigation-item__content[aria-current="page"] {
	font-weight: 500;
}

/* Phone drawer */
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--background);
	color: var(--wp--preset--color--text);
	padding: 24px var(--nb-edge);
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--text);
	min-width: 44px;
	min-height: 44px;
	justify-content: center;
	align-items: center;
}

/* ---------- Buttons ---------- */
.wp-block-button__link,
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 44px;
	padding-block: 0;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.wp-block-button.is-style-help .wp-block-button__link {
	background-color: var(--wp--preset--color--community);
	color: #3B3632;
}

.wp-block-button.is-style-help .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--yellow-hover);
	color: #3B3632;
}

@media (prefers-color-scheme: dark) {
	.wp-block-button.is-style-help .wp-block-button__link,
	.wp-block-button.is-style-help .wp-block-button__link:hover {
		color: #2A2724;
	}
}

/* ---------- Thread heading and quote panel ---------- */
.nb-thread-rule {
	width: 64px;
	height: 4px;
	margin-inline: 0;
	border: 0;
	border-radius: 2px;
	background: var(--nb-thread);
}

.nb-quote-panel {
	padding: 40px 48px;
	border-radius: 20px;
	background: var(--nb-thread);
	color: #3B3632;
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
}

/* ---------- Footer ---------- */
.wp-site-blocks > footer {
	margin-block-start: var(--wp--preset--spacing--70);
}

.nb-footer {
	border-top: 4px solid var(--nb-thread);
}

.nb-footer > *,
.nb-footer__contact > * {
	margin-block-start: 0;
}

.nb-footer__ack {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 6px;
	min-height: 134px;
	box-sizing: border-box;
	padding: 24px var(--nb-edge);
	text-align: center;
	font-size: 15px;
	line-height: 1.55;
}

.nb-footer__ack > * {
	margin: 0;
}

.nb-footer__ack h2 {
	font-size: 14px;
}

.nb-footer__ack p {
	max-width: 960px;
}

.nb-footer__contact {
	background: var(--wp--preset--color--surface);
}

.nb-footer__main {
	justify-content: space-between;
	align-items: center;
	gap: 24px 40px;
	padding: 36px var(--nb-edge);
}

.nb-footer__id {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 15px;
}

.nb-footer__id > * {
	margin: 0;
}

.nb-footer .nb-name {
	font-size: 20px;
}

.nb-footer .wp-block-site-tagline {
	font-size: 15px;
}

.nb-footer__links {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
}

.nb-footer__links > * {
	margin: 0;
}

.nb-footer__links .wp-block-navigation {
	font-size: 15px;
	font-weight: 500;
	letter-spacing: 0;
	gap: 8px 32px;
}

.nb-footer__links .wp-block-navigation .wp-block-navigation-item__content {
	color: var(--wp--preset--color--green);
}

.nb-footer__links .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--green-hover);
}

.nb-social {
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nb-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 44px;
	height: 44px;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--green) 45%, transparent);
	border-radius: 50%;
	color: var(--wp--preset--color--green);
	transition: color 0.2s ease, border-color 0.2s ease;
}

.nb-social a:hover {
	border-color: var(--wp--preset--color--green-hover);
	color: var(--wp--preset--color--green-hover);
}

.nb-social svg {
	width: 20px;
	height: 20px;
}

/* Solid brand marks read heavier than the outlined envelope; size them down. */
.nb-social svg[fill="currentColor"] {
	width: 16px;
	height: 16px;
}

.nb-footer__legal {
	justify-content: space-between;
	gap: 8px 24px;
	padding: 14px var(--nb-edge);
	border-top: 1px solid var(--nb-line);
	color: var(--wp--preset--color--text-secondary);
	font-size: 15px;
}

.nb-footer__legal > * {
	margin: 0;
}

.nb-footer__legal a {
	color: inherit;
}

/* ---------- Narrow screens (plain, until the phone layout is designed) ---------- */
@media (max-width: 781px) {
	.nb-footer__main {
		flex-direction: column;
		align-items: flex-start;
	}

	.nb-footer__links {
		align-items: flex-start;
	}
}
