/*
Theme Name: StoreLogic
Template: twentytwentyfive
Description: StoreLogic brand child theme of Twenty Twenty-Five. Marketing-site design system v3 — warm neutrals, light display type.
Version: 2.10.0
License: GPL v2 or later
Text Domain: storelogic-theme
*/

/*
 * Design tokens live in theme.json (editor presets) and are mirrored here
 * as --slg-* custom properties for the component library in
 * assets/css/slg-site.css. This file keeps only base polish; components
 * are all slg-* classes in slg-site.css.
 */

:root {
	/* The marketing site is a light-only design. Pin the scheme so native
	   controls (any injected search / form <select> popups) render light on
	   dark-mode devices, matching the site. */
	color-scheme: light;

	/* Palette v3.1 — neutrals measured off the reference site rather than
	 * guessed, which is what the previous pass got wrong: it painted the whole
	 * canvas warm, when the reference is a WHITE page using warm tones for
	 * bands, cards and hairlines. Names are kept because every component
	 * references them; read them as roles, not hues (-blue- is "accent",
	 * -slate- is "warm grey").
	 */
	--slg-blue-900: #12332c;   /* accent, deepest — pressed states */
	--slg-blue-800: #17453a;   /* accent, primary — buttons, links */
	--slg-blue-700: #1d5647;   /* accent, hover */
	--slg-blue-100: #dde5e1;   /* accent wash */
	--slg-blue-50: #eef2f0;    /* accent wash, faintest */
	--slg-ink: #302e2d;        /* headings and strong text */
	--slg-slate-600: #716f6c;  /* body copy */
	--slg-slate-400: #9a9793;  /* captions, muted marks */
	--slg-slate-200: #e4e0dc;  /* hairlines and card borders */
	--slg-slate-50: #f6f5f3;   /* the warm band — NOT the page */
	--slg-white: #ffffff;      /* the page */
	--slg-green-600: #3f7d5c;
	--slg-red-600: #a8452f;
	--slg-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

	/* Two radii do the work: 16px on cards and media, 4px on small chrome.
	   Buttons and chips are full pills. */
	--slg-radius-card: 16px;
	--slg-radius-browser: 16px;
	--slg-radius-btn: 999px;
	--slg-radius-sm: 4px;
	--slg-border: 1px solid var(--slg-slate-200);

	/* Cards are defined by a hairline and a fill, not a shadow. These stay
	   near-invisible so nothing floats. */
	--slg-shadow-card: none;
	--slg-shadow-browser: 0 1px 2px rgb(48 46 45 / 0.04), 0 24px 48px -32px rgb(48 46 45 / 0.18);
}



