/*
 * Theme4me: "Bento" design style. A calm, current look: tiles in soft colours
 * on an off-white ground, big tight headings, thin borders, soft shadows and a
 * gentle fade-in. Every rule is scoped to body.t4m-bento. Colours come from the
 * theme tokens (--t4m-*), so a child palette recolours the whole style.
 *
 * Fonts: Gabarito and Onest (SIL Open Font License 1.1), self-hosted in ../fonts.
 */


/* 0. Ground and type ------------------------------------------------------------------ */
body.t4m-bento {
	--b-gap: var(--t4m-gap, 18px);
	--b-pad: clamp(22px, 2.6vw, 34px);
	--b-radius: clamp(20px, 2vw, 28px);
	--b-section: clamp(56px, 8vw, 112px);
	background: var(--t4m-bg);
	color: var(--t4m-ink);
	font-family: var(--t4m-font-body);
	font-size: 16.5px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
body.t4m-bento :is(h1, h2, h3, h4, .site-title) { font-family: var(--t4m-font-heading); font-weight: var(--t4m-heading-weight, 500); letter-spacing: -.025em; line-height: 1.08; }
:where(body.t4m-bento) h1 { font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.6rem); letter-spacing: -.035em; line-height: 1; }
:where(body.t4m-bento) h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); letter-spacing: -.03em; }
body.t4m-bento :focus-visible { outline: 3px solid color-mix(in srgb, var(--t4m-primary) 55%, transparent); outline-offset: 3px; border-radius: 8px; }
body.t4m-bento ::selection { background: var(--t4m-primary-soft); color: var(--t4m-ink); }
body.t4m-bento .t4m-container { max-width: calc(var(--t4m-container) + 48px); padding-inline: 24px; }

/* 1. Header: calm and sticky ------------------------------------------------------------ */
body.t4m-bento .t4m-topbar { background: transparent; color: var(--t4m-muted); font-size: .84rem; border-bottom: 1px solid var(--t4m-line); }
body.t4m-bento .t4m-topbar a { color: var(--t4m-muted); }
body.t4m-bento .t4m-topbar a:hover { color: var(--t4m-ink); }
/* The blur sits on a layer behind the header: a backdrop-filter on the header
   itself would make it the containing block of the fixed mobile menu drawer. */
body.t4m-bento .site-header { background: transparent; border-bottom: 1px solid transparent; transition: border-color .25s; }
body.t4m-bento .site-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: color-mix(in srgb, var(--t4m-bg) 86%, transparent);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	backdrop-filter: saturate(160%) blur(12px);
	transition: background-color .25s;
}
body.t4m-bento:not(.has-sticky-header) .site-header { position: relative; }
body.t4m-bento .site-header.is-scrolled { border-bottom-color: var(--t4m-line); box-shadow: none; }
body.t4m-bento .site-header.is-scrolled::before { background: color-mix(in srgb, var(--t4m-surface) 88%, transparent); }
body.t4m-bento .site-header__inner { min-height: 74px; }
body.t4m-bento .site-title { font-size: 1.35rem; }
body.t4m-bento .site-title__mark { border-radius: 12px; }
body.t4m-bento .main-navigation a { border-radius: 999px; padding: 9px 14px; font-weight: 500; color: var(--t4m-ink); }
body.t4m-bento .main-navigation a:hover,
body.t4m-bento .main-navigation .current-menu-item > a,
body.t4m-bento .main-navigation .current-menu-ancestor > a { background: var(--t4m-surface-alt); color: var(--t4m-ink); }
body.t4m-bento .main-navigation .sub-menu { border: 1px solid var(--t4m-line); border-radius: 18px; box-shadow: var(--t4m-shadow); padding: 8px; }
body.t4m-bento .main-navigation .sub-menu a { border-radius: 10px; }
body.t4m-bento .main-navigation .sub-menu a:hover { background: var(--t4m-primary-soft); }
body.t4m-bento .menu-toggle { border-radius: 999px; border: 1px solid var(--t4m-line); background: var(--t4m-surface); }
@media (max-width: 980px) {
	/* Minimal on small screens; the drawer opens right under the header. */
	body.t4m-bento .t4m-topbar { display: none; }
	body.t4m-bento .main-navigation { background: var(--t4m-surface); }
	body.t4m-bento .main-navigation a { border-radius: 0; padding: 16px 4px; }
	body.t4m-bento .main-navigation a:hover { background: transparent; }
}

