/*
Theme Name: CookBlocks
Theme URI: https://cookblocks.com
Author: Haley Ross
Author URI: https://cookblocks.com/about
Description: Custom theme for CookBlocks — built around the frozen block method.
Version: 0.2.1
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
License: Proprietary
Text Domain: cookblocks
*/

/* ============================================
   LAYOUT
   ============================================ */

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.container {
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--space-5);
}

.site-main {
	padding-block: 0;
	flex: 1;
}

/* ============================================
   SITE HEADER — desktop default
   ============================================ */

.site-header {
	background: var(--warm-2);
}

.site-header__inner {
	/* Header content sits in the 1140 container (matches body content
	   alignment at wide viewports) with 32px internal padding L/R per
	   Figma 308:5. The warm-2 background extends full-viewport from
	   .site-header (outer) so the bar visually spans edge-to-edge.

	   box-sizing: border-box is critical — the theme has no global
	   box-sizing reset, so without this the inner would be 1140 + 64
	   (padding) = 1204 wide and the logo would sit 32px FURTHER OUT
	   than the hero text which uses border-box (1140 total). */
	box-sizing: border-box;
	max-width: var(--container-max);
	margin-inline: auto;
	padding: 10px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-5);
	min-height: 78px;
}

.site-header__brand .custom-logo,
.site-header__brand .custom-logo-link img {
	display: block;
	width: 250px;
	max-width: 100%;
	height: auto;
}

.site-header__name {
	font-family: var(--font-display);
	font-size: var(--font-size-h3);
	font-weight: var(--weight-bold);
	color: var(--color-text-heading);
	text-decoration: none;
}

.site-header__nav .site-nav {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 10px;
	align-items: center;
}

