/*
Theme Name: LeadCounter
Author: LeadCounter
Description: Marketing site and blog for LeadCounter. Manrope, teal and cream, with the LeadCounter chat assistant built in. Home page sections are editable block patterns.
Version: 1.9.1
Requires at least: 6.6
Tested up to: 7.1
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: leadcounter
Tags: block-patterns, full-site-editing, blog, one-column, custom-colors, editor-style
*/

:root {
	--lc-teal: var(--wp--preset--color--teal, #004B47);
	--lc-cream: var(--wp--preset--color--cream, #FFF9EF);
	--lc-orange: var(--wp--preset--color--orange, #FF6B24);
	--lc-amber: var(--wp--preset--color--amber, #FFB029);
	--lc-ink: var(--wp--preset--color--ink, #1D3331);
	--lc-muted: var(--wp--preset--color--muted, #5A6C69);
	--lc-line: var(--wp--preset--color--line, #EADFCB);
	--lc-soft: var(--wp--preset--color--teal-soft, #E3EEEC);
	--lc-radius: 16px;
}

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
a { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
:where(a, button, summary, input, textarea):focus-visible { outline: 2px solid var(--lc-teal); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--lc-amber); color: var(--lc-teal); }
.wp-site-blocks > * { margin-block-start: 0; }
/* Footer sits at the bottom of the window on short pages. */
.wp-site-blocks { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1 0 auto; }
.admin-bar .wp-site-blocks { min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px)); }

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: background-color .15s ease, color .15s ease, border-color .15s ease; text-decoration: none; }
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
	background: transparent; color: var(--lc-teal); border: 1.5px solid var(--lc-teal); padding: calc(0.9rem - 1.5px) calc(1.5rem - 1.5px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--lc-soft); }
.wp-block-button.lc-btn-teal > .wp-block-button__link { background: var(--lc-teal); color: var(--lc-cream); }
.wp-block-button.lc-btn-teal > .wp-block-button__link:hover { background: #003A37; color: var(--lc-cream); }

/* ---------- Header ---------- */
header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar header.wp-block-template-part { top: 0; } }
/* Solid background on purpose: a backdrop-filter here would trap the mobile menu overlay (position: fixed) inside the header. */
.lc-header { background: var(--lc-cream); border-bottom: 1px solid var(--lc-line); }
.lc-header__row { min-height: 4.5rem; gap: 1rem; }
.lc-header__nav { gap: 1.75rem; }
.lc-logo { margin: 0; flex: 0 0 auto; }
.lc-logo a { display: block; }
.lc-logo img { height: 38px; width: auto; display: block; }
.lc-header .wp-block-navigation a { text-decoration: none; }
.lc-header .wp-block-navigation .wp-block-navigation-item__content { color: var(--lc-teal); padding: .35rem 0; border-bottom: 2px solid transparent; }
.lc-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.lc-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content { border-bottom-color: var(--lc-orange); }
.lc-header .wp-block-button__link { padding: .65rem 1.1rem; font-size: 0.9375rem; }
.lc-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1.25rem; }
.lc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: .25rem; }
.lc-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.375rem; font-weight: 600; padding: .5rem 0; }
@media (max-width: 600px) {
	.lc-logo img { height: 32px; }
	.lc-header__nav { gap: .5rem; flex-direction: row-reverse; }
	.lc-header .wp-block-buttons { display: none; }
}

/* ---------- Sections ---------- */
.lc-section { padding-block: clamp(3.5rem, 8vw, 6.5rem); margin-block-start: 0 !important; }
.lc-section--white { background: #fff; border-block: 1px solid var(--lc-line); }
.lc-section--teal { background: var(--lc-teal); color: var(--lc-cream); }
.lc-section--teal :where(h1, h2, h3) { color: var(--lc-cream); }
.lc-section--teal a:not(.wp-block-button__link) { color: var(--lc-cream); }
.lc-eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--lc-teal); margin-bottom: .25rem; }
.lc-section--teal .lc-eyebrow { color: var(--lc-amber); }
.lc-lede { font-size: var(--wp--preset--font-size--large); line-height: 1.55; }
.wp-block-column .lc-lede { max-width: 34em; }
.lc-note { font-size: var(--wp--preset--font-size--small); color: var(--lc-muted); font-weight: 500; }
.lc-section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.lc-section-head > p:not(.lc-eyebrow) { color: var(--lc-muted); font-size: var(--wp--preset--font-size--large); line-height: 1.55; }
.lc-center { text-align: center; margin-inline: auto; }
.lc-center .wp-block-buttons { justify-content: center; }