/* Links */
a {
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* Legacy site-title glyph (kept for templates still using site-title) */
.wp-block-site-title a {
	font-weight: 800;
	letter-spacing: -0.03em;
	text-decoration: none;
	color: var(--slg-ink);
	font-size: 1.4rem;
}

.wp-block-site-title a::before {
	content: "";
	display: inline-block;
	width: 0.9em;
	height: 0.9em;
	margin-right: 0.4em;
	vertical-align: -0.08em;
	background: linear-gradient(135deg, var(--slg-blue-800) 0%, #3b82f6 100%);
	border-radius: 3px;
	box-shadow: 3px -3px 0 -1px rgba(30, 64, 175, 0.35), 6px -6px 0 -2px rgba(30, 64, 175, 0.15);
}

.wp-block-navigation a {
	font-weight: 500;
	text-decoration: none;
}

.wp-block-navigation a:hover {
	color: var(--slg-blue-800);
}

/* Tables (pricing page polish until its phase-2 rebuild) */
.wp-block-table th {
	background: rgba(30, 64, 175, 0.05);
}

/* The embedded plugin inherits the brand accent */
.storelogic {
	--slg-accent: var(--slg-blue-800);
}

/*
Changelog
1.29.0 — SEO fundamentals: (1) KB article routes no longer emit core's second canonical pointing at /docs/ (remove_action rel_canonical on article routes) and og:url now reports the article URL via the new storelogic_meta_url filter — the duplicate canonical risked Google collapsing all 63 articles into the hub. (2) Demo sample documents + their category/tag archives are noindex,follow and removed from the sitemap (theme-only policy — customer sites keep their documents indexable). (3) /changelog/ gets its own meta description instead of the homepage default. inc/docs.php, functions.php.
1.26.3 — Changelog renderer: entity-encode literal square brackets in entry text. esc_html() leaves "[" and "]" alone, so a documented shortcode in a code span (`[storelogic_submit]`) survived into post content and the_content's do_shortcode() EXECUTED it — rendering a live submission form (and loading Turnstile) inside a release note, or a "please log in to submit" link for logged-out readers. Brackets are now encoded after markdown-link parsing, so [text](url) still works and everything left is inert. inc/changelog.php.
1.26.0 — SEO/entity: emit Organization + WebSite + SoftwareApplication JSON-LD as a single @graph (new inc/schema.php); no invented review markup, offers as an honest $0–$399 AggregateOffer. Analytics hardening: GA4 + PostHog now fire only on the production host (slg_is_production_host) so local/staging/clones don't pollute the property. functions.php, inc/schema.php.
1.24.3 — Homepage: add a bold "Coming from another document library plugin?" switch band (dark cta-band) after the AI section, linking to /switch/. New patterns/switch-band.php; referenced from the front page.
1.24.2 — Switch page: reframe the offer to assisted/done-with-you (heavy lifting on your own WordPress, files stay put, you stay in control) rather than done-for-you; reference the self-serve Documents → Migrate tool + /docs/migrate-from-another-plugin/; add "Do you need access?" / "Can I do it myself?" FAQs. patterns/switching.php.
1.24.1 — Pricing: add a "Moving from another document library plugin? We'll move it for you, free →" caption under the lede, linking to /switch/. patterns/pricing-table.php.
1.24.0 — Add a "Switch to StoreLogic" page (patterns/switching.php): the offer is free hands-on migration + matching the time left on the visitor's current plan (deliberately NO price discount — honest flat pricing is the brand pillar). New "tell us about your library" form ([storelogic_migration_form] shortcode) posting to slg-site/v1/migration-request, stored as a private Migration Requests CPT + emailed to the admin + mirrored to PostHog; honeypot + nonce + per-IP rate limit, no IP stored. Footer "Switch to us" link. functions.php, patterns/switching.php, slg-site.css, footer.
1.19.5 — Favicon: /favicon.ico served the WordPress logo (core's no-Site-Icon fallback) and Google indexed it — serve the StoreLogic mark instead. apple-touch-icon now a square 180 PNG, not the 1200x630 OG image.
1.19.3 — Features page: quiet monochrome integration logo (Zapier, Google Analytics, Elementor) on the cards that name those products; official brand paths, inline SVG.
1.19.2 — Features page: a line-icon chip on every feature card (Free/Pro brand blue, AI violet) for scannability; inline SVG, no external assets.
1.18.7 — Forward the plugin storelogic:ask event to PostHog (demo analytics; respects DNT).
1.18.6 — Remove "public beta" framing across the site (hero pill, CTA band, security page); fix the CTA demo count to 66.
1.18.5 — Add a "real, live answer" caption under the Ask box (home + demo), mirroring the library caption.
1.18.4 — Move the home-page Ask box directly under the hero library (mirrors the demo); revert the AI feature section to its illustrative card so there is one live Ask box per page.
1.18.3 — Ask this library is now a live chat box on the home page (AI feature section) and the demo page, with clickable example questions.
1.18.2 — Demo counts updated to 66 documents / 11 categories (added the AI sample set).
1.18.1 — Demo page: add an "Ask this library" AI section (storelogic_ask) with example questions mapped to the sample documents.
1.18.0 — Templates renamed for plugin 2.0.0 post-type prefix migration (single-storelogic_document, taxonomy-storelogic_category/_tag). Requires plugin >= 2.0.0.
1.17.24 — Housekeeping: inc/changelog.php header comment updated for the image-based deploy flow (deploy.sh retired). No functional changes.
1.17.23 — Pricing: "Download free" now opens the embedded Freemius overlay (plan 56543) like the paid buttons, instead of linking out to the hosted opt-in page. The old comment claiming the overlay can't do $0 opt-ins was a misdiagnosis — verified against production that it can. Hosted-page URL kept as the no-JS href fallback.
1.17.22 — Cloud storage improvements (plugin 1.9.0): new changelog entry + KB note in external-files (connected accounts are admin-only, credentials encrypted at rest, cloud files now show their size). KB rebuilt.
1.17.21 — Privacy: redact personal data from KB screenshots — the IP-address column in the Activity Log shot and the email column in the Leads shot. Visitor IPs and emails should not appear in docs, least of all a privacy-focused product's.
1.17.19 — Surface the Google Analytics 4 integration (Pro) and the lead webhook / Zapier connection on the features page, pricing table and KB; add GA4 + the analytics dashboard to the readme Pro list. Feature parity. KB rebuilt.
1.17.18 — Feature parity: surface two shipped features that were missing from customer-facing copy — the analytics dashboard (Pro) and the Elementor widget — on the features page, pricing table and KB. (Front-end submissions is deliberately excluded per the KB claims-ban, so it was left out.) KB rebuilt.
1.17.17 — Content accuracy + feature parity: fix the refund period to 30 days (hero, pricing FAQ; the pricing table already said 30); surface cloud storage (S3/Dropbox/Drive/OneDrive, Pro), automatic PDF thumbnails (Pro) and the Elementor widget (free) on the pricing table, features page and KB; remove the Memphis comparison from the footer; rebuild the /docs KB. Comparison-page copy fixes ship as WP content, not the theme.
1.17.16 — Footer: add a "Compare" column linking the 8 published comparison pages (previously orphaned — reachable only by direct URL / search). Widen the footer grid to 5 columns (1.5fr + 4×1fr). footer.html, slg-site.css.
1.17.15 — PostHog: route through a first-party managed reverse proxy (t.getstorelogic.com → PostHog Cloud EU) so ad-blockers don't block analytics — array.js, config and event ingestion all go through the one same-domain host. api_host/server-side capture point at the proxy; direct EU host stays as the filter fallback. functions.php.
1.17.14 — PostHog: fix events not reaching the project — the project is in the EU region but the host was set to US, so ingestion accepted events and silently dropped them. Point api_host (and the server-side capture) at https://eu.i.posthog.com. Keeps the cookieless persistence:'memory'; adds capture_pageview:true. functions.php.
1.17.12 — Add a feature-request form: an on-brand "Missing a feature?" section on the home and features pages (plus a footer link), posting to a public slg-site/v1 REST endpoint. Submissions are stored durably as a private Feature Requests CPT and mirrored to PostHog server-side (so Do-Not-Track visitors are still recorded); honeypot + nonce + per-IP rate limit; no IP stored. functions.php, patterns/feature-request.php, slg-site.css, footer.
1.17.11 — PostHog: privacy-harden the config — persistence:'memory' (no cookies, no local storage), respect_dnt (honour Do Not Track), session recording off. Keeps the site's "no third-party cookies" stance. functions.php.
1.17.10 — Add PostHog product analytics (front-end wp_head snippet, mirrors the GA4 block: skipped for logged-in admins). Project key set (US region); override or disable via the storelogic_posthog_api_key filter, region host via storelogic_posthog_host (EU is https://eu.i.posthog.com). functions.php.
1.17.7 — Add SEO output for imported content pages: emit each page's FAQPage JSON-LD (postmeta _slg_faq_schema) and feed its meta description (_slg_meta_description) into the theme's single description tag via the storelogic_meta_description filter (no duplicate tag). Inert until the content is imported. inc/content-meta.php.
1.17.6 — Customer changelog entry for plugin 1.2.17 (mobile table paging fix).
1.17.5 — Truth-in-advertising copy fixes (claims audit): remove the false "libraries over 500 documents switch to server-backed search and pagination" (that mode is unbuilt — rendering + paging are client-side, instant-search index covers up to ~500) across the /docs KB; correct the shortcode sort attribute (sort_by/sort_order) and column-key list (16 keys, content not "description"); align the WordPress minimum to 6.1; fix the demo counts to the real 61 documents / 10 categories (cta-band, trust-strip, demo-sandbox). KB rebuilt.
1.17.4 — Fix the mobile menu: the header's backdrop-filter made it the containing
        block for the menu's position:fixed overlay, so the open menu was trapped
        inside the 68px header bar (only the first link visible, close button
        off-screen). The frosted-glass effect now lives on a ::before layer.
        The hamburger is a proper 44px bordered button (was a bare 24px icon),
        the open overlay gets an explicit white background, and overlay links
        are tap-sized.
1.17.3 — Merge: fold in the theme 1.16.3 changelog-renderer fixes (same-day releases sort newest-version-first; wrapped bullet lines render as hanging list items) alongside the /docs knowledge base.
1.17.2 — Fix a memory-exhaustion 500 on /docs: inject the rendered HTML at the_content priority 99 (after wpautop/wptexturize/do_shortcode) so WP does not re-format the pre-built markup. See 1.17.0.
1.17.1 — Fix the /docs page rendering blank in block themes (post-content runs outside the loop) and make the docs layout full-width. See 1.17.0.
1.17.0 — Add the knowledge base at /docs: 58 KB articles (hand-written Markdown in docs/storelogic-kb/, rendered to HTML + index.json by ops/build-docs.sh) served through inc/docs.php on a single "docs" page with a collection sidebar, search, breadcrumbs, related links and TechArticle JSON-LD. Agent files llms.txt + llms-full.txt served from the site root. Footer link under Product.
1.16.3 — Changelog entry for plugin 1.2.16 (tidier admin menu). Renderer fixes: same-day releases now sort newest-version-first, and wrapped bullet lines render as list items instead of a dash-paragraph.
1.16.2 — Changelog is product-only: drop author bylines and remove commercial/company items (e.g. on-site checkout) from entries; add the "product changes only" and "no personal bylines" editorial rules.
1.16.1 — Link the changelog from the footer (Product column).
1.16.0 — Add the public product changelog at /changelog: hand-written Markdown entries in changelog/*.md, rendered reverse-chronologically by inc/changelog.php via the slg/changelog pattern. Linear-style feed; editorial rules in changelog/CONTRIBUTING.md; release process in docs/RELEASE.md.
1.15.7 — Checkout: route the free "Download free" button to Freemius' hosted opt-in page (email-gated). Freemius' embedded dialog can't initialise a $0 plan ("plugin_id must be configured"); Pro + AI stay on the verified embedded checkout.
1.15.6 — Checkout: Freemius configure() expects plugin_id, not product_id (fixes "plugin_id parameter is missing").
1.15.5 — Checkout fix: the Freemius checkout.min.js loader is jQuery-wrapped, so load jQuery as its dependency on /pricing (block themes omit it on the front end) — otherwise FS.Checkout never initialises.
1.15.4 — Wire the Freemius Checkout into the pricing page: Download free (opt-in), Buy Pro, Buy AI buttons; email-consent + support line; load checkout.min.js only on /pricing.
1.15.3 — Add Google Analytics 4 (gtag.js) via wp_head, filterable Measurement ID; skipped for logged-in admins so our own visits don't skew reports.
1.15.2 — Pin color-scheme:light on the site root so native controls (any
        injected search / form select popups) render light on dark-mode
        devices, matching this light-only marketing design.
1.14.3 — Pricing page: neobrutalist plan cards (dark border + hard shadow) to
        match the button language; the Pro plan pops with a blue border, hard
        blue shadow and a lift; accent word on the Get StoreLogic heading.
1.14.2 — Hero + section rhythm polish: larger, tighter hero headline with a
        blue accent word ("document library"); comfortable lede measure; tighter
        eyebrow-to-heading spacing.
1.14.1 — Spacing fixes: header + footer content was flush to the viewport edges
        (no side gutters) — now contained + padded; footer columns rebuilt as an
        even grid (no dead gap after the brand column); top nav sits beside the
        logo with the CTA pushed right.
1.14.0 — Design pass (reference: easymcpai.com, kept StoreLogic blue): bolder,
        tighter marketing headings; "neobrutalist" buttons (solid fill, dark
        border, hard offset shadow that presses on hover); tighter, better-spaced
        top nav with a styled CTA cluster; a rebuilt multi-column footer (brand
        column + tagline, uppercase column headings, clean bottom bar). Fixed the
        /features page: the `[storelogic]` example in copy was executing as a live
        shortcode (inflating a card), and the first feature card was rendering
        double-wide — both resolved (escaped shortcode + uniform slg-bento--even).
1.13.1 — Tailored meta description for the new /features page.
1.13.0 — New /features page (slg/features pattern): a full, honest overview of
        the toolkit grouped by tier — Free (no artificial limits), Pro (search
        inside documents, access & protection, lifecycle/workflow, insight &
        governance) and the opt-in AI tier. Header + footer "Features" nav now
        points at the dedicated page instead of the homepage anchor.
1.12.1 — Unique meta descriptions for the key landing pages (pricing,
        security, and the six /for-* persona pages), keyed by slug in the
        theme so pattern-composed pages still get tailored SEO/social text.
1.12.0 — Conversion + SEO pass: each /for-* persona page now embeds only its
        sector's documents (category= on the shortcode); added a per-page meta
        description, OpenGraph + Twitter-card tags with a branded 1200x630 OG
        image, and an SVG favicon (replaces the default WordPress mark).
1.11.0 — Trust/accuracy copy pass: file-protection story on homepage +
        /security rewritten to the real two-part model (tokenless
        access-checked streaming by default + optional signed 15-min share
        links); dropped false "free scales past 500 / indexed search" and
        "specific users" claims; doc count 56→58 / "nine categories"; AI
        mockup query changed to a safeguarding example the seed data answers;
        "download log" → "activity log & audit trail".
1.6.0 — Security page rewritten to describe the real protected-file mechanism
        (deny-all vault + access-checked streaming), replacing the earlier
        signed-token wording that the plugin didn't implement.
1.5.0 — Latest-features pass: surface full-text "search inside documents"
        (PDF/Office/text) and optional scanned-PDF OCR across the site —
        elevated bento card, hero chip, feature-modern bullet, Pro plan
        lists (pricing-table + plans-teaser), and a search/OCR pricing FAQ
        (with matching FAQPage JSON-LD) noting on-server extraction and the
        opt-in, process-and-discard OCR privacy posture.
1.4.0 — Conversion audit pass 2: admin walkthrough section (slg/admin-tour,
        five annotated stylized admin screens based on the real wp-admin
        UI); "How it works" 3-step section (slg/how-it-works); dedicated
        Security page (slg/security) with precise controls and honest
        limitations, no compliance claims; header adds Security + a
        Solutions submenu; six industry/audience pages rebuilt as real
        landing pages (schools/healthcare/law/construction + new
        local-government and agencies) with document-jobs grid, filtered
        demo, how-it-works and a vertical FAQ each; footer + homepage
        personas updated.
1.3.0 — Conversion audit pass 1: hero leads with the category ("WordPress
        document library plugin" eyebrow + new H1), "Your documents.
        Found in seconds." moves above the live embed as an outcome;
        honest pre-launch CTAs sitewide (no "Download free"/"Get Pro"
        until those flows exist); pricing plans renamed (Single Site /
        Agency / Network) with per-site economics, founding price
        guarantee card and licensing FAQs (+JSON-LD); custom
        single-slg_document template (no author byline, prev/next, or
        "More posts"); slg/demo-sandbox pattern — one tabbed guided
        demo replaces the stacked layout demos.
1.2.0 — Site-review punch list: wordmark SVG re-cropped to its artwork
        (was ~43% dead space) and sized 32px/28px; pricing-table +
        pricing-faq patterns (4 plan cards, renewals pillar line, FAQ
        with FAQPage JSON-LD, #get section so no dead button hrefs);
        industry links fixed to live /for-* slugs; footer prunes
        Docs/Blog/Contact until those pages exist; header drops Docs;
        footer Resources gains Live demo link.
1.1.0 — Marketing-site design system v3 — warm neutrals, light display type. theme.json tokens (palette, Inter
        variable self-hosted, spacing, 680/1120 layout), slg-* component
        library (browser card, chips, compare table, bento, log vignette,
        CTA band, persona cards), 10 "StoreLogic" block patterns for the
        homepage, new sticky header + 4-column footer parts with a
        swap-ready SVG wordmark slot, reveal-on-scroll JS.
1.0.1 — Initial brand child theme.
*/
