/*
Theme Name: Lucid Automation
Theme URI: https://www.lucidautomationsecurity.com/
Author: Lucid Automation and Security LLC
Author URI: https://www.lucidautomation.net/
Description: Block theme for the Lucid Automation insights site, built from Lucid Brand Standards Rev 1.2 (STD-00). Lucid Green, Deep Pine and Signal Green over neutral surfaces; Space Grotesk, Inter and IBM Plex Mono self-hosted; registration-tick motif. No page builder required.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lucid-automation
Tags: block-theme, full-site-editing, blog, one-column, wide-blocks, custom-colors, editor-style, block-patterns
*/

/* ------------------------------------------------------------------
   Base refinements (most styling lives in theme.json)
------------------------------------------------------------------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--signal); color: var(--wp--preset--color--pine); }

a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:where(.wp-site-blocks) :where(p, li) { text-wrap: pretty; }
:where(h1, h2, h3) { text-wrap: balance; }

/* Long-form reading width for paragraphs inside posts */
.entry-content > p { max-width: 68ch; }
.entry-content > p.has-text-align-center { margin-inline: auto; }

/* Tables */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th,
.wp-block-table td { border: 1px solid var(--wp--preset--color--line); padding: 0.6em 0.8em; vertical-align: top; }
.wp-block-table thead { border-bottom: 2px solid var(--wp--preset--color--green); }
.wp-block-table thead th,
.wp-block-table thead td { background: var(--wp--preset--color--fog); font-family: var(--wp--preset--font-family--display); color: var(--wp--preset--color--pine); }

/* Images inside posts: never overflow, keep the honest photo look */
.entry-content img { height: auto; }
.wp-block-embed iframe { max-width: 100%; }

/* ------------------------------------------------------------------
   Eyebrow — mono, uppercase, leading hairline (brand signature)
------------------------------------------------------------------- */
.is-style-eyebrow,
.lucid-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--green);
	display: flex;
	align-items: center;
	gap: 12px;
}
.is-style-eyebrow::before,
.lucid-eyebrow::before {
	content: "";
	width: 34px;
	height: 1px;
	background: currentColor;
	flex: none;
}
.is-style-eyebrow.has-text-align-center { justify-content: center; }
.has-pine-background-color .is-style-eyebrow:not(.has-text-color),
.has-forest-background-color .is-style-eyebrow:not(.has-text-color) { color: var(--wp--preset--color--mint); }

/* Mono label (no rule) */
.is-style-mono-label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* ------------------------------------------------------------------
   Registration-tick corners (brand signature detail)
------------------------------------------------------------------- */
.is-style-ticked { position: relative; }
.is-style-ticked::before,
.is-style-ticked::after {
	content: "";
	position: absolute;
	width: 12px;
	height: 12px;
	pointer-events: none;
	z-index: 1;
}
.is-style-ticked::before { top: 12px; left: 12px; border-top: 1.5px solid var(--wp--preset--color--signal); border-left: 1.5px solid var(--wp--preset--color--signal); }
.is-style-ticked::after { bottom: 12px; right: 12px; border-bottom: 1.5px solid var(--wp--preset--color--signal); border-right: 1.5px solid var(--wp--preset--color--signal); }

/* ------------------------------------------------------------------
   Blueprint grid backdrop (cover band)
------------------------------------------------------------------- */
.is-style-grid-lines { position: relative; isolation: isolate; overflow: hidden; }
.is-style-grid-lines::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
	background-size: 64px 64px;
	pointer-events: none;
}
.is-style-grid-lines.has-fog-background-color::before,
.is-style-grid-lines.has-white-background-color::before,
.is-style-grid-lines.has-mist-background-color::before {
	background-image:
		linear-gradient(rgba(1,61,20,.045) 1px, transparent 1px),
		linear-gradient(90deg, rgba(1,61,20,.045) 1px, transparent 1px);
}

/* ------------------------------------------------------------------
   Cards
------------------------------------------------------------------- */
.is-style-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	transition: border-color .15s ease;
}
.is-style-card:hover,
.is-style-card:focus-within { border-color: var(--wp--preset--color--green); }

