/*
Theme Name:   Agenda
Theme URI:    https://agendasec.com
Description:  Block theme for agendasec.com. Design tokens live in theme.json; this file holds component CSS the editor cannot express (section patterns, hero ownership panel, CTA button).
Author:       Agenda Consulting
Version:      0.1.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  agenda
*/

/* ---------------------------------------------------------------------------
   Base
   Tokens come from theme.json as --wp--preset--*. Aliases below keep the
   component CSS readable and match the marketing mockup's variable names.
--------------------------------------------------------------------------- */
:root {
	--green: var(--wp--preset--color--green);
	--green-dark: var(--wp--preset--color--green-dark);
	--green-deep: var(--wp--preset--color--green-deep);
	--green-soft: var(--wp--preset--color--green-soft);
	--ink: var(--wp--preset--color--ink);
	--muted: var(--wp--preset--color--muted);
	--line: var(--wp--preset--color--line);
	--wash: var(--wp--preset--color--wash);
	--radius: 18px;
	--shadow: 0 18px 50px rgba(24, 54, 19, .10);
	/* line-calendar icon used as a CSS mask on every booking CTA */
	--agenda-calendar-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3Cpath d='m9 15 2 2 4-4'/%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
a { text-decoration: none; }
:focus-visible { outline: 3px solid #8fc875; outline-offset: 3px; }

/* Root block gap would push <main> and <footer> 1.1rem below their predecessors;
   the hero must meet the header border and the footer its own border-top. */
.wp-site-blocks > main,
.wp-site-blocks > footer { margin-block-start: 0; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 18px; top: 12px; z-index: 100; background: #fff; padding: 10px 14px; border: 2px solid var(--green); }

/* Eyebrow label above section headings */
.eyebrow {
	color: var(--green);
	font-size: .76rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
}

/* ---------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(255, 255, 255, .95);
	border-bottom: 1px solid var(--line);
	backdrop-filter: blur(12px);
}
.site-header .brand img { display: block; width: 210px; height: auto; }
.site-header .wp-block-navigation { font-size: .92rem; font-weight: 500; }
.site-header .wp-block-navigation a:hover { color: var(--green); }
.site-header .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content,
.site-header .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--green);
	text-decoration: underline;
	text-underline-offset: 6px;
}
.site-header .wp-block-navigation__submenu-icon { color: var(--green); }

/* Industries dropdown (mockup .nav-dropdown-menu) */
.site-header .wp-block-navigation .has-child .wp-block-navigation__submenu-container {
	left: -18px;
	/* core's :hover rule (0,5,0) resets min-width to 200px; the mockup menu is 260px */
	min-width: 260px !important;
	padding: 10px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
	box-shadow: var(--shadow);
}
.site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 10px 11px;
	border-radius: 7px;
	font-size: .86rem;
	color: var(--ink);
}
.site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.site-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus {
	background: var(--green-soft);
	color: var(--green-dark);
}

/* backdrop-filter makes the header the containing block for position:fixed
   descendants, which would trap core's full-screen menu overlay inside the
   header strip. WordPress marks the open overlay with html.has-modal-open. */
html.has-modal-open .site-header { backdrop-filter: none; }

/* Collapse to the menu button before the six items + CTA run out of room.
   Core only collapses below 600px; this extends its own rules up to 1100px. */
@media (min-width: 600px) and (max-width: 1100px) {
	.site-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.site-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
/* The desktop nav is right-justified, and core repeats that on the overlay's list
   and on every item (the list itself carries .items-justified-right), so the
   left alignment has to be set on those elements directly. */
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	align-items: flex-start;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 48px; }

/* Booking CTA as the last menu item: only inside the open overlay (the header
   button covers desktop, and is hidden on phones). Styled like .agenda-cta. */
.site-header .wp-block-navigation__responsive-container:not(.is-menu-open) .nav-book { display: none; }
.site-header .wp-block-navigation__responsive-container.is-menu-open .nav-book { margin-top: 12px; }
.site-header .wp-block-navigation__responsive-container.is-menu-open .nav-book > .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 48px;
	padding: 12px 20px;
	border-radius: 7px;
	background: linear-gradient(135deg, #174806 0%, #2f7f0b 58%, #438f20 100%);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .nav-book > .wp-block-navigation-item__content::before {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--agenda-calendar-icon) center / contain no-repeat;
	mask: var(--agenda-calendar-icon) center / contain no-repeat;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.05rem; }
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	border: 0;
	box-shadow: none;
	padding: 4px 0 0 12px;
	min-width: 0;
}

/* ---------------------------------------------------------------------------
   Buttons
   .agenda-cta  — primary booking CTA (gradient, soft shadow, slow sheen)
   .agenda-cta-secondary — outlined
--------------------------------------------------------------------------- */
.wp-block-button.agenda-cta .wp-block-button__link,
.wp-block-button.agenda-cta-secondary .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 48px;
	padding: 12px 20px;
	border: 1px solid transparent;
	border-radius: 7px;
	font-weight: 600;
	transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.wp-block-button.agenda-cta .wp-block-button__link {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: linear-gradient(135deg, #174806 0%, #2f7f0b 58%, #438f20 100%);
	color: #fff;
	box-shadow: 0 8px 24px rgba(47, 127, 11, .22), 0 0 0 1px rgba(255, 255, 255, .08) inset;
}
.wp-block-button.agenda-cta .wp-block-button__link::before {
	content: "";
	position: absolute;
	z-index: -1;
	inset: -2px;
	background: linear-gradient(105deg, transparent 28%, rgba(255, 255, 255, .18) 48%, transparent 68%);
	transform: translateX(-120%);
	animation: cta-sheen 7s 2.2s ease-in-out infinite;
}
.wp-block-button.agenda-cta .wp-block-button__link[href*="/book/"]::after {
	/* line-calendar icon on every booking CTA (keyed to the /book/ destination, so
	   primary buttons that go elsewhere, e.g. construction.agendasec.app, stay plain) */
	content: "";
	order: -1;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	background: currentColor;
	-webkit-mask: var(--agenda-calendar-icon) center / contain no-repeat;
	mask: var(--agenda-calendar-icon) center / contain no-repeat;
}
.wp-block-button.agenda-cta .wp-block-button__link:hover,
.wp-block-button.agenda-cta .wp-block-button__link:focus {
	background: linear-gradient(135deg, #225e0b, #3c9218);
	box-shadow: 0 11px 30px rgba(47, 127, 11, .3), 0 0 0 1px rgba(255, 255, 255, .12) inset;
	transform: translateY(-2px);
	color: #fff;
}
.wp-block-button.agenda-cta-secondary .wp-block-button__link {
	border-color: #a8b2a5;
	background: #fff;
	color: var(--ink);
}
.wp-block-button.agenda-cta-secondary .wp-block-button__link:hover,
.wp-block-button.agenda-cta-secondary .wp-block-button__link:focus {
	border-color: var(--green);
	color: var(--green-dark);
}
/* On dark surfaces the CTA inverts to white */
.agenda-on-dark .wp-block-button.agenda-cta .wp-block-button__link {
	background: #fff;
	color: var(--green-dark);
	box-shadow: none;
}

/* ---------------------------------------------------------------------------
   Hero
--------------------------------------------------------------------------- */
.agenda-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(115deg, #fff 0 58%, var(--green-soft) 58% 100%);
}
.agenda-hero::before,
.agenda-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.agenda-hero::before {
	width: 330px; height: 330px; right: -90px; top: -110px;
	border: 1px solid rgba(47, 127, 11, .17);
	box-shadow: 0 0 0 54px rgba(47, 127, 11, .045), 0 0 0 108px rgba(47, 127, 11, .025);
	animation: orbit 14s ease-in-out infinite;
}
.agenda-hero::after {
	width: 12px; height: 12px; right: 18%; top: 18%;
	background: var(--green);
	box-shadow: -90px 150px 0 -2px rgba(47, 127, 11, .45), 100px 260px 0 2px rgba(47, 127, 11, .2);
	animation: drift 8s ease-in-out infinite;
}
.agenda-hero .wp-block-columns { position: relative; z-index: 1; }
.agenda-hero .agenda-hero-copy { animation: hero-in .75s ease-out both; }
.agenda-hero h1 { max-width: 760px; margin: 16px 0 22px; }
.agenda-hero .lede { margin-bottom: 28px; }
.agenda-hero .lede { font-size: 1.14rem; color: #354039; max-width: 660px; }
.agenda-hero .audience { color: var(--muted); font-size: .9rem; max-width: 650px; }

/* Ownership panel (static version; connector animation comes from the block plugin) */
.ownership {
	position: relative;
	background: var(--green-deep);
	color: #fff;
	border-radius: 24px;
	padding: 42px;
	box-shadow: var(--shadow);
	animation: hero-card-in .85s .15s ease-out both, float-card 9s 1s ease-in-out infinite;
}
.ownership .label {
	display: flex; align-items: center; gap: 8px;
	font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; color: #b9d8af; font-weight: 700;
}
.ownership .label::before {
	content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8fd36f;
	box-shadow: 0 0 0 0 rgba(143, 211, 111, .42);
	animation: status-breathe 2.8s ease-out infinite;
}
.ownership h2 { color: #fff; font-size: 2rem; line-height: 1.16; margin: 10px 0 24px; }
.ownership-map { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ownership-node {
	position: relative;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 12px;
	padding: 17px;
	transition: transform .25s, border-color .25s, background .25s;
}
.ownership-node::after {
	content: ""; position: absolute; right: 12px; top: 12px; width: 6px; height: 6px; border-radius: 50%;
	background: #80c965; box-shadow: 0 0 8px rgba(128, 201, 101, .75);
	animation: node-blink 3.2s var(--blink-delay, 0s) ease-in-out infinite;
}
.ownership-node:hover { transform: translateY(-3px); border-color: rgba(176, 231, 151, .72); background: rgba(255, 255, 255, .13); }
.ownership-node p { margin: 0; }
.ownership-node .node-title { font-weight: 700; font-size: 1rem; }
.ownership-node .node-sub { font-size: .8rem; color: #c6d3c6; }
/* Status-light stagger (was inline --blink-delay; inline custom properties are not
   storable block attributes, so the delays live here by position). */
.ownership-map > .ownership-node:nth-child(1) { --blink-delay: .2s; }
.ownership-map > .ownership-node:nth-child(2) { --blink-delay: 1s; }
.ownership-map > .ownership-node:nth-child(3) { --blink-delay: 1.8s; }
.ownership-map > .ownership-node:nth-child(4) { --blink-delay: 2.6s; }
.ownership-map > .ownership-node.owner-center { --blink-delay: .6s; }
.ownership-node.owner-center { grid-column: 1 / -1; background: linear-gradient(135deg, #2f7f0b, #3f941c); text-align: center; }
.ownership-node.owner-center::after { background: #d8ffc6; box-shadow: 0 0 10px rgba(216, 255, 198, .9); }
.ownership-node.owner-center .node-title { font-size: 1.18rem; }

/* ---------------------------------------------------------------------------
   Sections / cards
--------------------------------------------------------------------------- */
/* Section heads sit flush-left with the content that follows (mockup: .section-head is a
   760px block at the left edge of the 1160px wrap). In a constrained layout WP would
   centre a 760px head while wide grids span 1160px, so: let the head take the same box
   as its siblings (wide when the section has wide children) and cap its text at 760px. */
.is-layout-constrained:has(> .alignwide) > .agenda-section-head { max-width: var(--wp--style--global--wide-size); }
.agenda-section-head > * { max-width: 760px; }
.agenda-section-head h2 { letter-spacing: -.025em; line-height: 1.12; }
.agenda-section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.06rem; }

.agenda-card {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 30px;
	background: #fff;
	transition: .25s;
}
.agenda-card:hover { border-color: #9ab18f; box-shadow: var(--shadow); transform: translateY(-5px); }
.agenda-card h3 { margin: 9px 0; }
.agenda-card p { color: var(--muted); }
.agenda-card .number { font-size: .72rem; color: var(--green); font-weight: 700; letter-spacing: .12em; }
.text-link { color: var(--green-dark); font-weight: 600; border-bottom: 1px solid #9abb8b; }
.text-link:hover { color: var(--green); }

.agenda-on-dark, .agenda-on-dark h2, .agenda-on-dark h3 { color: #fff; }
.agenda-on-dark p { color: #c9d4ca; }

/* ---------------------------------------------------------------------------
   Footer
--------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .footer-logo img { width: 190px; height: auto; }
.site-footer h3 { font-size: .8rem; line-height: 1.65; text-transform: uppercase; letter-spacing: .1em; color: var(--green-dark); font-family: var(--wp--preset--font-family--poppins); }
.site-footer p, .site-footer a { color: var(--muted); font-size: .88rem; }
.site-footer .copyright { border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }

/* ---------------------------------------------------------------------------
   Motion
--------------------------------------------------------------------------- */
@keyframes hero-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes hero-card-in { from { opacity: 0; transform: translateX(25px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes float-card { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes orbit { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-14px, 18px) rotate(8deg); } }
@keyframes drift { 0%, 100% { transform: translateY(0); opacity: .65; } 50% { transform: translateY(18px); opacity: 1; } }
@keyframes status-breathe { 0%, 55%, 100% { box-shadow: 0 0 0 0 rgba(143, 211, 111, .38); } 72% { box-shadow: 0 0 0 8px rgba(143, 211, 111, 0); } }
@keyframes node-blink { 0%, 70%, 100% { opacity: .35; } 78%, 88% { opacity: 1; } }
@keyframes cta-sheen { 0%, 68%, 100% { transform: translateX(-120%); } 82% { transform: translateX(120%); } }


/* Injected by assets/js/site.js — connector routes and travelling signals */
.ownership-map { position: relative; }
.ownership-node { z-index: 2; }
.signal-network { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.signal-path { fill: none; stroke: rgba(143, 211, 111, .22); stroke-width: 1.6; stroke-dasharray: 4 6; }
.signal-dot { fill: #b6ee9d; filter: drop-shadow(0 0 5px rgba(182, 238, 157, .9)); }
.ownership-map.is-animated .ownership-node { animation: ownership-pulse 8s var(--signal-delay, 0s) ease-in-out infinite; }
.ownership-map.is-animated .owner-center { animation-name: owner-pulse; animation-delay: 6.2s; }
.ownership:hover .ownership-node { animation-play-state: paused; }
@keyframes ownership-pulse {
	0%, 13%, 100% { border-color: rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .08); box-shadow: none; }
	6% { border-color: rgba(165, 226, 138, .72); background: rgba(255, 255, 255, .13); box-shadow: 0 0 22px rgba(93, 181, 52, .18); }
}
@keyframes owner-pulse {
	0%, 13%, 100% { box-shadow: none; }
	6% { box-shadow: 0 0 28px rgba(143, 211, 111, .35); }
}
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Sections pad with preset 70 inline; the mockup drops section padding 96 → 72 px on phones. */
@media (max-width: 720px) {
	:root { --wp--preset--spacing--70: 72px; }
}
@media (max-width: 900px) {
	.agenda-hero { background: #fff; }
	.ownership { max-width: 620px; }
}
@media (max-width: 600px) {
	/* The mockup folds the header CTA into the menu overlay on phones; the hero CTA is one screen away. */
	.site-header .wp-block-buttons { display: none; }
}
@media (max-width: 560px) {
	.ownership { padding: 30px 22px; }
	.ownership h2 { font-size: 1.65rem; }
	.ownership-node { padding: 14px; }
	.site-header .brand img { width: 165px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
	.reveal { opacity: 1; transform: none; }
	.signal-dot { display: none; }
}