/* ---------- Hero ---------- */
.lc-hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3.5rem, 8vw, 6rem); }
.lc-hero .wp-block-columns { align-items: center; gap: clamp(2rem, 5vw, 4rem); margin-bottom: 0; }
.lc-hero .wp-block-column:first-child { flex: 1 1 52%; }
.lc-hero .wp-block-column:last-child { flex: 1 1 48%; }
.lc-hero h1 { margin-bottom: 1.25rem; text-wrap: balance; }
.lc-hero .wp-block-buttons { margin-top: 1.75rem; gap: .75rem; }
.lc-hero .lc-note { margin-top: 1rem; }

/* Hero art: Tally stands beside the chat preview */
.lc-hero-art { position: relative; padding-left: clamp(7rem, 13vw, 10.5rem); }
.lc-hero-art > * { margin-block: 0; }
.lc-hero-tally { position: absolute; left: -1.5rem; bottom: -1.75rem; width: clamp(9rem, 15.5vw, 13rem); margin: 0; z-index: 2; pointer-events: none; }
.lc-hero-tally img { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 14px rgba(0, 75, 71, .18)); }

/* Chat illustration */
.lc-chat { background: #fff; border: 1px solid var(--lc-line); border-radius: 22px; box-shadow: 0 24px 60px -24px rgba(0, 75, 71, .28), 0 2px 6px rgba(0, 75, 71, .05); max-width: 26rem; margin-left: auto; overflow: hidden; }
.lc-chat > * { margin-block: 0; }
.lc-chat__head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.15rem; background: var(--lc-cream); border-bottom: 1px solid var(--lc-line); }
.lc-chat__head > * { margin: 0; }
.lc-chat__head .wp-block-image img { width: 40px; height: 40px; display: block; border-radius: 50%; border: 1px solid var(--lc-line); }
.lc-chat__head p { font-weight: 600; color: var(--lc-teal); font-size: 1.0625rem; }
.lc-chat__body { padding: 1.15rem 1.15rem 1.35rem; display: flex; flex-direction: column; gap: .8rem; }
.lc-chat__body > * { margin: 0; }
.lc-chat__body p { font-size: 0.9375rem; line-height: 1.5; }
.lc-chat__bot { max-width: 88%; }
.lc-chat__user { align-self: flex-end; max-width: 80%; background: var(--lc-soft); color: var(--lc-teal); padding: .6rem .9rem; border-radius: 16px 16px 4px 16px; font-weight: 500; }
.lc-chat__lead { display: flex; align-items: flex-start; gap: .6rem; background: #FFF4DC; border: 1px solid #F5D48A; border-radius: 12px; padding: .7rem .85rem; font-size: 0.875rem !important; color: var(--lc-ink); margin-top: .25rem !important; }
.lc-chat__lead::before { content: ""; flex: 0 0 auto; width: 10px; height: 18px; border-radius: 6px; background: var(--lc-amber); margin-top: .15rem; }
.lc-chat__lead strong { color: var(--lc-teal); font-weight: 600; }

/* ---------- Meet Tally ---------- */
.lc-section.lc-tally { padding-block: clamp(3rem, 6vw, 5rem); }
/* The scene fills its half of the row, so the picture and the words carry equal weight. */
.lc-tally .lc-tally-row { align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem); margin-bottom: 0; }
.lc-tally .lc-tally-row > .wp-block-column { flex: 1 1 0; min-width: 0; }
.lc-tally-img { margin: 0; }
.lc-tally-img img { width: 100%; max-width: 34rem; height: auto; display: block; margin-inline: auto; }
/* scene:start */
/* ---------- The Meet Tally scene: a 6-second loop made in Blender (website/animation/) ----------
   The video has a white background. The mask cuts it to the shape of the artwork, so the page colour shows around
   it and the edge of the video never shows. The poster is the first frame: it is what a visitor sees before the
   video plays, with no JavaScript, and when the visitor asks for reduced motion (assets/js/site.js). */