.lucid-card { height: 100%; }
.lucid-card .wp-block-post-featured-image { margin: 0; overflow: hidden; background: var(--wp--preset--color--fog); }
.lucid-card .wp-block-post-featured-image img { transition: transform .35s ease; }
.lucid-card:hover .wp-block-post-featured-image img { transform: scale(1.025); }
@media (prefers-reduced-motion: reduce) { .lucid-card:hover .wp-block-post-featured-image img { transform: none; } }
.lucid-card .wp-block-post-title { margin: 0; }
.lucid-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.lucid-card { position: relative; }
.lucid-card .wp-block-post-terms a { position: relative; z-index: 2; }

/* Compact list feed (title + date rows) */
.lucid-list .wp-block-post-template > li { border-top: 1px solid var(--wp--preset--color--line); padding-block: 0.85rem; margin: 0; }
.lucid-list .wp-block-post-template > li:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
.lucid-list .wp-block-post-title { margin: 0 0 .25rem; }

/* Capability strip — mono cells divided by hairlines */
.lucid-capstrip { gap: 0 !important; border: 1px solid var(--wp--preset--color--line); }
.lucid-capstrip > * { flex: 1 1 160px; margin: 0 !important; text-align: center; border-right: 1px solid var(--wp--preset--color--line); }
.lucid-capstrip > *:last-child { border-right: 0; }
.lucid-capstrip a {
	display: block;
	padding: 1rem 0.75rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
}
.lucid-capstrip a:hover { background: var(--wp--preset--color--fog); }
.has-pine-background-color .lucid-capstrip,
.lucid-capstrip.on-dark { border-color: rgba(255,255,255,.16); }
.has-pine-background-color .lucid-capstrip > *,
.lucid-capstrip.on-dark > * { border-color: rgba(255,255,255,.16); }
.has-pine-background-color .lucid-capstrip a,
.lucid-capstrip.on-dark a { color: var(--wp--preset--color--mint); }
.has-pine-background-color .lucid-capstrip a:hover,
.lucid-capstrip.on-dark a:hover { background: rgba(255,255,255,.06); color: #fff; }

/* Numbered expertise tiles */
.lucid-tile { height: 100%; }
.lucid-tile .lucid-num { font-family: var(--wp--preset--font-family--mono); font-weight: 600; color: var(--wp--preset--color--green); font-size: var(--wp--preset--font-size--small); }
.lucid-tile a.lucid-tile-link::after { content: ""; position: absolute; inset: 0; }
.lucid-tile { position: relative; }

/* Partner logos */
.lucid-logos { align-items: center; }
.lucid-logos .wp-block-image { margin: 0; }
.lucid-logos img { max-height: 56px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.lucid-logos img:hover { filter: none; opacity: 1; }

/* Outline button on dark */
.has-pine-background-color .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) { color: #fff; }
.wp-block-button.is-style-outline > .wp-block-button__link { border: 1.5px solid currentColor; background: transparent; padding: calc(0.8rem - 1.5px) calc(1.35rem - 1.5px); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(26,168,59,.08); }

/* Arrow links */
.lucid-arrow a, a.lucid-arrow { font-family: var(--wp--preset--font-family--display); font-weight: 600; text-decoration: none; }
.lucid-arrow a::after, a.lucid-arrow::after { content: " \2192"; transition: margin .15s; }
.lucid-arrow a:hover::after, a.lucid-arrow:hover::after { margin-left: .2em; }

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------- */
.lucid-topbar { font-family: var(--wp--preset--font-family--mono); font-size: 0.6875rem; letter-spacing: .12em; text-transform: uppercase; }
.lucid-topbar p { margin: 0; }
.lucid-topbar a { color: var(--wp--preset--color--mint); text-decoration: none; }
.lucid-topbar a:hover { color: #fff; text-decoration: underline; }
.lucid-mainbar { border-bottom: 1px solid var(--wp--preset--color--line); }
.lucid-logo img { display: block; height: auto; }

@media (min-width: 782px) {
	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); }
	header.wp-block-template-part .lucid-mainbar { background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(8px); }
}

.wp-block-navigation .wp-block-navigation-item__content { padding-block: .35rem; }
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content,
.wp-block-navigation [aria-current="page"] { color: var(--wp--preset--color--green); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .45em; }
.wp-block-navigation .lucid-nav-shop > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--green);
	color: #fff !important;
	padding: .5rem .9rem;
	border-radius: 2px;
	text-decoration: none !important;
}
.wp-block-navigation .lucid-nav-shop > .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--forest); }
.wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: 1rem; font-size: 1.25rem; }