/* 2. Page header ---------------------------------------------------------------------- */
body.t4m-bento .t4m-page-header { background: transparent; border: 0; padding: clamp(28px, 4vw, 56px) 0 clamp(20px, 3vw, 40px); }
body.t4m-bento .t4m-page-header .t4m-breadcrumbs { font-size: .85rem; color: var(--t4m-muted); }
body.t4m-bento .t4m-page-header__title { margin-top: 10px; }
body.t4m-bento .t4m-page-header__subtitle { font-size: clamp(1.05rem, .95rem + .4vw, 1.25rem); color: var(--t4m-muted); max-width: 640px; }

/* 3. Buttons: pills ---------------------------------------------------------------------- */
body.t4m-bento :is(.t4m-btn, .d4m-btn, .e4m-btn, .wp-block-button__link, .wp-element-button, button[type="submit"]:not(.b-search__go), input[type="submit"]) {
	border-radius: 999px; border: 1px solid var(--t4m-primary); background: var(--t4m-primary); color: var(--t4m-on-primary);
	font-family: var(--t4m-font-body); font-weight: 600; letter-spacing: 0; box-shadow: none;
	transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
body.t4m-bento :is(.t4m-btn, .d4m-btn, .e4m-btn, .wp-block-button__link, .wp-element-button, button[type="submit"]:not(.b-search__go), input[type="submit"]):hover { background: var(--t4m-primary-dark); border-color: var(--t4m-primary-dark); color: var(--t4m-on-primary); }
body.t4m-bento :is(.t4m-btn--outline, .t4m-btn--light, .d4m-btn--outline, .e4m-btn--outline, .is-style-outline > .wp-block-button__link) { background: var(--t4m-surface); color: var(--t4m-ink); border-color: var(--t4m-line); }
body.t4m-bento :is(.t4m-btn--outline, .t4m-btn--light, .d4m-btn--outline, .e4m-btn--outline, .is-style-outline > .wp-block-button__link):hover { background: var(--t4m-surface-alt); color: var(--t4m-ink); border-color: var(--t4m-line); }

/* 4. Surfaces: white tiles with thin borders --------------------------------------------- */
body.t4m-bento :is(.t4m-card, .d4m-card, .e4m-card, .d4m-box, .e4m-box, .d4m-filter-form, .comment-respond, .d4m-cat, .e4m-month, .t4m-sidebar .widget, .d4m-toolbar, .e4m-bar) {
	background: var(--t4m-surface); border: 1px solid var(--t4m-line); border-radius: var(--b-radius); box-shadow: none;
}
body.t4m-bento :is(.t4m-card, .d4m-card, .e4m-card, .d4m-cat) { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
body.t4m-bento :is(.t4m-card, .d4m-card, .e4m-card, .d4m-cat):hover { transform: translateY(-3px); box-shadow: var(--t4m-shadow); border-color: color-mix(in srgb, var(--t4m-primary) 22%, var(--t4m-line)); }
body.t4m-bento :is(.t4m-card, .d4m-card) { padding: 6px; }
body.t4m-bento :is(.t4m-card__media, .d4m-card__media) { border-radius: calc(var(--b-radius) - 6px); overflow: hidden; }
body.t4m-bento :is(.t4m-card__title, .d4m-card__title, .e4m-card__title) { font-family: var(--t4m-font-heading); font-weight: 500; letter-spacing: -.015em; }
body.t4m-bento .d4m-subnav { background: color-mix(in srgb, var(--t4m-bg) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--t4m-line); }
body.t4m-bento .d4m-related { background: transparent; }
body.t4m-bento :is(.d4m-profile__media img, .t4m-single .post-thumbnail img) { border-radius: var(--b-radius); }

/* Chips, tabs and view toggles: pills; the selected one is filled. */
body.t4m-bento :is(.t4m-chip, .d4m-tags li, .d4m-filter-tabs button, .d4m-view-toggle a, .e4m-cats a, .d4m-search__tabs button, .e4m-views a) {
	border-radius: 999px; border: 1px solid var(--t4m-line); background: var(--t4m-surface); color: var(--t4m-ink);
}
body.t4m-bento :is(.d4m-filter-tabs button[aria-selected="true"], .d4m-view-toggle a[aria-current], .e4m-cats a[aria-current], .d4m-search__tabs button[aria-selected="true"], .e4m-views a[aria-current], a.t4m-chip:hover) {
	background: var(--t4m-ink); border-color: var(--t4m-ink); color: var(--t4m-surface);
}

/* 5. Fields ------------------------------------------------------------------------------ */
body.t4m-bento :is(input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="password"], input[type="search"], input[type="number"], input[type="date"], input[type="time"], select, textarea) {
	min-height: 48px; border: 1px solid var(--t4m-line); border-radius: 14px; background-color: var(--t4m-surface); color: var(--t4m-ink); box-shadow: none;
}
body.t4m-bento :is(input, select, textarea):focus { border-color: var(--t4m-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--t4m-primary) 16%, transparent); outline: none; }
body.t4m-bento .d4m-search__fields { border-radius: 22px; border: 1px solid var(--t4m-line); box-shadow: var(--t4m-shadow); }

