/*
Theme Name: Basenji Field Guide
Description: A custom block theme scaffolded by Studio Code.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: basenji-field-guide
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts a margin-block-start equal to the block gap (24px unless
   theme.json sets styles.spacing.blockGap) between the template's top-level
   sections (header part, main, footer part) — a gap that exists even when no
   markup asks for it. Zero it so sections butt edge-to-edge and own their
   vertical rhythm via padding; this does not affect block gaps inside nested
   layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* With that gap gone, main carries its own vertical padding so templates this
   theme does not author (WooCommerce shop, product, cart…) still clear the
   header and footer. A descendant selector, not a child one: WooCommerce wraps
   the single-product main in an extra group. Templates built from full-bleed
   sections opt out with is-flush and let the sections own the rhythm. */
.wp-site-blocks main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}
.wp-site-blocks main.is-flush {
	padding-block: 0;
}

/* Full-bleed page sections own their rhythm; no inherited block gaps. */
.is-flush .wp-block-post-content > .alignfull + .alignfull { margin-block-start: 0; }

/* Editorial architecture */
body { -webkit-font-smoothing: antialiased; }
header.wp-block-template-part { position: sticky; top: 0; z-index: 30; }
.admin-bar header.wp-block-template-part { top: 32px; }
.site-header { position: relative; z-index: 20; border-bottom: 1px solid rgba(35,62,52,.16); }
.site-header .site-header-inner { min-height: 98px; gap: 2rem; }
.site-header .site-identity { gap: 0; flex-shrink: 0; align-items: flex-start; }
.site-header .wp-block-site-title { font-family: var(--wp--preset--font-family--dm-serif-display); font-size: 1.92rem; line-height: 1.12; letter-spacing: -.045em; margin: 0; }
.site-header .wp-block-site-title a { text-decoration: none; }
.site-header .site-identity-caption { margin: .28rem 0 0; font-size: .65rem; line-height: 1.3; font-weight: 600; letter-spacing: .125em; text-transform: uppercase; opacity: .76; }
.site-header .wp-block-navigation { font-size: .86rem; font-weight: 500; letter-spacing: .005em; text-transform: none; }
.site-header .wp-block-navigation__container { gap: clamp(.85rem, 2vw, 2rem); }
.site-header .wp-block-navigation-item__content { text-decoration: none; text-underline-offset: .52em; text-decoration-thickness: 1px; transition: color .2s ease, text-decoration-color .2s ease; }
.site-header .wp-block-navigation-item__content:hover, .site-header .wp-block-navigation-item__content:focus-visible, .site-header .wp-block-navigation-item__content[aria-current="page"] { color: var(--wp--preset--color--copper); text-decoration: underline; }
.site-header .wp-block-navigation-item__content:focus-visible, .site-header button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.home header.wp-block-template-part { margin-bottom: -98px; }
.home .site-header { position: relative; border: 0; background: transparent !important; color: white; padding-top: 12px; }
.home .site-header .site-header-inner { min-height: 86px; padding-inline: clamp(1rem, 2.2vw, 2rem); background: rgba(21,42,35,.94); border: 1px solid rgba(255,255,255,.2); border-radius: 6px; box-shadow: 0 8px 26px rgba(10,27,19,.14); }
.home .site-header .wp-block-site-title a, .home .site-header .wp-block-navigation-item__content { color: white; }
.home .site-header .wp-block-navigation-item__content:hover, .home .site-header .wp-block-navigation-item__content:focus-visible { color: #f3d9c9; }
.home .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: var(--wp--preset--color--dark); }
.home .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--copper); }
/* Reference-inspired segmented navigation, adapted to the quiet field-guide palette. */
@media (min-width: 900px) {
 .site-header .wp-block-navigation__container { gap: .15rem; padding: .3rem; background: var(--wp--preset--color--soft); border: 1px solid rgba(35,62,52,.1); border-radius: 6px; }
 .site-header .wp-block-navigation-item__content { padding: .52rem .68rem; border-radius: 3px; text-decoration: none !important; }
 .site-header .wp-block-navigation-item__content:hover, .site-header .wp-block-navigation-item__content:focus-visible, .site-header .wp-block-navigation-item__content[aria-current="page"] { background: var(--wp--preset--color--paper); color: var(--wp--preset--color--primary); }
 .home .site-header .wp-block-navigation__container { background: rgba(21,42,35,.58); border-color: rgba(255,255,255,.28); }
 .home .site-header .wp-block-navigation-item__content:hover, .home .site-header .wp-block-navigation-item__content:focus-visible { background: rgba(255,255,255,.16); color: white; }
}
/* An editorial hierarchy: generous headings, measured reading text and restrained labels. */
h1, h2, h3 { text-wrap: balance; }
.wp-site-blocks main:not(.is-flush) .wp-block-post-content > p { max-width: 70ch; }
.wp-block-post-template .wp-block-post-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.home-cover { min-height: 720px !important; padding-top: clamp(5rem, 9vw, 8rem) !important; }
.home-cover .wp-block-cover__image-background { object-position: 45% 45%; }
.home-cover .wp-block-cover__background { background: linear-gradient(90deg, rgba(10,27,19,.12), rgba(10,27,19,.28) 46%, rgba(10,27,19,.88)) !important; opacity: 1 !important; }
.home-cover .wp-block-cover__inner-container { max-width: 1240px; width: 100%; margin: auto; display: flex; justify-content: flex-end; }
.home-cover-copy { width: min(48%, 590px); margin: 0 0 0 auto !important; }
.home-cover-copy h1 { line-height: 1.02; margin: 1rem 0 1.3rem; }
.home-cover-copy > p:first-child { font-weight: 700; letter-spacing: .18em; }
.home-cover-copy > p:not(:first-child) { max-width: 42ch; }
.home-cover .wp-element-button { background: var(--wp--preset--color--paper); color: var(--wp--preset--color--primary); }
.editorial-band { padding-block: clamp(5rem, 10vw, 9rem); }
.editorial-band h2 { margin-top: .6rem; }
/* Longer topic introductions need clear pauses between reading sections. */
.page-template-page-no-title:not(.home) .editorial-band > h2:not(:first-child) { margin-top: clamp(2rem, 4vw, 2.75rem); }
.editorial-band .has-label-font-size { font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.intro-band .wp-block-columns { gap: clamp(2rem, 7vw, 8rem); }
.story-band .wp-block-columns { gap: clamp(3rem, 7vw, 8rem); }
.story-band figure { margin: 0; }
.story-band img { width: 100%; max-height: 580px; object-fit: cover; border-radius: 6px; }
.story-band a, .topics-band h3 a { text-decoration-thickness: 1px; text-underline-offset: .3em; }
.honesty-band > p, .honesty-band > h2 { max-width: 850px; }
.honesty-band .wp-block-buttons { margin-top: 2rem; }
.honesty-band .wp-element-button { border-color: var(--wp--preset--color--paper); color: var(--wp--preset--color--paper); }
.topic-row { margin-top: 3rem; gap: 5rem; }
.topic-row .wp-block-column { padding-top: 1.35rem; border-top: 1px solid var(--wp--preset--color--muted); }
.topic-row h3 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin: .45rem 0; }
.closing-band .wp-block-buttons { margin-top: 2rem; }
.site-footer { padding-block: 4.5rem 2rem; }
.site-footer a { color: var(--wp--preset--color--paper); }
.site-footer h2 { font-size: clamp(2rem, 3.5vw, 3.2rem); line-height: 1.13; }
.site-footer .wp-block-columns { gap: 4rem; }
.wp-site-blocks main:not(.is-flush) { min-height: 55vh; }
.wp-site-blocks main:not(.is-flush) .wp-block-post-title, .wp-site-blocks main:not(.is-flush) .wp-block-query-title { font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: 1.1; }
.wp-site-blocks main:not(.is-flush) .wp-block-post-content { line-height: 1.8; }
.wp-site-blocks main:not(.is-flush) .wp-block-post-content > p { margin-block: 1.2em; }
.wp-block-post-template { row-gap: 2.5rem; }
.wp-block-post-template > li { border-top: 1px solid var(--wp--preset--color--muted); padding-top: 1.3rem; }
.wp-block-post-template .wp-block-post-title { font-size: clamp(1.5rem, 2.4vw, 2.2rem) !important; }
.wp-block-post-template .wp-block-post-title a { text-decoration: none; }
@media (max-width: 782px) {
 .admin-bar header.wp-block-template-part { top: 46px; }
 .home header.wp-block-template-part { margin-bottom: -76px; }
 .home .site-header { padding-top: 8px; }
 .site-header .site-header-inner, .home .site-header .site-header-inner { min-height: 68px; }
 .home .site-header .site-header-inner { padding-inline: 12px; }
 .site-header .wp-block-site-title { font-size: 1.7rem; }
 .site-header .site-identity-caption { font-size: .55rem; margin-top: .13rem; }
 .site-header .wp-block-navigation__responsive-container-open { min-width: 48px; min-height: 48px; padding: 8px; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 2px; }
 .site-header .wp-block-navigation__responsive-container-open::before { content: 'Menü'; font-size: .78rem; font-weight: 600; letter-spacing: .02em; margin-right: .4rem; }
 .site-header .wp-block-navigation__responsive-container-open { gap: .1rem; }
 .site-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--background); color: var(--wp--preset--color--dark); padding: 2rem 1.5rem; }
 .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 4rem; }
 .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 0; width: 100%; align-items: stretch; }
 .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid rgba(35,62,52,.18); }
 .site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-family: var(--wp--preset--font-family--dm-serif-display); font-size: clamp(1.7rem, 7vw, 2.4rem); line-height: 1.2; padding: .8rem 0; }
 .site-header .wp-block-navigation__responsive-container-close { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
 .home-cover { min-height: 640px !important; padding-top: 5rem !important; align-items: flex-end; }
 .home-cover .wp-block-cover__image-background { object-position: 33% center; }
 .home-cover .wp-block-cover__background { background: linear-gradient(180deg,rgba(10,27,19,.4),rgba(10,27,19,.05) 22%,rgba(10,27,19,.12) 36%,rgba(10,27,19,.88) 100%) !important; }
 .home-cover .wp-block-cover__inner-container { display: block; }
 .home-cover-copy { width: 100%; margin: auto !important; padding-bottom: 2rem; }
 .home-cover-copy h1 { font-size: clamp(2.9rem, 10vw, 4.6rem) !important; }
 .editorial-band { padding-block: 4.5rem; }
 .topic-row { margin-top: 1.5rem; gap: 2rem; }
 .site-footer .wp-block-columns { gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