.lc-scene { position: relative; width: 100%; max-width: 34rem; margin-inline: auto; aspect-ratio: 1168 / 880; }
.lc-scene__video { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 0 !important; background: transparent;
	-webkit-mask: url(assets/img/scene/tally-loop-mask.png) center / 100% 100% no-repeat; mask: url(assets/img/scene/tally-loop-mask.png) center / 100% 100% no-repeat; }
/* scene:end */
.lc-callout { background: var(--lc-cream); border: 1px solid var(--lc-line); border-left: 5px solid var(--lc-amber); border-radius: 12px; padding: .9rem 1.1rem; max-width: 34em; }
.lc-callout strong { color: var(--lc-teal); font-weight: 600; }

/* ---------- Steps ---------- */
.lc-steps { gap: clamp(1.5rem, 3vw, 2.5rem); margin-bottom: 0; }
.lc-step > * { margin-block: 0; }
.lc-step__num { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 999px; background: var(--lc-orange); color: var(--lc-teal); font-weight: 700; font-size: 1.0625rem; margin-bottom: 1rem !important; }
.lc-step:nth-child(2) .lc-step__num { background: var(--lc-amber); }
.lc-step h3 { font-size: var(--wp--preset--font-size--x-large); letter-spacing: -0.015em; margin-bottom: .5rem; }
.lc-step p:not(.lc-step__num) { color: var(--lc-muted); }

