/* ==========================================================================
   AIP Wellness – design layer on top of theme.json.
   Mirrors the design canvas classes (.lb, .sf, .cd, .bk/.ol, 4R timeline,
   header) and the handoff's responsive rules (900px / 600px).
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
/* "clip" (not "hidden"): stops sideways scroll WITHOUT turning html/body into scroll boxes – "hidden" caused a double scrollbar and broke the sticky members sidebar. */
html { overflow-x: clip; }
body { overflow-x: clip; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
/* Montserrat 700 isn't loaded; use the loaded 600 so bold text isn't synthesised by the browser. */
strong, b { font-weight: 600; }
.wp-site-blocks { padding-top: 0; padding-bottom: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- Typography helpers ---------- */
.aip-lb, .aip-label {
	font-family: 'Montserrat', sans-serif;
	font-size: 11px !important;
	letter-spacing: .2em;
	text-transform: uppercase;
	font-weight: 500;
	line-height: 1.5;
	margin: 0;
}
.aip-sf {
	font-family: 'Montserrat', sans-serif !important;
	font-weight: 300 !important;
	text-transform: uppercase;
	letter-spacing: .05em !important;
	line-height: 1.2 !important;
	color: #000;
}
.aip-serif {
	font-family: 'Cormorant Garamond', serif;
	font-weight: 500;
	font-size: 1.12em;
	letter-spacing: -.01em;
}
.aip-serif-accent { font-style: italic; color: var(--wp--preset--color--orange); }
.aip-hero-title { color: var(--wp--preset--color--salmon) !important; line-height: 1.04; font-size: clamp(38px, 5.4vw, 68px) !important; margin-top: 20px !important; margin-bottom: 22px !important; }
.aip-lead { font-size: var(--wp--preset--font-size--l); max-width: 480px; color: var(--wp--preset--color--body); }
.aip-intro { font-size: var(--wp--preset--font-size--m); max-width: 620px; }
.aip-small { font-size: 13px; color: var(--wp--preset--color--body); margin: 0; }
.aip-muted { color: var(--wp--preset--color--grey); }

/* Section heading block: label + h2 + intro */
.aip-section-head > * { margin: 0; }
.aip-section-head h2 { margin: 14px 0 12px; max-width: 760px; color: var(--wp--preset--color--sky-mid); }
.aip-section-head .aip-intro { margin-bottom: 20px; }
.aip-section-head h2.has-salmon-color { color: var(--wp--preset--color--salmon); }

/* Colour rule: blue boxes get ink headings, peach/salmon boxes get orange headings. */
.has-sky-background-color h2, .has-sky-background-color h1 { color: var(--wp--preset--color--ink) !important; }
.has-peach-background-color h2, .has-blush-background-color h2, .has-salmon-background-color h2,
.has-peach-background-color h1, .has-blush-background-color h1 { color: var(--wp--preset--color--orange) !important; }

/* ---------- Buttons ---------- */
.wp-block-button__link { white-space: nowrap; transition: background-color .15s, color .15s; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--black); color: #fff; }
.aip-btn-sm .wp-block-button__link { padding: 10px 20px; }
.aip-btnrow { gap: 14px !important; }

/* ---------- Cards ---------- */
.aip-card {
	border: 1px solid var(--wp--preset--color--hairline);
	border-radius: 2px;
	padding: 22px;
	background: #fff;
	color: var(--wp--preset--color--body);
}
.aip-card[class*="-background-color"]:not(.has-white-background-color) { border-color: transparent; }
.aip-card > * { margin: 0; }
.aip-card > * + * { margin-top: 8px; }
.aip-card p { font-size: 14px; }
.aip-card--offer { padding: 26px; display: flex; flex-direction: column; }
.aip-card--offer h3 { font-size: 20px !important; margin: 10px 0 8px; }
.aip-card--offer p { color: var(--wp--preset--color--black); margin-bottom: 20px; }
.aip-card--offer .wp-block-buttons { margin-top: auto; }
.aip-card--habit h3 { font-size: 17px !important; margin: 8px 0; }
.aip-num-orange { color: var(--wp--preset--color--rust); }
.aip-num-ink { color: var(--wp--preset--color--ink); }

/* Grids (auto-fit like the design's minmax grids) */
.aip-grid { display: grid !important; gap: 16px; }
.aip-grid > * { margin: 0 !important; }
.aip-grid-280 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.aip-grid-260 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.aip-grid-300 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.aip-grid-230 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.aip-grid-240 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.aip-grid-190 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }

/* ---------- Photos ---------- */
.aip-photo { margin: 0 !important; overflow: hidden; background: #F1ECE6; }
.aip-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aip-photo--hero { height: 540px; border-radius: 10px; }
.aip-photo--hero img { object-position: center 40%; }
.aip-photo--220 { height: 220px; border-radius: 8px; }
.aip-photo--150 { height: 150px; border-radius: 8px; }
.aip-photo--230 { height: 230px; border-radius: 2px; }
.aip-feature h3 { font-size: 17px !important; margin: 14px 0 6px; }
.aip-feature p { margin: 0; font-size: 14px; }
.aip-tile .aip-sf { font-size: 14px; margin: 10px 0 0; }
.aip-tile p { margin: 0; font-size: 13px; }

/* ---------- Sections ---------- */
.aip-section { padding-top: 72px; padding-bottom: 72px; }
.aip-section--80 { padding-top: 80px; padding-bottom: 80px; }
.aip-hero { padding-top: 64px; padding-bottom: 64px; gap: 56px !important; margin-top: 0 !important; margin-bottom: 0 !important; }
.aip-hero > .wp-block-column { min-width: 0; }
.aip-offers { margin-top: -24px !important; position: relative; }

/* ---------- 4R timeline ---------- */
.aip-r4 { position: relative; display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.aip-r4::before {
	content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 22px; height: 2px;
	background: var(--wp--preset--color--sky-mid);
}
.aip-r4 > * { margin: 0 !important; }
.aip-r4-step { position: relative; text-align: center; padding: 0 16px; }
.aip-r4-step > * { margin: 0 auto; }
.aip-r4-num {
	position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 50%;
	background: #fff; border: 2px solid var(--wp--preset--color--ink);
	margin: 0 auto 18px !important; display: flex; align-items: center; justify-content: center;
	font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 20px; color: var(--wp--preset--color--ink);
	line-height: 1;
}
.aip-r4-step h3 { font-size: 19px !important; margin: 0 0 8px !important; }
.aip-r4-step p { color: var(--wp--preset--color--black); max-width: 230px; font-size: 14px; }

/* ---------- Product covers (shop teaser) ---------- */
.aip-cover {
	height: 280px; border-radius: 2px; display: flex; flex-direction: column; justify-content: center;
	align-items: center; text-align: center; padding: 24px; margin: 0 !important;
}
.aip-cover .aip-sf { font-size: 19px; color: var(--wp--preset--color--black); margin: 0; }
.aip-cover p { font-size: 12px; margin: 10px 0 0; color: var(--wp--preset--color--black); }
.aip-product-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px !important; font-size: 14px; }
.aip-product-meta p { margin: 0; }
.aip-product-type { font-size: 12px; margin: 0; }

/* ---------- Recipe teaser cards ---------- */
.aip-recipe-card .wp-block-post-featured-image { height: 230px; margin: 0; overflow: hidden; border-radius: 2px; background: #F1ECE6; }
.aip-recipe-card .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.aip-recipe-card .wp-block-post-title { font-family: 'Montserrat', sans-serif; font-weight: 500; margin: 12px 0 0; text-transform: uppercase; letter-spacing: .08em; font-size: 12px !important; line-height: 1.5; color: var(--wp--preset--color--black); }
.aip-recipe-card .aip-recipe-meta { font-size: 13px; margin: 0; }
.aip-recipes .wp-block-post-template { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)) !important; }

/* ---------- Email capture ---------- */
.aip-signup { display: flex; flex-direction: column; gap: 10px; }
.aip-signup input[type="email"], .aip-signup input[type="text"] {
	width: 100%; border: 0; border-radius: 2px; background: #fff; padding: 14px 16px;
	font: 400 14px 'Montserrat', sans-serif; color: var(--wp--preset--color--black);
}
.aip-signup input:focus { outline: 2px solid var(--wp--preset--color--black); outline-offset: 1px; }
.aip-signup button {
	width: 100%; border: 0; cursor: pointer; background: var(--wp--preset--color--black); color: #fff;
	padding: 15px 30px; font: 500 11px/1.4 'Montserrat', sans-serif; letter-spacing: .16em; text-transform: uppercase;
}
.aip-signup .aip-signup-note { font-size: 12px; margin: 0; color: var(--wp--preset--color--black); }
.aip-signup .aip-signup-msg { font-size: 13px; margin: 0; font-weight: 500; color: var(--wp--preset--color--black); }
.aip-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.5; color: var(--wp--preset--color--black); text-align: left; }
.aip-consent input { width: 16px; height: 16px; margin: 2px 0 0; flex: none; accent-color: #111; }
.aip-consent a { text-decoration: underline; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* ==========================================================================
   Header
   ========================================================================== */
.aip-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255,255,255,.82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--wp--preset--color--hairline);
}
.admin-bar .aip-header { top: 32px; }
.aip-nv {
	position: relative; max-width: 1160px; margin: 0 auto; padding: 12px 40px;
	display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.aip-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 !important; }