/* 6. Footer: an inset dark panel ---------------------------------------------------------- */
body.t4m-bento .site-footer { margin: var(--b-section) 12px 12px; border-radius: calc(var(--b-radius) + 8px); overflow: hidden; background: var(--t4m-dark); }
body.t4m-bento .site-footer .footer-title { font-family: var(--t4m-font-heading); font-weight: 500; letter-spacing: -.01em; }
/* Headings default to ink; on the dark footer they are white. */
body.t4m-bento .site-footer :is(h2, h3, h4, .site-title, .footer-title, .widget-title) { color: #fff; }
body.t4m-bento .site-footer__bottom { border-top: 1px solid color-mix(in srgb, var(--t4m-on-dark) 18%, transparent); }

/* 7. Bento kit (used by full Bento pages) ------------------------------------------------------ */
body.t4m-bento .b-wrap { max-width: calc(var(--t4m-container) + 48px); margin: 0 auto; padding-inline: 24px; }
body.t4m-bento .b-section { padding-block: calc(var(--b-section) / 2); }
body.t4m-bento .b-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: clamp(20px, 2.6vw, 32px); }
body.t4m-bento .b-head h2 { margin: 0; max-width: 720px; }
body.t4m-bento .b-head p { margin: 8px 0 0; color: var(--t4m-muted); max-width: 560px; }
body.t4m-bento .b-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--t4m-primary); }
body.t4m-bento .b-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--b-gap); }
body.t4m-bento .b-tile {
	position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
	padding: var(--b-pad); border-radius: var(--b-radius);
	background: var(--t4m-surface); border: 1px solid var(--t4m-line); color: var(--t4m-ink);
	overflow: hidden; text-decoration: none;
}
body.t4m-bento a.b-tile { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
body.t4m-bento a.b-tile:hover { transform: translateY(-3px); box-shadow: var(--t4m-shadow); color: var(--t4m-ink); }
body.t4m-bento .b-tile :is(h2, h3, p) { margin: 0; }
body.t4m-bento .b-tile h3 { font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem); letter-spacing: -.02em; }
body.t4m-bento .b-tile p { color: var(--t4m-muted); }
body.t4m-bento .b-tile.is-tint-1 { background: var(--t4m-tint-1, #e1f1ec); border-color: transparent; }
body.t4m-bento .b-tile.is-tint-2 { background: var(--t4m-tint-2, #e5eef9); border-color: transparent; }
body.t4m-bento .b-tile.is-tint-3 { background: var(--t4m-tint-3, #eee9fb); border-color: transparent; }
body.t4m-bento .b-tile.is-tint-4 { background: var(--t4m-tint-4, #fdeee6); border-color: transparent; }
body.t4m-bento .b-tile.is-tint-5 { background: var(--t4m-tint-5, #fbf3d6); border-color: transparent; }
body.t4m-bento .b-tile.is-dark { background: var(--t4m-dark); border-color: transparent; color: var(--t4m-surface); }
body.t4m-bento .b-tile.is-dark :is(h2, h3, .b-stat__num) { color: var(--t4m-surface); }
body.t4m-bento .b-tile.is-dark p { color: var(--t4m-on-dark); }
body.t4m-bento .b-tile.is-primary { background: var(--t4m-primary); border-color: transparent; color: var(--t4m-on-primary); }
body.t4m-bento .b-tile.is-primary :is(h2, h3, p, .b-stat__num) { color: var(--t4m-on-primary); }
body.t4m-bento .b-tile.is-media { padding: 0; border: 0; }

/* Tiles made in Elementor: a container with the classes "b-tile is-tint-1" ... */
body.t4m-bento .e-con.b-tile { --padding-top: var(--b-pad); --padding-right: var(--b-pad); --padding-bottom: var(--b-pad); --padding-left: var(--b-pad); }
body.t4m-bento .e-con.b-tile.is-media { --padding-top: 0; --padding-right: 0; --padding-bottom: 0; --padding-left: 0; min-height: 280px; }
body.t4m-bento .b-tile.is-media .elementor-widget-image { position: absolute; inset: 0; }
body.t4m-bento .b-tile.is-media .elementor-widget-image :is(.elementor-widget-container, a) { height: 100%; }
body.t4m-bento .b-tile.is-media .elementor-widget-image img { width: 100%; height: 100%; object-fit: cover; }
body.t4m-bento .b-tile .b-stat__num { display: block; }
body.t4m-bento .b-tile .elementor-widget-text-editor blockquote { margin: 0 0 14px; padding: 0; border: 0; background: none; box-shadow: none; }
body.t4m-bento .b-tile .elementor-widget-text-editor blockquote p { font-size: 1.08rem; line-height: 1.55; color: var(--t4m-ink); }
body.t4m-bento .b-tile.is-primary .b-steps { margin: 6px 0 0; padding-left: 1.2em; }
body.t4m-bento .elementor .elementor-heading-title { margin: 0; }
body.t4m-bento .elementor .b-kicker { margin: 0 0 4px; }
body.t4m-bento .b-tile .elementor-widget-text-editor p + :is(p, ol, ul) { margin-top: 12px; }
body.t4m-bento .b-tile .d4m-box { padding: 0; border: 0; background: none; box-shadow: none; }
/* Pages built with Elementor line up with the page title. */
body.t4m-bento .t4m-full > .entry-content > .elementor { max-width: calc(var(--t4m-container) + 48px); padding-inline: 24px; }
body.t4m-bento .t4m-full .elementor .b-section { padding-block: 0 20px; }
body.t4m-bento .t4m-full .elementor .b-wrap { max-width: none; padding-inline: 0; }
body.t4m-bento .b-tile__img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.t4m-bento .b-tile__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.t4m-bento .b-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--t4m-surface) 70%, transparent); color: var(--t4m-ink); flex: none; }
body.t4m-bento .b-icon svg { width: 22px; height: 22px; }
body.t4m-bento .b-arrow { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--t4m-surface); color: var(--t4m-ink); border: 1px solid var(--t4m-line); flex: none; transition: transform .25s ease, background-color .25s ease; }
body.t4m-bento .b-arrow svg { width: 18px; height: 18px; }
body.t4m-bento a.b-tile:hover .b-arrow { transform: rotate(-45deg); background: var(--t4m-ink); color: var(--t4m-surface); }
body.t4m-bento .b-stat__num { font-family: var(--t4m-font-heading); font-weight: 500; font-size: clamp(2.6rem, 1.8rem + 2.4vw, 4rem); line-height: 1; letter-spacing: -.04em; color: var(--t4m-ink); }
body.t4m-bento .b-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--t4m-surface); border: 1px solid var(--t4m-line); color: var(--t4m-ink); font-size: .9rem; font-weight: 500; text-decoration: none; }
body.t4m-bento a.b-chip:hover { background: var(--t4m-ink); color: var(--t4m-surface); border-color: var(--t4m-ink); }
body.t4m-bento .b-chips { display: flex; flex-wrap: wrap; gap: 8px; }
body.t4m-bento .b-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 600; color: var(--t4m-ink); }
body.t4m-bento .b-badge svg { width: 16px; height: 16px; color: var(--t4m-primary); }
body.t4m-bento .b-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 10px 22px; border-radius: 999px; font-weight: 600; text-decoration: none; transition: background-color .2s, color .2s, border-color .2s; }
body.t4m-bento .b-btn__icon { width: 18px; height: 18px; transition: transform .25s ease; }
body.t4m-bento .b-btn:hover .b-btn__icon { transform: translateX(3px); }
body.t4m-bento .b-btn--primary { background: var(--t4m-primary); color: var(--t4m-on-primary); border: 1px solid var(--t4m-primary); }
body.t4m-bento .b-btn--primary:hover { background: var(--t4m-primary-dark); border-color: var(--t4m-primary-dark); color: var(--t4m-on-primary); }
body.t4m-bento .b-btn--ghost { background: transparent; color: var(--t4m-ink); border: 1px solid color-mix(in srgb, var(--t4m-ink) 22%, transparent); }
body.t4m-bento .b-btn--ghost:hover { background: var(--t4m-ink); color: var(--t4m-surface); }
body.t4m-bento .b-btn--light { background: var(--t4m-surface); color: var(--t4m-ink); border: 1px solid var(--t4m-surface); }
body.t4m-bento .b-btn--light:hover { background: var(--t4m-bg); color: var(--t4m-ink); }

/* Big search bar */
body.t4m-bento .b-search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .55fr) auto; gap: 6px; padding: 6px; border-radius: 20px; background: var(--t4m-surface); border: 1px solid var(--t4m-line); box-shadow: var(--t4m-shadow); }
body.t4m-bento .b-search label { display: grid; gap: 0; padding: 6px 14px; border-radius: 14px; min-width: 0; }
body.t4m-bento .b-search label + label { border-left: 1px solid var(--t4m-line); border-radius: 0; }
body.t4m-bento .b-search__label { font-size: .75rem; font-weight: 600; color: var(--t4m-muted); }
body.t4m-bento .b-search :is(input, select) { min-height: 30px; padding: 0; border: 0; background: transparent; font-size: 1.02rem; font-weight: 500; box-shadow: none; }
body.t4m-bento .b-search :is(input, select):focus { box-shadow: none; }
body.t4m-bento .b-search label:focus-within { background: var(--t4m-surface-alt); }
body.t4m-bento .b-search__go { display: inline-flex; align-items: center; gap: 8px; padding: 0 22px; min-height: 56px; border: 0; border-radius: 14px; background: var(--t4m-primary); color: var(--t4m-on-primary); font-weight: 600; cursor: pointer; }
body.t4m-bento .b-search__go:hover { background: var(--t4m-primary-dark); }
body.t4m-bento .b-search__go svg { width: 20px; height: 20px; }
@media (max-width: 719px) {
	body.t4m-bento .b-search { grid-template-columns: 1fr; }
	body.t4m-bento .b-search label + label { border-left: 0; border-top: 1px solid var(--t4m-line); }
	body.t4m-bento .b-search__go { justify-content: center; }
}