/* ---------- Cards and grids ---------- */
.lc-grid { gap: 1.25rem; }
.lc-card { background: var(--lc-cream); border: 1px solid var(--lc-line); border-radius: var(--lc-radius); padding: 1.5rem; }
.lc-section:not(.lc-section--white) .lc-card { background: #fff; }
.lc-card > * { margin-block: 0; }
.lc-card h3 { margin-bottom: .45rem; }
.lc-card p { color: var(--lc-muted); font-size: 1rem; line-height: 1.6; }

/* ---------- Setup ---------- */
.lc-setup .wp-block-columns { gap: clamp(2rem, 5vw, 4.5rem); align-items: center; margin-bottom: 0; }
.lc-setup .wp-block-buttons { margin-top: 1.5rem; }
ol.lc-numbered { list-style: none; counter-reset: lc; padding: 0; margin: 0; display: grid; gap: .85rem; }
ol.lc-numbered > li { counter-increment: lc; position: relative; background: #fff; border: 1px solid var(--lc-line); border-radius: 14px; padding: 1rem 1.15rem 1rem 3.6rem; line-height: 1.5; }
ol.lc-numbered > li::before { content: counter(lc); position: absolute; left: 1rem; top: .95rem; width: 1.8rem; height: 1.8rem; border-radius: 999px; background: var(--lc-soft); color: var(--lc-teal); font-weight: 700; font-size: .9375rem; display: flex; align-items: center; justify-content: center; }
ol.lc-numbered > li strong { color: var(--lc-teal); font-weight: 600; }
.lc-section--white ol.lc-numbered > li { background: var(--lc-cream); }

/* ---------- CTA band ---------- */
.lc-section h2 { text-wrap: balance; }
.lc-cta p { font-size: var(--wp--preset--font-size--large); opacity: .9; max-width: 36rem; margin-inline: auto; }
.lc-cta .wp-block-buttons { margin-top: 1.75rem; }
.lc-cta .wp-block-button__link:hover { background: var(--lc-amber); }

.lc-cta-tally { margin: 0 auto 1.25rem; width: 9.5rem; height: 9.5rem; border-radius: 50%; background: var(--lc-cream); display: flex; align-items: flex-end; justify-content: center; overflow: hidden; box-shadow: 0 0 0 6px rgba(255, 249, 239, .14); }
.lc-cta-tally img { width: 8.6rem; height: auto; display: block; transform: translateY(.9rem); }

/* ---------- FAQ ---------- */
.lc-faq .wp-block-details { border-bottom: 1px solid var(--lc-line); margin-block: 0; }
.lc-faq .wp-block-details:first-of-type { border-top: 1px solid var(--lc-line); }
.lc-faq summary { cursor: pointer; list-style: none; position: relative; padding: 1.15rem 2.5rem 1.15rem 0; font-weight: 600; font-size: var(--wp--preset--font-size--large); color: var(--lc-teal); line-height: 1.35; }
.lc-faq summary::-webkit-details-marker { display: none; }
.lc-faq summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 400; line-height: 1; color: var(--lc-orange); }
.lc-faq details[open] > summary::after { content: "\2212"; }
.lc-faq details > :not(summary) { margin-top: 0; padding-bottom: 1.25rem; color: var(--lc-ink); max-width: 40rem; }

/* ---------- Footer ---------- */
.lc-footer { background: var(--lc-teal); color: var(--lc-cream); padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; margin-block-start: 0 !important; border-top: 1px solid rgba(255, 249, 239, .16); }
.lc-footer a { color: var(--lc-cream); text-decoration: none; }
.lc-footer a:hover { text-decoration: underline; color: #fff; }
.lc-footer :where(a, button):focus-visible { outline-color: var(--lc-amber); }
.lc-footer__top { gap: 2rem; align-items: flex-start; }
.lc-footer .lc-logo img { height: 36px; }
.lc-footer__tag { opacity: .85; max-width: 22rem; margin-top: .9rem; }
.lc-footer .wp-block-navigation { gap: .5rem 1.75rem; font-weight: 500; }
.lc-footer__bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 249, 239, .22); font-size: var(--wp--preset--font-size--small); opacity: .8; }
.lc-footer__bottom p { margin: 0; }
.lc-footer__legal a { margin-left: 1.25rem; }
.lc-footer__legal a:first-child { margin-left: 0; }
.lc-admin-note { background: #FFF4DC; border: 1px dashed #F5D48A; border-radius: 10px; padding: .6rem .8rem; }

/* ---------- Pages, blog, posts ---------- */
.lc-main { margin-block-start: 0; }
.lc-main--inner { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem); }
.lc-page-head { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.lc-page-head h1, .lc-main--inner .wp-block-post-title { font-size: var(--wp--preset--font-size--xx-large); letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
.lc-page-head p { color: var(--lc-muted); font-size: var(--wp--preset--font-size--large); margin-top: .75rem; }
.lc-posts .wp-block-post-template { gap: 1.5rem; }
.lc-post-card { background: #fff; border: 1px solid var(--lc-line); border-radius: var(--lc-radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease; }
.lc-post-card:hover { box-shadow: 0 18px 40px -22px rgba(0, 75, 71, .35); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .lc-post-card, .lc-post-card:hover { transition: none; transform: none; } }
.lc-post-card > * { margin-block: 0; }
.lc-post-card .wp-block-post-featured-image { margin: 0; }
.lc-post-card .wp-block-post-featured-image img { display: block; }
.lc-post-card__body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.lc-post-card__body > * { margin: 0; }
.lc-post-card .wp-block-post-title { font-size: 1.3125rem; line-height: 1.25; letter-spacing: -0.012em; }
.lc-post-card .wp-block-post-title a { text-decoration: none; color: var(--lc-teal); }
.lc-post-card .wp-block-post-title a:hover { text-decoration: underline; }
.lc-post-card .wp-block-post-excerpt { color: var(--lc-muted); font-size: 1rem; line-height: 1.6; }
.lc-post-card .wp-block-post-excerpt__more-text { margin-top: .6rem; }
.lc-post-card .wp-block-post-excerpt__more-link { font-weight: 600; text-decoration: none; }
.wp-block-query-pagination { margin-top: 2.5rem; font-weight: 500; }
.wp-block-query-pagination a { text-decoration: none; }
.wp-block-query-pagination .page-numbers.current { color: var(--lc-orange); font-weight: 700; }

.lc-post-meta { gap: .4rem .9rem; color: var(--lc-muted); font-size: var(--wp--preset--font-size--small); font-weight: 500; margin-top: 1rem; }
.lc-post-meta > * { margin: 0; }
.lc-post-meta .wp-block-post-author-name::before { content: "By "; }
.lc-single .wp-block-post-featured-image { margin-block: 2rem; }
.lc-single .wp-block-post-featured-image img { border-radius: var(--lc-radius); }
.lc-single .wp-block-post-content { margin-top: 2rem; }
.entry-content > h2, .wp-block-post-content > h2 { font-size: var(--wp--preset--font-size--x-large); margin-top: 2.5rem; letter-spacing: -0.015em; }
.wp-block-post-content > h3 { margin-top: 2rem; }
.wp-block-post-content :where(ul, ol):not(.lc-numbered) { padding-left: 1.3rem; }
.wp-block-post-content li + li { margin-top: .4rem; }
.wp-block-post-content img { border-radius: 12px; }
.wp-block-quote { border-left: 4px solid var(--lc-amber); margin-inline: 0; padding: .25rem 0 .25rem 1.25rem; color: var(--lc-teal); font-weight: 500; }
.wp-block-quote cite { font-size: var(--wp--preset--font-size--small); color: var(--lc-muted); font-style: normal; font-weight: 500; }
.wp-block-code, .wp-block-preformatted { background: #fff; border: 1px solid var(--lc-line); border-radius: 12px; padding: 1rem 1.15rem; overflow-x: auto; }
:not(pre) > code { background: var(--lc-soft); border-radius: 5px; padding: .1em .35em; font-size: .9em; }
.wp-block-separator { border: 0; border-top: 1px solid var(--lc-line); opacity: 1; }
.wp-block-table td, .wp-block-table th { border-color: var(--lc-line); padding: .6rem .8rem; }
.wp-block-table th { color: var(--lc-teal); font-weight: 600; text-align: left; }
.lc-post-tags { margin-top: 2rem; font-size: var(--wp--preset--font-size--small); font-weight: 500; }
.lc-post-tags a { display: inline-block; background: var(--lc-soft); border-radius: 999px; padding: .2rem .7rem; text-decoration: none; margin: 0 .25rem .35rem 0; }
.lc-post-cta { background: #fff; border: 1px solid var(--lc-line); border-radius: 20px; padding: clamp(1.5rem, 4vw, 2.25rem); margin-top: 3rem; }
.lc-post-cta { display: flex; align-items: center; gap: 1.5rem; }
.lc-post-cta > * { margin-block: 0; }
.lc-post-cta__text { flex: 1; }
.lc-post-cta__text > * { margin-block: 0; }
.lc-post-cta__img { flex: 0 0 auto; margin: 0; }
.lc-post-cta__img img { width: 8.5rem; height: auto; display: block; }
@media (max-width: 600px) { .lc-post-cta { flex-direction: column-reverse; align-items: flex-start; } .lc-post-cta__img img { width: 6.5rem; } }
.lc-post-cta h2 { font-size: var(--wp--preset--font-size--x-large); margin-bottom: .5rem; }
.lc-post-cta p { color: var(--lc-muted); }
.lc-post-cta .wp-block-buttons { margin-top: 1.15rem; }
.lc-post-nav { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--lc-line); font-weight: 500; gap: 1rem; }
.lc-post-nav a { text-decoration: none; }
.lc-post-nav a:hover { text-decoration: underline; }
.wp-block-search__input { border: 1px solid var(--lc-line); border-radius: 10px; padding: .75rem 1rem; background: #fff; font: inherit; color: var(--lc-ink); }

/* Page not found */
.lc-notfound { text-align: center; }
.lc-notfound > * { margin-inline: auto; }
.lc-notfound__img img { width: clamp(10rem, 24vw, 14rem); height: auto; display: block; margin-inline: auto; }
.lc-notfound h1 { font-size: var(--wp--preset--font-size--xx-large); margin-top: 1rem; }
.lc-notfound .wp-block-buttons { justify-content: center; margin-top: 1.5rem; }

@media (max-width: 781px) {
	.lc-hero-art { padding-left: 0; padding-top: 0; }
	.lc-hero-tally { position: static; width: 8.5rem; margin: 0 0 -0.45rem 1.25rem; }
	.lc-tally-img img, .lc-scene { max-width: 26rem; }
	.lc-chat { margin-inline: auto; }
	.lc-footer__top { flex-direction: column; }
}