.aip-brand .aip-logo { width: 56px; height: 56px; margin: 0; flex: none; }
.aip-brand .aip-logo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; display: block; }
.aip-brand .aip-brandname { font-size: 18px; letter-spacing: .2em !important; margin: 0; }
.aip-nvb { display: none; padding: 8px; cursor: pointer; margin: 0; background: none; border: 0; border-radius: 2px; }
.aip-nvb span { display: block; width: 22px; height: 2px; background: #111; margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.aip-nvb:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.aip-nv.is-open .aip-nvb span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.aip-nv.is-open .aip-nvb span:nth-child(2) { opacity: 0; }
.aip-nv.is-open .aip-nvb span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.aip-nvl { margin: 0 !important; }
.aip-nvl .wp-block-navigation__container { gap: 30px; justify-content: center; flex-wrap: wrap; }
.aip-nvl .wp-block-navigation-item__content {
	font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; padding-bottom: 4px !important;
	border-bottom: 2px solid transparent;
}
.aip-nvl .current-menu-item > .wp-block-navigation-item__content,
.aip-nvl .wp-block-navigation-item__content:hover { border-bottom-color: #111; }
.aip-nva {
	position: absolute; right: 40px; top: 22px; display: flex; gap: 16px !important; align-items: center; margin: 0 !important;
}
.aip-nva p { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.aip-nva .wp-block-buttons { margin: 0; }
.aip-nva .wp-block-button__link { padding: 10px 20px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.aip-footer { border-top: 1px solid var(--wp--preset--color--hairline); margin-top: 80px; }
.aip-footer-in {
	max-width: 1160px; margin: 0 auto; padding: 36px 40px;
	display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; font-size: 13px; color: var(--wp--preset--color--grey);
}
.aip-footer-in > * { margin: 0 !important; }
.aip-footer-brand { display: flex; gap: 12px !important; align-items: center; }
.aip-footer-brand .aip-logo { width: 32px; height: 32px; margin: 0; }
.aip-footer-brand .aip-logo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.aip-footer-brand p { margin: 0; }
.aip-footer-links .wp-block-navigation__container { gap: 14px 24px; flex-wrap: wrap; }
.aip-footer-links .wp-block-navigation-item__content { font-size: 13px; }

/* ==========================================================================
   Responsive – handoff: ≤900px collapse menu + 4R two by two; ≤600px phone rules
   ========================================================================== */
@media (max-width: 900px) {
	.aip-nv { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; gap: 0; }
	.aip-brand { flex-direction: row; gap: 10px; }
	.aip-brand .aip-logo { width: 36px; height: 36px; }
	.aip-brand .aip-brandname { font-size: 14px; }
	.aip-nvb { display: block; }
	.aip-nv > .aip-nvl, .aip-nv > .aip-nva { display: none !important; width: 100%; }
	.aip-nv.is-open > .aip-nvl, html:not(.aip-js) .aip-nv > .aip-nvl { display: block !important; padding: 16px 0 8px; }
	.aip-nv.is-open > .aip-nvl .wp-block-navigation__container, html:not(.aip-js) .aip-nvl .wp-block-navigation__container { display: flex !important; flex-direction: column; align-items: center; gap: 16px; }
	.aip-nv.is-open > .aip-nva, html:not(.aip-js) .aip-nv > .aip-nva { display: flex !important; position: static; flex-direction: column; gap: 12px !important; padding: 8px 0 12px; }
	html:not(.aip-js) .aip-nvb { display: none; }
	.aip-r4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
	.aip-r4::before { display: none; }
	.aip-hero { flex-wrap: wrap !important; }
	.aip-hero > .wp-block-column { flex-basis: 100% !important; }
}
@media (max-width: 782px) { .admin-bar .aip-header { top: 46px; } }
@media (max-width: 600px) {
	.aip-nv, .aip-footer-in { padding-left: 20px; padding-right: 20px; }
	.aip-hero { padding-top: 32px; padding-bottom: 32px; gap: 28px; }
	.aip-hero-title { font-size: 38px !important; margin-top: 14px !important; margin-bottom: 16px !important; }
	.aip-section, .aip-section--80 { padding-top: 44px; padding-bottom: 44px; }
	.aip-photo--hero { height: 300px; }
	.aip-photo--230, .aip-cover { height: 200px; }
	.aip-card, .aip-card--offer { padding: 20px; }
	.aip-btnrow { flex-direction: column; align-items: stretch !important; }
	.aip-btnrow .wp-block-button { width: 100%; }
	.aip-btnrow .wp-block-button__link { width: 100%; text-align: center; padding-left: 18px; padding-right: 18px; }
	.aip-footer { margin-top: 48px; }
	/* Home, phone (board Mob-Home): The Daily Six as a compact two-column name grid. */
	.aip-d6 { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
	.aip-d6 > .aip-card { padding: 14px; background: #fff !important; border: 1px solid var(--wp--preset--color--hairline) !important; }
	.aip-d6 > .aip-card > .aip-lb, .aip-d6 > .aip-card > p:not(.aip-lb) { display: none; }
	.aip-d6 > .aip-card h3.aip-sf { font: 700 14px/1.3 'Montserrat', sans-serif !important; letter-spacing: 0 !important; text-transform: none !important; margin: 0 !important; color: #111; }
	/* Floating chat / language buttons must not cover the last footer links or form buttons. */
	.aip-footer { padding-bottom: 76px; }
}

/* ==========================================================================
   Shared UI added in the fix round (forms, notices, section patterns)
   ========================================================================== */
/* Form messages: shown only on the form that was sent */
.aip-signup-msg.is-error, .aip-signup .aip-signup-msg.is-error { font-weight: 600; color: #111; padding-left: 10px; border-left: 3px solid #111; }
.aip-signup-msg.is-ok { font-weight: 500; color: #111; }
.aip-signup [aria-invalid="true"] { outline: 2px solid #111; outline-offset: 1px; }

/* Small status message (e.g. after unsubscribing) */
.aip-toast {
	position: fixed; left: 50%; top: 96px; transform: translateX(-50%); z-index: 100; width: min(560px, calc(100vw - 32px));
	display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--wp--preset--color--hairline);
	box-shadow: 0 10px 30px rgba(17, 17, 17, .12); padding: 16px 18px; border-radius: 2px;
}
.aip-toast p { margin: 0; font-size: 14px; color: #111; flex: 1; }
.aip-toast button { background: none; border: 0; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; color: #111; }

/* Section patterns (inserter → AIP Wellness) */
.aip-faq-list { display: grid; gap: 14px; max-width: 820px; }
.aip-faq-list > * { margin: 0 !important; }
.aip-faq-q > * { margin: 0; }
.aip-faq-q p.aip-faq-qt { margin-bottom: 8px; color: #111; }
.aip-cta-band > * { max-width: 720px; }
.aip-cta-band h2 { margin: 12px 0 !important; }

/* Login page: "Not a member yet?" */
.aip-login-join { margin: 24px 0 0; font-size: 14px; text-align: center; }
.aip-login-join a { font-weight: 600; color: #111; text-decoration: underline; }
p.is-style-lead { font-size: 19px; line-height: 1.6; font-weight: 300; color: #111; }
/* Outline buttons printed by PHP (shop, paywall …): same look as the core/button "Outline" style, also when no
   button block is on the page (block styles are only loaded for blocks that render). */
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--wp--preset--color--black); border: 1px solid var(--wp--preset--color--black); padding: 14px 30px; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
/* GTranslate switcher moved into the public footer (public-ui.php) */
.aip-gt-in-footer { position: relative; }
.aip-gt-in-footer #gt_float_wrapper { position: static !important; }
.aip-gt-in-footer .gt_float_switcher { box-shadow: none !important; border: 1px solid var(--wp--preset--color--hairline); border-radius: 2px !important; font-size: 13px !important; }
.aip-gt-in-footer .gt_float_switcher .gt_options { position: absolute; bottom: 100%; left: 0; background: #fff; box-shadow: 0 10px 30px rgba(17,17,17,.12); max-height: 320px; overflow-y: auto; }

/* Pre-launch audit: bigger tap targets on phones (footer links, consent / remember-me checkboxes). */
@media (max-width: 900px) {
	.aip-footer a { display: inline-block; padding: 10px 0; }
}
input[type="checkbox"] { width: 18px; height: 18px; accent-color: #111; }
