/*
Theme Name: PGC Garden
Theme URI: https://piscataquagardenclub.org
Author: Piscataqua Garden Club
Description: Block theme for the Piscataqua Garden Club, built on the club's 2026 brand kit: logo green, dark blue, light green and sand, with EB Garamond headings and Source Sans text. Pair with the PGC Tools plugin for the calendar, forms and photo credits.
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pgc-garden
*/

/* ---------- Basics ---------- */
:root { --pgc-shadow: 0 1px 2px rgba(19,50,74,.06), 0 8px 24px -12px rgba(19,50,74,.18); }
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { text-wrap: balance; }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--wp--preset--color--dark-green); outline-offset: 3px; }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--wp--preset--color--deep-green); border: 1.5px solid var(--wp--preset--color--dark-green); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--light-green); color: var(--wp--preset--color--deep-green); }
.wp-block-list li + li { margin-top: .35em; }

/* Text styles editors can pick */
.is-style-pgc-script { font-family: var(--wp--preset--font-family--script) !important; font-weight: 600; color: var(--wp--preset--color--deep-green); font-size: 2.1rem !important; line-height: 1.1; }
.is-style-pgc-eyebrow, .pgc-eyebrow { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--wp--preset--color--deep-green); margin-bottom: -.5rem; }
.is-style-pgc-box, .pgc-box { background: var(--wp--preset--color--card); border: 1px solid var(--wp--preset--color--line); border-radius: 12px; padding: 1.25rem 1.4rem; }
.pgc-box > * { margin-block: 0; }
.pgc-box > * + * { margin-top: .75rem; }
.pgc-lead { font-size: 1.2rem; color: var(--wp--preset--color--muted); }
.pgc-statement { font-family: var(--wp--preset--font-family--display); font-size: 1.5rem; line-height: 1.4; }
.pgc-small { font-size: .88rem; color: var(--wp--preset--color--muted); }

/* ---------- Header ---------- */
.pgc-header { border-bottom: 1px solid var(--wp--preset--color--line); padding-top: 1rem; padding-bottom: 1rem; }
.pgc-header__row { gap: .75rem 2rem; }
.pgc-brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--wp--preset--color--dark-blue); }
.pgc-brand:hover { text-decoration: none; }
.pgc-brand__logo { width: 72px; height: auto; }
.pgc-brand__name { font-family: var(--wp--preset--font-family--display); font-size: 1.45rem; line-height: 1.05; letter-spacing: .06em; text-transform: uppercase; }
.pgc-brand__name small { display: block; font-family: var(--wp--preset--font-family--body); font-size: .7rem; font-weight: 600; letter-spacing: .32em; color: var(--wp--preset--color--muted); margin-top: .35rem; }
.pgc-nav .wp-block-navigation__container { gap: .25rem; }
.pgc-nav .wp-block-navigation-item__content { padding: .5rem .85rem !important; border-radius: 999px; color: var(--wp--preset--color--dark-blue); text-decoration: none; }
.pgc-nav .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--sand-dark); text-decoration: none; }
.pgc-nav .current-menu-item > .wp-block-navigation-item__content,
.pgc-nav .wp-block-navigation-item__content[aria-current="page"] { background: var(--wp--preset--color--dark-green); color: #fff; }
.pgc-nav .wp-block-navigation-submenu > .wp-block-navigation-item__content { padding-right: .4rem !important; }
.pgc-nav .wp-block-navigation__submenu-icon { margin-right: .4rem; }
.pgc-nav .wp-block-navigation__submenu-container { background: var(--wp--preset--color--card) !important; border: 1px solid var(--wp--preset--color--line) !important; border-radius: 12px; box-shadow: var(--pgc-shadow); padding: .4rem !important; min-width: 15rem !important; }
.pgc-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { border-radius: 8px; padding: .55rem .75rem !important; }
.pgc-nav .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content { background: var(--wp--preset--color--light-green); color: var(--wp--preset--color--dark-blue); }
.pgc-nav__members > .wp-block-navigation-item__content::before { content: ""; display: inline-block; width: .7em; height: .8em; margin-right: .4em; vertical-align: -.05em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18'%3E%3Cpath d='M3 8V5a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1zm2 0h6V5a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18'%3E%3Cpath d='M3 8V5a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1zm2 0h6V5a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center / contain no-repeat; }
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--sand) !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { border: 0 !important; box-shadow: none; background: transparent !important; }
@media (max-width: 600px) { .pgc-brand__logo { width: 56px; } .pgc-brand__name { font-size: 1.2rem; } }

