/*
Theme Name: Great Baddow
Description: A clear, easy-to-read village guide theme for greatbaddow.org.uk. Large text, big buttons, a village map and directory pages. Built to work with the Baddow Directory plugin.
Author: Jon Wade
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: greatbaddow
*/

/* Most styling lives in theme.json. These are the bits theme.json can't do. */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(a) { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:where(a:hover) { text-decoration-thickness: 2px; }
::selection { background: #f3d9b8; }
img { height: auto; }
*, *::before, *::after { box-sizing: border-box; }

/* Header */
.gb-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.gb-header .wp-block-site-tagline { margin: 0.3rem 0 0; font-size: 0.95rem; color: var(--wp--preset--color--muted); }
.gb-header .wp-block-navigation__responsive-container-open,
.gb-header .wp-block-navigation__responsive-container-close { padding: 0.5rem; }
.gb-header .wp-block-navigation__responsive-container-open svg { width: 32px; height: 32px; }
.gb-header .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--accent); }
.gb-header .wp-block-navigation .current-menu-item > a { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--wp--preset--color--accent); }
.gb-topstrip { font-size: 0.95rem; }
.gb-topstrip a { color: #fff; }

/* Search boxes: big and obvious */
.wp-block-search__input { min-height: 54px; padding: 0.6em 0.9em; font: inherit; border: 2px solid var(--wp--preset--color--line) !important; border-radius: 12px; background: var(--wp--preset--color--paper); }
.wp-block-search__input:focus { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 1px; }
.wp-block-search__button { min-height: 54px; margin-left: 0.5rem !important; border-radius: 12px !important; }
.wp-block-search__label { font-weight: 700; }
.gb-hero .wp-block-search__label { color: #fff; }
.gb-hero .wp-block-search__input { border-color: transparent !important; }
.gb-hero .wp-block-search__button { background: var(--wp--preset--color--accent); }
.gb-hero .wp-block-search__button:hover { background: #8a2b18; }

/* Hero */
.gb-hero { position: relative; overflow: hidden; }
.gb-hero::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 34rem; height: 34rem; border-radius: 50%; border: 60px solid rgba(255, 255, 255, 0.05); pointer-events: none; }
.gb-hero h1 { color: #fff; max-width: 18ch; }
.gb-hero p { color: #e4eee7; max-width: 38rem; }
.gb-kicker { font-size: 0.9rem !important; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #f2c9a0 !important; }

/* Quick links */
.gb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.gb-tile { display: flex; }
.gb-tile a { box-sizing: border-box; width: 100%; display: flex; flex-direction: column; height: 100%; min-height: 8.5rem; padding: 1.15rem 1.25rem 1.1rem; background: var(--wp--preset--color--paper); border: 1px solid var(--wp--preset--color--line); border-top: 6px solid var(--tile, var(--wp--preset--color--brand)); border-radius: 12px; color: var(--wp--preset--color--ink); text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.gb-tile a:hover, .gb-tile a:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(29, 33, 30, 0.1); }
.gb-tile__name { font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 1.35rem; line-height: 1.2; }
.gb-tile__desc { margin-top: 0.35rem; color: var(--wp--preset--color--muted); font-size: 1rem; line-height: 1.45; }
.gb-tile__n { margin-top: auto; padding-top: 0.6rem; font-size: 0.9rem; font-weight: 700; color: var(--tile, var(--wp--preset--color--brand)); }

/* Simple post lists from [baddow_posts] */
.gb-posts { list-style: none; margin: 0; padding: 0; }
.gb-posts li { padding: 0.9rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.gb-posts li:first-child { border-top: 1px solid var(--wp--preset--color--line); }
.gb-posts a { font-weight: 700; text-decoration: none; color: var(--wp--preset--color--ink); }
.gb-posts a:hover { text-decoration: underline; }
.gb-posts .gb-posts__meta { display: block; font-size: 0.95rem; color: var(--wp--preset--color--muted); }

/* Area pills */
.gb-areas { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; margin: 0; padding: 0; }
.gb-areas a { display: inline-block; padding: 0.55em 1.1em; border-radius: 999px; background: var(--wp--preset--color--paper); border: 2px solid var(--wp--preset--color--line); text-decoration: none; font-weight: 700; color: var(--wp--preset--color--ink); }
.gb-areas a:hover { border-color: var(--wp--preset--color--brand); }

/* Single posts */
.gb-single .wp-block-post-featured-image img { border-radius: 12px; max-height: 30rem; object-fit: cover; }
.gb-single .wp-block-post-content > * + h2 { margin-top: 2.25rem; }

/* Archive header */
.gb-archive-head .wp-block-term-description { color: var(--wp--preset--color--muted); max-width: 44rem; }

/* Comments ("Baddow Talk") */
.wp-block-comments { border-top: 1px solid var(--wp--preset--color--line); padding-top: 1.5rem; }
.wp-block-post-comments-form input:not([type="submit"]):not([type="checkbox"]), .wp-block-post-comments-form textarea { border: 2px solid var(--wp--preset--color--line); border-radius: 10px; padding: 0.6em 0.8em; font: inherit; background: var(--wp--preset--color--paper); }

/* Footer */
.gb-footer a { color: #fff; }
.gb-footer a:hover { color: #f2c9a0; }
.gb-footer p { color: #d6e2da; }
.gb-footer ul { list-style: none; padding: 0; margin: 0; }
.gb-footer li { margin: 0 0 0.5rem; }

/* Skip link and focus */
.skip-link.screen-reader-text:focus { background: var(--wp--preset--color--accent); color: #fff; padding: 1rem 1.5rem; z-index: 100000; }
:where(button, input, select, textarea, a):focus-visible { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 2px; }