.site-header__nav .site-nav a {
	font-family: var(--font-display);
	font-weight: var(--weight-bold);
	font-size: 16px;
	color: var(--warm-7);
	text-decoration: none;
	letter-spacing: 0.32px;
	min-width: 113px;
	text-align: center;
	display: inline-block;
	background: var(--warm-4);
	border: 1px solid transparent;
	border-radius: 5px;
	padding: 4px 0;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.site-header__nav .site-nav a:hover,
.site-header__nav .site-nav a:focus-visible {
	background: #e4ddd2;
	border-color: var(--warm-5);
	outline: none;
}

.site-header__nav .site-nav .site-nav__cta a {
	background: var(--brand-cinnabar);
	color: var(--color-white);
	font-family: var(--font-display);
	font-weight: var(--weight-semibold);
	font-size: 16px;
	letter-spacing: 0.16px;
	padding: 8px 10px;
	height: 44px;
	min-width: auto;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	border-radius: var(--radius-button);
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.site-header__nav .site-nav .site-nav__cta a:hover,
.site-header__nav .site-nav .site-nav__cta a:focus-visible {
	background: #95310C;
	text-decoration: none;
	outline: none;
}

/* Espresso variant of the nav CTA — same mechanism as site-nav__cta
   (add the CSS class "site-nav__cta--espresso" to a menu item <li> in
   Appearance → Menus). Used alongside the cinnabar CTA when the nav
   needs two buttons (e.g. cinnabar for the Playbook, espresso for app
   early access). Dimensions match the cinnabar rule above exactly. */
.site-header__nav .site-nav .site-nav__cta--espresso a {
	background: var(--warm-7);
	color: var(--color-white);
	font-family: var(--font-display);
	font-weight: var(--weight-semibold);
	font-size: 16px;
	letter-spacing: 0.16px;
	padding: 8px 10px;
	height: 44px;
	min-width: auto;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	border-radius: var(--radius-button);
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.site-header__nav .site-nav .site-nav__cta--espresso a:hover,
.site-header__nav .site-nav .site-nav__cta--espresso a:focus-visible {
	background: #4A3A33;
	color: var(--color-white);
	text-decoration: none;
	outline: none;
}

.site-header__divider {
	height: 12px;
	background: var(--brand-forest);
	width: 100%;
}

/* Landing variant — centered logo, no nav (used on Playbook/Waitlist pages).
   Shorter header height and smaller logo than the default. */
.site-header--landing .site-header__inner {
	justify-content: center;
	min-height: 78px;
}

.site-header--landing .site-header__brand .custom-logo,
.site-header--landing .site-header__brand .custom-logo-link img {
	width: auto;
	max-height: 32px;
}

/* ============================================
   SITE FOOTER — landing variant (simple legal band)
   ============================================ */

.site-footer-landing {
	background: var(--warm-4);
	border-top: 1px solid #9b8b6a;
	padding: 20px 32px;
}

.site-footer-landing__inner {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 32px;
	padding-bottom: 10px;
}

.site-footer-landing__legal {
	display: flex;
	flex-direction: column;
	gap: 5px;
	max-width: 832px;
}

.site-footer-landing__disclosure {
	font-family: var(--font-body);
	font-weight: var(--weight-bold);
	font-size: 15px;
	line-height: 20px;
	color: var(--warm-7);
	margin: 0;
}

.site-footer-landing__copyright {
	font-family: var(--font-body);
	font-weight: var(--weight-bold);
	font-size: 15px;
	line-height: 25px;
	color: var(--warm-7);
	margin: 0;
}

.site-footer-landing__links {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 5px;
	text-align: right;
}

.site-footer-landing__links a {
	font-family: var(--font-body);
	font-weight: var(--weight-bold);
	font-size: 15px;
	line-height: 25px;
	color: var(--warm-7);
	text-decoration: none;
	transition: color 0.15s ease;
}

.site-footer-landing__links a:hover,
.site-footer-landing__links a:focus-visible {
	color: var(--brand-forest);
	outline: none;
}

/* Mobile — stack columns vertically with the links on top of legal copy. */
@media (max-width: 600px) {
	.site-footer-landing {
		padding: 16px 24px;
	}

	.site-footer-landing__inner {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 12px;
	}

	.site-footer-landing__links {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		text-align: left;
		gap: 16px;
	}

	.site-footer-landing__disclosure,
	.site-footer-landing__copyright {
		line-height: 18px;
	}
}

/* ============================================
   SITE FOOTER — top band (desktop)
   ============================================ */

.site-footer {
	margin-top: 0;
}

.site-footer__columns {
	background: var(--warm-4);
	padding-block: 32px;
	padding-inline: max(32px, calc((100vw - var(--container-max)) / 2));
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: var(--space-5);
}

.site-footer__column {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 333px;
}

.site-footer__heading {
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: var(--weight-semibold);
	color: var(--warm-7);
	line-height: 35px;
	margin: 0;
}

.site-footer__text {
	font-family: var(--font-body);
	font-weight: var(--weight-semibold);
	font-size: 16px;
	color: var(--warm-7);
	line-height: 22px;
	margin: 0;
}

.site-footer__links {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.site-footer__links a {
	font-family: var(--font-body);
	font-weight: var(--weight-bold);
	font-size: 16px;
	color: var(--brand-forest);
	line-height: 25px;
	text-decoration: none;
	transition: color 0.15s ease;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
	color: var(--warm-6);
	outline: none;
}

.site-footer__cta {
	display: inline-flex;
	align-items: center;
	background: var(--brand-cinnabar);
	color: var(--color-white);
	font-family: var(--font-display);
	font-weight: var(--weight-semibold);
	font-size: 18px;
	letter-spacing: 0.18px;
	padding: 8px 15px;
	height: 44px;
	box-sizing: border-box;
	border-radius: var(--radius-button);
	text-decoration: none;
	width: fit-content;
	white-space: nowrap;
	margin-top: 10px;
	transition: background-color 0.15s ease;
}

.site-footer__cta:hover,
.site-footer__cta:focus-visible {
	background: #95310C;
	color: var(--color-white);
	outline: none;
}

.site-footer__cta-arrow {
	margin-left: 4px;
	display: inline-block;
}

/* ============================================
   SITE FOOTER — bottom band (Cinnabar)
   ============================================ */

.site-footer__bottom {
	background: var(--brand-cinnabar);
	padding-block: 20px;
	padding-inline: max(32px, calc((100vw - var(--container-max)) / 2));
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: var(--space-5);
}

.site-footer__legal {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.site-footer__disclosure,
.site-footer__copyright {
	font-family: var(--font-body);
	font-weight: var(--weight-medium);
	font-size: 14px;
	color: var(--color-white);
	margin: 0;
}

.site-footer__disclosure {
	line-height: 20px;
}

.site-footer__copyright {
	line-height: 25px;
}

.site-footer__social {
	display: flex;
	gap: 20px;
	align-items: center;
}

.site-footer__social-icon {
	display: inline-block;
	width: 37px;
	height: 37px;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.site-footer__social-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.site-footer__social-icon:hover,
.site-footer__social-icon:focus-visible {
	filter: brightness(0.92);
	transform: translateY(-1px);
	outline: none;
}

/* ============================================
   TABLET (≤1023px)
   ============================================ */

@media (max-width: 1023px) {
	.site-header__brand .custom-logo,
	.site-header__brand .custom-logo-link img {
		max-height: 37px;
		max-width: 288px;
	}

	/* Footer top band — smaller type, tighter gap */
	.site-footer__column {
		gap: 5px;
	}

	.site-footer__heading {
		font-size: 20px;
	}

	.site-footer__text {
		font-size: 16px;
		line-height: 20px;
	}

	.site-footer__links {
		gap: 5px;
	}

	.site-footer__links a {
		font-size: 16px;
	}

	.site-footer__cta {
		font-size: 16px;
		letter-spacing: 0.16px;
	}

	/* Footer bottom band — social left, text right */
	.site-footer__bottom {
		flex-direction: row-reverse;
	}

	.site-footer__legal {
		flex: 1;
	}

	.site-footer__disclosure,
	.site-footer__copyright {
		font-size: 14px;
		line-height: 20px;
	}
}

/* ============================================
   MOBILE (≤767px)
   ============================================ */

@media (max-width: 767px) {
	.site-header__inner {
		flex-direction: column;
		align-items: center;
		gap: 16px;
		padding: 16px 25px;
	}

	.site-header__brand .custom-logo,
	.site-header__brand .custom-logo-link img {
		max-height: 33px;
		max-width: 254px;
	}

	.site-header__nav .site-nav {
		flex-wrap: wrap;
		justify-content: center;
		gap: 10px;
		width: 100%;
	}

	.site-header__nav .site-nav a {
		font-size: 16px;
		letter-spacing: 0.32px;
		min-width: 90px;
	}

	.site-header__nav .site-nav .site-nav__cta {
		flex-basis: 100%;
		display: flex;
		justify-content: center;
	}

	/* Footer top band — columns stack */
	.site-footer__columns {
		flex-direction: column;
		gap: var(--space-6);
		padding: 24px;
	}

	.site-footer__column {
		max-width: 100%;
	}

	.site-footer__text {
		font-weight: var(--weight-bold);
	}

	/* Footer bottom band — social on top centered, text below centered */
	.site-footer__bottom {
		flex-direction: column-reverse;
		align-items: center;
		padding: 20px 24px;
	}

	.site-footer__legal {
		align-items: center;
		text-align: center;
	}

	.site-footer__social {
		justify-content: center;
	}
}

/* ============================================
   404 PAGE
   ============================================ */

/* Override body bg to cream on 404 so the area between the section
   and the footer doesn't show through as the default warm-3 tan. */
body.error404 {
	background: var(--warm-1);
}

.page-404 {
	background: var(--warm-1);
	padding: 60px 32px 120px;
	display: flex;
	justify-content: center;
}

.page-404__inner {
	width: 100%;
	max-width: 980px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 60px;
	text-align: center;
	padding: 40px 60px;
}

.page-404__headline {
	font-family: var(--font-display);
	font-weight: var(--weight-semibold);
	font-size: 45px;
	line-height: 55px;
	color: var(--brand-forest);
	margin: 0;
	max-width: 470px;
}

.page-404__body {
	font-family: var(--font-display);
	font-weight: var(--weight-semibold);
	font-size: 20px;
	line-height: 28px;
	color: var(--warm-7);
	margin: 0;
	max-width: 678px;
}

.page-404__actions {
	display: flex;
	gap: 16px;
	align-items: stretch;
	width: 100%;
}

.page-404__action {
	flex: 1 1 0;
	min-width: 0;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 15px;
	background: var(--brand-cinnabar);
	color: var(--color-white);
	font-family: var(--font-display);
	font-weight: var(--weight-semibold);
	font-size: 18px;
	letter-spacing: 0.18px;
	border-radius: 10px;
	text-decoration: none;
	transition: background-color 0.15s ease;
	box-sizing: border-box;
}

.page-404__action:hover,
.page-404__action:focus-visible {
	background: #95310c;
	outline: none;
}

.page-404__action-arrow {
	display: inline-block;
}

/* Tablet — scale headline + body down, keep buttons in a row. */
@media (max-width: 1140px) {
	.page-404 {
		padding: 48px 32px 80px;
	}

	.page-404__inner {
		gap: 48px;
		padding: 32px 32px;
	}

	.page-404__headline {
		font-size: 38px;
		line-height: 46px;
	}

	.page-404__body {
		font-size: 18px;
		line-height: 26px;
	}

	.page-404__action {
		font-size: 16px;
	}
}

/* Mobile — stack the action buttons full-width. */
@media (max-width: 600px) {
	.page-404 {
		padding: 32px 20px 60px;
	}

	.page-404__inner {
		gap: 32px;
		padding: 24px 16px;
	}

	.page-404__headline {
		font-size: 30px;
		line-height: 38px;
	}

	.page-404__body {
		font-size: 17px;
		line-height: 25px;
	}

	.page-404__actions {
		flex-direction: column;
	}
}

/* ============================================
   PINTEREST DISCOVERABLE IMAGE
   Pushed off-canvas + sized to 1px so the image still downloads and
   Pinterest's bookmarklet/extension can read its data-pin-* attributes,
   but readers never see it. Defined globally because the_content filter
   can fire on any singular template.
   ============================================ */

.cb-pinterest-pin-hidden {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}