/* ---------- Reading width ----------
   Sections line up on one 1120px grid; running text stops at a comfortable
   line length but keeps the grid's left edge. */
:root { --pgc-measure: 760px; --pgc-left: max(0px, calc((100% - var(--wp--style--global--wide-size)) / 2)); }
.pgc-content > :is(p, ul, ol, h1, h2, h3, h4, blockquote),
.pgc-band > :is(p, ul, ol, h2, h3, h4),
.pgc-page-head > :is(p, .wp-block-post-title),
.pgc-content > .pgc-committees { max-width: var(--pgc-measure) !important; margin-left: var(--pgc-left) !important; margin-right: auto !important; }
.pgc-content > .wp-block-buttons, .pgc-band > .wp-block-buttons { margin-left: var(--pgc-left) !important; }
.pgc-content:has(> .pgc-band:last-child) { padding-bottom: 0 !important; }

/* ---------- Page heading ---------- */
.pgc-main { margin-top: 0; }
.pgc-page-head { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: .5rem; }
.pgc-page-head .wp-block-post-title { margin-top: .25rem; }
.pgc-crumb { display: inline-flex; gap: .35em; align-items: center; font-weight: 700; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--wp--preset--color--deep-green); }
.pgc-crumb::before { content: "‹"; font-size: 1.2em; line-height: 1; }
.pgc-content { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.pgc-main--home .pgc-content { padding-bottom: 0; }

/* ---------- Bands ---------- */
.pgc-band { padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4.5rem); margin-top: clamp(2rem, 5vw, 3.5rem) !important; }
.pgc-band + .pgc-band, .pgc-hero + .pgc-band { margin-top: 0 !important; }
.pgc-band--mint { background: var(--wp--preset--color--light-green); }
.pgc-band--sand { background: var(--wp--preset--color--sand-dark); }