/* ------------------------------------------------------------------
   Footer (Deep Pine)
------------------------------------------------------------------- */
.lucid-footer a { color: var(--wp--preset--color--fog); text-decoration: none; }
.lucid-footer a:hover { color: var(--wp--preset--color--mint); text-decoration: underline; }
.lucid-footer .lucid-footer-links p { margin: 0 0 .45rem; font-size: var(--wp--preset--font-size--small); }
.lucid-footer .lucid-footer-links small { display: block; color: rgba(241,245,241,.6); font-size: .78rem; }
.lucid-footer .wp-block-social-links .wp-social-link { background: rgba(255,255,255,.08); color: var(--wp--preset--color--fog); }
.lucid-footer .wp-block-social-links .wp-social-link:hover { background: var(--wp--preset--color--green); }
.lucid-fine { border-top: 1px solid rgba(255,255,255,.14); color: rgba(241,245,241,.6); }
.lucid-fine a { color: rgba(241,245,241,.8) !important; }

/* ------------------------------------------------------------------
   Single post
------------------------------------------------------------------- */
.lucid-post-meta { gap: .4rem 1rem; }
.lucid-post-meta > * { margin: 0 !important; }
.lucid-post-meta .lucid-dot::before { content: "\00B7"; color: var(--wp--preset--color--line); }
.wp-block-post-navigation-link { font-family: var(--wp--preset--font-family--display); font-weight: 500; }
.wp-block-post-navigation-link .wp-block-post-navigation-link__label { display: block; font-family: var(--wp--preset--font-family--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--steel); }

/* Category chips */
ul.lucid-chips,
.lucid-chips ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.lucid-chips ul { margin: 0; }
.lucid-chips li { margin: 0; }
.lucid-chips a {
	display: inline-block;
	padding: .4rem .75rem;
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--mono);
	font-size: .72rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--wp--preset--color--pine);
}
.lucid-chips a:hover { border-color: var(--wp--preset--color--green); color: var(--wp--preset--color--green); }
.lucid-chips .current-cat a { background: var(--wp--preset--color--pine); color: #fff; border-color: var(--wp--preset--color--pine); }

/* Pagination */
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers { text-decoration: none; padding: .35rem .6rem; border: 1px solid transparent; }
.wp-block-query-pagination .page-numbers.current { border-color: var(--wp--preset--color--green); color: var(--wp--preset--color--green); }

/* Search */
.wp-block-search__input { border: 1px solid var(--wp--preset--color--line); border-radius: 2px; padding: .7rem .9rem; font: inherit; }
.wp-block-search__button { margin-left: .5rem; }

@media print {
	header.wp-block-template-part, footer.wp-block-template-part, .lucid-related { display: none !important; }
}

/* Landing template: full-width sections stack edge to edge */
.wp-block-post-content.lucid-landing > * { margin-block-start: 0; margin-block-end: 0; }

/* Template-level blocks (header / main / footer) sit flush */
.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }

/* Lucid Green band (call to action) */
.has-green-background-color .is-style-eyebrow:not(.has-text-color) { color: #fff; }
.has-green-background-color .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) { color: #fff; }
.has-green-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(255,255,255,.1); }
.has-green-background-color .wp-block-button__link.has-white-background-color:hover { background: var(--wp--preset--color--fog) !important; color: var(--wp--preset--color--pine) !important; }
.has-green-background-color.is-style-grid-lines::before {
	background-image:
		linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px);
}

/* ------------------------------------------------------------------
   Front page (v1.1): archive site
------------------------------------------------------------------- */
.lucid-archive-banner p { margin: 0; font-size: var(--wp--preset--font-size--small); }
.lucid-archive-banner strong { font-weight: 700; }
.lucid-banner-tag {
	display: inline-block; margin-right: .6rem; padding: .15rem .5rem;
	border: 1px solid rgba(255,255,255,.55); border-radius: 2px;
	font-family: var(--wp--preset--font-family--mono); font-size: .68rem; font-weight: 500;
	letter-spacing: .14em; text-transform: uppercase; vertical-align: 1px;
}
.lucid-banner-link a {
	display: inline-block; padding: .45rem .9rem; background: #fff; color: var(--wp--preset--color--pine) !important;
	font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: .875rem; text-decoration: none; border-radius: 2px;
}
.lucid-banner-link a:hover { background: var(--wp--preset--color--fog); }