/* Questions */
body.t4m-bento .b-faq details { border-bottom: 1px solid var(--t4m-line); }
body.t4m-bento .b-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.05rem; }
body.t4m-bento .b-faq summary::-webkit-details-marker { display: none; }
body.t4m-bento .b-faq summary::after { content: "+"; display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--t4m-surface-alt); font-size: 1.2rem; transition: transform .25s ease, background-color .25s ease; }
body.t4m-bento .b-faq details[open] summary::after { transform: rotate(45deg); background: var(--t4m-primary-soft); }
body.t4m-bento .b-faq details p { margin: 0 0 18px; color: var(--t4m-muted); max-width: 640px; }

/* Gentle fade-in (assets/js/bento.js adds .is-in; nothing moves with "reduce motion") */
@media (prefers-reduced-motion: no-preference) {
	body.t4m-bento.b-js .b-reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--b-delay, 0s); }
	body.t4m-bento.b-js .b-reveal.is-in { opacity: 1; transform: none; }
}

/* 8. Plugins ----------------------------------------------------------------------------- */
body.t4m-bento .m4m-map { border-radius: var(--b-radius); border: 1px solid var(--t4m-line); }
body.t4m-bento .e4m-card__date { border-radius: 16px; background: var(--t4m-primary-soft); }
body.t4m-bento :is(.t4m-pagination, .d4m-pagination, .e4m-pagination) :is(a, span).page-numbers { border-radius: 999px; }
