/*
Theme Name: BFJ Boilerplate
Theme URI: https://bfj.digital
Description: BFJ Digital's boilerplate theme. Renders the pages, header, footer and design system generated by the Baby Shark plugin, and keeps working without it — every generated template, stylesheet and ACF field group lives in this theme.
Version: 2.6.0
Author: BFJ Digital
Requires at least: 6.0
Requires PHP: 7.4
Author URI: https://bfj.digital
Text Domain: bfj-boilerplate
*/

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: 1.5; color: #111; background: #fff; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.ff-rich ul { list-style: disc; padding-left: 1.25em; }
.ff-rich ol { list-style: decimal; padding-left: 1.25em; }
.ff-rich p + p, .ff-rich p + ul, .ff-rich p + ol, .ff-rich ul + p, .ff-rich ol + p { margin-top: 1em; }
button { font: inherit; }

.ff-page { width: 100%; overflow-x: hidden; }
.ff-section { position: relative; width: 100%; margin: 0 auto; }
/* Figma breaks a word that is wider than its box instead of letting it overflow; this does the same. */
.ff-section, .ff-section * { overflow-wrap: break-word; }

/* ---- Accessibility ---- */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ff-skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 100000; width: auto; height: auto; margin: 0; padding: 12px 18px; clip: auto; overflow: visible; background: #fff; color: #111; font: 600 15px/1 system-ui, sans-serif; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.25); outline: 2px solid #111; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ---- Default content column (page.php, single.php, archives, search, 404): the design's width, gutters and fonts ---- */
.ff-content { width: 100%; padding: clamp(40px, 6vw, 96px) var(--gutter-x, 24px); font-family: var(--font-body, inherit); }
.ff-content__inner { max-width: min(var(--container-max, 1312px), 820px); margin: 0 auto; }
.ff-content--archive .ff-content__inner, .ff-content--search .ff-content__inner { max-width: var(--container-max, 1312px); }
.ff-content__meta { font-size: 14px; opacity: .7; margin-bottom: 12px; }
.ff-content__title { font-family: var(--font-heading, inherit); font-size: var(--t-h1-size, clamp(32px, 5vw, 56px)); line-height: 1.1; font-weight: var(--t-h1-weight, 700); margin-bottom: 24px; }
.ff-content__lead { font-size: 1.15em; opacity: .85; margin-bottom: 32px; max-width: 720px; }
.ff-content__header { margin-bottom: 40px; }
.ff-content__thumb { border-radius: 12px; margin-bottom: 32px; }
.ff-content__body { font-size: 1.05em; line-height: 1.65; }
.ff-content__body > * + * { margin-top: 1.2em; }
.ff-content__body h2, .ff-content__body h3, .ff-content__body h4 { font-family: var(--font-heading, inherit); line-height: 1.2; margin-top: 1.8em; }
.ff-content__body h2 { font-size: var(--t-h2-size, 2em); }
.ff-content__body h3 { font-size: var(--t-h3-size, 1.5em); }
.ff-content__body img { border-radius: 8px; }
.ff-content__body blockquote { margin: 1.5em 0; padding-left: 1.2em; border-left: 4px solid currentColor; font-style: italic; }
.ff-content__body a { color: inherit; text-decoration: underline; }
.ff-content__body .wp-block-image, .ff-content__body figure { margin-left: 0; margin-right: 0; }

/* Teaser cards (archives, search) */
.ff-teasers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.ff-teaser { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: rgba(0,0,0,.04); border: 1px solid rgba(0,0,0,.06); }
.ff-teaser__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.ff-teaser__body { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.ff-teaser__meta { font-size: 13px; opacity: .7; }
.ff-teaser__title { font-family: var(--font-heading, inherit); font-size: 1.35em; line-height: 1.25; }
.ff-teaser__title a { text-decoration: none; }
.ff-teaser__title a:hover { text-decoration: underline; }
.ff-teaser__excerpt { opacity: .85; }
.ff-teaser__more { margin-top: auto; font-weight: 600; color: inherit; }
.ff-pagination { margin-top: 48px; text-align: center; }
.ff-pagination .nav-links { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ff-pagination .page-numbers { display: inline-block; min-width: 40px; padding: 8px 12px; border-radius: 6px; text-decoration: none; background: rgba(0,0,0,.05); }
.ff-pagination .page-numbers.current { background: #111; color: #fff; }
.ff-search-form { display: flex; gap: 8px; max-width: 520px; margin-top: 24px; }
.ff-search-form__input { flex: 1; min-width: 0; padding: 12px 16px; font: inherit; border: 1px solid rgba(0,0,0,.25); border-radius: 6px; }
.ff-search-form__btn { padding: 12px 20px; font: inherit; font-weight: 600; border: 0; border-radius: 6px; background: #111; color: #fff; cursor: pointer; }
.ff-404 { text-align: center; }
.ff-404 .ff-content__lead, .ff-404 .ff-search-form { margin-left: auto; margin-right: auto; }

/* Core blocks the client adds between sections sit in the content column, not edge to edge */
.ff-main > :not(.ff-section):not(.ff-content):not(.alignfull):not(.alignwide):not(script):not(style) { max-width: var(--container-max, 1312px); margin-left: auto; margin-right: auto; padding-left: var(--gutter-x, 24px); padding-right: var(--gutter-x, 24px); }
.ff-main > p, .ff-main > ul, .ff-main > ol, .ff-main > h2, .ff-main > h3, .ff-main > figure, .ff-main > .wp-block-group, .ff-main > .wp-block-columns, .ff-main > .wp-block-image, .ff-main > .wp-block-buttons, .ff-main > .wp-block-embed, .ff-main > .wp-block-quote { margin-top: 24px; margin-bottom: 24px; }
.ff-main > .alignfull { width: 100%; max-width: none; }
.ff-main > .alignwide { max-width: var(--container-max, 1312px); margin-left: auto; margin-right: auto; }

/* ---- Phone-only carousels: lists the mobile design shows one card at a time get dots made by carousel.js ---- */
.ff-dots-auto { display: none; }
@media (max-width: 767px) {
	.ff-dots-auto { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
	.ff-dots-auto button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: var(--color-2, currentColor); opacity: .35; cursor: pointer; }
	.ff-dots-auto button[aria-current] { opacity: 1; background: var(--color-2, currentColor); }
	.ff-dots-auto:empty { display: none; }
}

/* ---- Reveal on scroll (data-ff-anim, chosen per section in the editor) ---- */
[data-ff-anim] { opacity: 0; transition: opacity .7s ease, transform .7s ease; will-change: opacity, transform; }
[data-ff-anim="up"] { transform: translateY(28px); }
[data-ff-anim="zoom"] { transform: scale(.96); }
[data-ff-anim].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-ff-anim] { opacity: 1; transform: none; transition: none; } }

/* ---- Tabs / forms (generated sections add the design's own styling on top) ---- */
[data-ff-tabs] > [role=tabpanel][hidden] { display: none; }
.ff-form .gform_wrapper .gform_validation_errors { border-radius: 8px; }