.lucid-home-hero .lucid-hero-lead { max-width: 62ch; color: rgba(241,245,241,.88); }
.lucid-hero-search { max-width: 720px; margin-top: var(--wp--preset--spacing--40); }
.lucid-hero-search .wp-block-search__inside-wrapper { background: #fff; border-radius: 2px; padding: 4px; }
.lucid-hero-search .wp-block-search__input { border: 0; font-size: 1.0625rem; padding: .85rem 1rem; color: var(--wp--preset--color--graphite); }
.lucid-hero-search .wp-block-search__input::placeholder { color: var(--wp--preset--color--steel); }
.lucid-hero-search .wp-block-search__button { margin: 0; background: var(--wp--preset--color--green); color: #fff; border: 0; border-radius: 2px; padding: .7rem 1.4rem; font-family: var(--wp--preset--font-family--display); font-weight: 600; }
.lucid-hero-search .wp-block-search__button:hover { background: var(--wp--preset--color--forest); }
.lucid-hero-stats {
	font-family: var(--wp--preset--font-family--mono); font-size: .75rem; letter-spacing: .14em;
	text-transform: uppercase; color: var(--wp--preset--color--mint); margin-top: .9rem !important;
}

.lucid-site-main .wp-block-heading,
.lucid-site-here .wp-block-heading { overflow-wrap: anywhere; }
.lucid-site-here { border: 2px solid var(--wp--preset--color--green) !important; }
.lucid-site-here .lucid-here::before { content: "\25CF  "; color: var(--wp--preset--color--signal); }
ul.lucid-ticks { list-style: none; padding-left: 0; }
ul.lucid-ticks li { position: relative; padding-left: 1.5rem; margin: .45rem 0; }
ul.lucid-ticks li::before { content: ""; position: absolute; left: 0; top: .62em; width: .75rem; height: 1.5px; background: var(--wp--preset--color--signal); }
.lucid-site-main ul.lucid-ticks li { color: rgba(241,245,241,.9); }

.lucid-tile .lucid-num { margin: 0; }
.lucid-tile p { margin: 0; }
.lucid-chiprow p { margin: 0 !important; }
.lucid-chiprow .lucid-count { margin-left: .35rem; padding: 0 .35rem; background: var(--wp--preset--color--fog); color: var(--wp--preset--color--steel); border-radius: 2px; }

.lucid-year { position: relative; text-align: left; }
.lucid-year p { margin: 0; }
.lucid-year-num a { font-family: var(--wp--preset--font-family--display); font-size: 2rem; font-weight: 600; letter-spacing: -.03em; color: var(--wp--preset--color--pine); text-decoration: none; }
.lucid-year-num a::after { content: ""; position: absolute; inset: 0; }
.lucid-year:hover .lucid-year-num a { color: var(--wp--preset--color--green); }
/* Keep the narrower hero lead and search aligned with the left edge of the content column */
.lucid-home-hero.is-layout-constrained > .lucid-hero-lead,
.lucid-home-hero.is-layout-constrained > .lucid-hero-search { margin-left: max(0px, calc((100% - 1180px) / 2)) !important; margin-right: auto !important; }
.lucid-tile .wp-block-heading a { color: var(--wp--preset--color--pine); text-decoration: none; }
.lucid-tile:hover .wp-block-heading a { color: var(--wp--preset--color--green); }
@media (max-width: 600px) {
	.lucid-topbar .wp-block-group > p:first-child,
	.lucid-hide-sm { display: none; }
	.lucid-home-hero h1 { font-size: clamp(1.75rem, 7.4vw, 3rem) !important; overflow-wrap: break-word; }
	.lucid-site-main .wp-block-heading { font-size: clamp(1.5rem, 7vw, 2rem) !important; }
}