/* ---------- Home: welcome ---------- */
.pgc-hero { padding-top: clamp(1rem, 3vw, 2rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.pgc-hero > .wp-block-image { margin-bottom: 0; }
.pgc-hero > .wp-block-image img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: center 70%; border-radius: 14px; display: block; }
.pgc-hero-card { position: relative; z-index: 3; margin: -3.5rem auto 0 !important; max-width: 820px !important; width: calc(100% - 2rem); background: var(--wp--preset--color--card); border-radius: 14px; box-shadow: var(--pgc-shadow); padding: clamp(1.25rem, 4vw, 2.25rem); }
.pgc-hero-card > * { margin-block: 0; }
.pgc-hero-card > * + * { margin-top: 1rem; }
.pgc-hero-card h1 em { color: var(--wp--preset--color--deep-green); }
.pgc-hero-card p:not(.pgc-eyebrow) { color: var(--wp--preset--color--muted); }
.pgc-hero-card .pgc-eyebrow { margin-bottom: 0; }
@media (max-width: 640px) { .pgc-hero > .wp-block-image img { aspect-ratio: 4 / 3; } .pgc-hero-card { margin: -2rem .5rem 0 !important; } }

/* ---------- Home: next up ---------- */
.pgc-next-band { position: relative; overflow: hidden; }
.pgc-next-band::after { content: ""; position: absolute; right: -60px; top: -30px; width: 520px; height: 230px; opacity: .55; pointer-events: none; background: url("assets/images/floral-swag-mint.png") center / contain no-repeat; }
.pgc-next-band > * { position: relative; z-index: 1; }

/* ---------- Doors (four cards) ---------- */
.pgc-doors { gap: 1rem !important; }
.pgc-door { background: var(--wp--preset--color--card); border: 1px solid var(--wp--preset--color--line); border-radius: 12px; padding: 1.4rem 1.25rem; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.pgc-door:hover { transform: translateY(-2px); border-color: var(--wp--preset--color--dark-green); }
.pgc-door > * { margin-block: 0; }
.pgc-door > * + * { margin-top: .5rem; }
.pgc-door .wp-block-image img { height: 46px; width: auto; }
.pgc-door h3 { font-size: 1.45rem; }
.pgc-door p { color: var(--wp--preset--color--muted); font-size: .97rem; }
.pgc-door .pgc-more { margin-top: auto; padding-top: .5rem; font-weight: 600; font-size: .92rem; }
.pgc-door .pgc-more a { text-decoration: none; }
.pgc-affil { color: var(--wp--preset--color--muted); font-size: .95rem; }
@media (min-width: 782px) and (max-width: 1000px) { .pgc-doors { flex-wrap: wrap !important; } .pgc-doors > .pgc-door { flex-basis: calc(50% - .5rem) !important; } }
@media (prefers-reduced-motion: reduce) { .pgc-door { transition: none; } .pgc-door:hover { transform: none; } }

/* ---------- Split (text + illustration) ---------- */
.pgc-split { align-items: center !important; gap: clamp(1.5rem, 5vw, 4rem) !important; }
.pgc-illo { display: flex; justify-content: center; }
.pgc-illo img { max-width: min(420px, 100%); height: auto; }

/* ---------- Committees ---------- */
.pgc-committees { display: grid; gap: 1px; background: var(--wp--preset--color--line); border: 1px solid var(--wp--preset--color--line); border-radius: 14px; overflow: hidden; margin-top: 2rem !important; }
.pgc-committee { display: grid; grid-template-columns: 72px 1fr; column-gap: 1.5rem; background: var(--wp--preset--color--card); padding: clamp(1.25rem, 3vw, 2rem); margin: 0 !important; }
.pgc-committee > * { grid-column: 2; margin-block: 0; }
.pgc-committee > * + * { margin-top: .75rem; }
.pgc-committee > .wp-block-image { grid-column: 1; grid-row: 1 / span 5; margin: 0; }
.pgc-committee > .wp-block-image img { width: 56px; height: auto; }
.pgc-committee__title { font-size: var(--wp--preset--font-size--x-large); scroll-margin-top: 1.5rem; }
.pgc-pills { font-size: .82rem; font-weight: 600; color: var(--wp--preset--color--dark-blue); }
@media (max-width: 540px) { .pgc-committee { grid-template-columns: 1fr; } .pgc-committee > * { grid-column: 1; } .pgc-committee > .wp-block-image { grid-row: auto; margin-bottom: .75rem; } }

/* ---------- Calendar page ---------- */
.pgc-calendar-wrap { max-width: var(--wp--style--global--wide-size) !important; margin-top: 1.5rem !important; }

/* ---------- Members Only gate ---------- */
.pgc-gate { max-width: 460px; margin: 1.5rem auto 0; background: var(--wp--preset--color--card); border: 1px solid var(--wp--preset--color--line); border-radius: 14px; padding: clamp(1.5rem, 4vw, 2.25rem); text-align: center; }
.pgc-gate__logo { width: 84px; height: auto; margin: 0 auto; display: block; }
.pgc-gate__lead { color: var(--wp--preset--color--muted); }
.pgc-gate form { display: grid; gap: .6rem; text-align: left; }
.pgc-gate label { font-weight: 600; font-size: .92rem; }
.pgc-gate input { font: inherit; padding: .7rem .85rem; border-radius: 8px; border: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--sand); color: var(--wp--preset--color--dark-blue); }
.pgc-gate .wp-block-button, .pgc-gate .wp-block-button__link { width: 100%; }
.pgc-gate button { cursor: pointer; border: 0; }
.pgc-gate__hint { font-size: .85rem; color: var(--wp--preset--color--muted); }

/* ---------- Footer ---------- */
.pgc-footer { background: var(--wp--preset--color--dark-blue); color: #f5f4f1; padding-top: 2.75rem; padding-bottom: 2rem; margin-top: 0 !important; font-size: .95rem; }
.pgc-footer a { color: inherit; }
.pgc-footer__brand { display: flex; gap: 1rem; align-items: center; }
.pgc-footer__brand img { width: 64px; height: auto; flex: none; }
.pgc-footer__brand p { font-family: var(--wp--preset--font-family--display); font-size: 1.15rem; line-height: 1.35; margin: 0; }
.pgc-footer__h { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; opacity: .75; margin-bottom: .4rem; }
.pgc-footer__h + p { margin-top: 0; }
.pgc-footer__legal { margin-top: 2rem !important; padding-top: 1.25rem; border-top: 1px solid rgba(245,244,241,.2); font-size: .82rem; opacity: .75; }
.pgc-footer .wp-block-columns { gap: 2rem; }

/* ---------- Media inside content ---------- */
.wp-block-image img { border-radius: 10px; }
.pgc-door .wp-block-image img, .pgc-committee .wp-block-image img, .pgc-illo img { border-radius: 0; }
