/* Pulse theme – component styles that theme.json can't express. */
:root {
	--pulse-radius: 18px;
	--pulse-line: var(--wp--preset--color--line);
	color-scheme: dark;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
::selection { background: color-mix(in srgb, var(--wp--preset--color--accent) 35%, transparent); }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
img { height: auto; }

/* Header ---------------------------------------------------------------- */
.pulse-header {
	position: sticky; top: 0; z-index: 50;
	border-bottom: 1px solid var(--pulse-line);
	transition: box-shadow .25s;
}
/* The frosted glass sits on a pseudo-element: a backdrop-filter on the header itself would
   trap the full-screen mobile menu (position: fixed) inside the header's own box. */
.pulse-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: color-mix(in srgb, var(--wp--preset--color--base) 78%, transparent);
	backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
}
body.admin-bar .pulse-header { top: var(--wp-admin--admin-bar--height, 32px); }
.pulse-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,.6); }
.pulse-header .wp-block-site-title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.pulse-logo-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--wp--preset--gradient--accent); color: var(--wp--preset--color--on-accent); font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1rem; box-shadow: var(--wp--preset--shadow--glow); margin: 0 !important; }
.pulse-header .wp-block-navigation a:where(:not(.wp-element-button)) { color: color-mix(in srgb, var(--wp--preset--color--contrast) 82%, transparent); padding: 6px 2px; transition: color .15s; }
.pulse-header .wp-block-navigation a:hover, .pulse-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--accent); text-decoration: none; }
/* Dropdowns: core paints submenus black-on-white unless the block has its own colours, so set both. */
.pulse-header .wp-block-navigation .wp-block-navigation__submenu-container { background: var(--wp--preset--color--surface) !important; color: var(--wp--preset--color--contrast) !important; border: 1px solid var(--pulse-line) !important; border-radius: 12px; padding: 6px !important; box-shadow: var(--wp--preset--shadow--soft); min-width: 220px !important; }
.pulse-header .wp-block-navigation__submenu-container a { padding: 8px 12px !important; border-radius: 8px; }
.pulse-header .wp-block-navigation__submenu-container a:hover { background: var(--wp--preset--color--surface-2); }
/* Mobile menu overlay: full screen, left-aligned, submenus as an indented list. The menu list
   repeats the nav's "justify right" class, so the layout variables are reset on it too. */
.pulse-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--base) !important; color: var(--wp--preset--color--contrast) !important; padding: 20px 24px 40px !important; }
.pulse-header .wp-block-navigation__responsive-container.is-menu-open,
.pulse-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation { --navigation-layout-justification-setting: flex-start; --navigation-layout-justify: flex-start; --navigation-layout-align: flex-start; }
.pulse-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: 18px !important; font-size: 1.15rem; }
.pulse-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { background: transparent !important; border: 0 !important; border-left: 1px solid var(--pulse-line) !important; border-radius: 0; box-shadow: none; min-width: 0 !important; margin: 4px 0 0 2px; padding: 0 0 0 16px !important; gap: 12px !important; }
.pulse-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a { padding: 0 !important; font-size: 1rem; color: var(--wp--preset--color--muted); }
.pulse-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a:hover { background: none; color: var(--wp--preset--color--accent); }
.pulse-header .pulse-ticker { margin: 0 !important; border-bottom: 0; }

/* Backgrounds --------------------------------------------------------------- */
.is-style-glow { position: relative; isolation: isolate; background-image: var(--wp--preset--gradient--glow); }
.is-style-grid { position: relative; isolation: isolate; }
.is-style-grid::before, .pulse-hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background-image: linear-gradient(var(--pulse-line) 1px, transparent 1px), linear-gradient(90deg, var(--pulse-line) 1px, transparent 1px);
	background-size: 56px 56px; opacity: .45;
	mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}
.pulse-hero { position: relative; isolation: isolate; overflow: hidden; }

/* Cards --------------------------------------------------------------------- */
.is-style-card, .wp-block-columns.is-style-cards > .wp-block-column {
	background: linear-gradient(180deg, color-mix(in srgb, var(--wp--preset--color--surface) 100%, transparent), color-mix(in srgb, var(--wp--preset--color--surface-2) 100%, transparent));
	border: 1px solid var(--pulse-line);
	border-radius: var(--pulse-radius);
	padding: clamp(20px, 3vw, 32px);
	transition: border-color .25s, transform .25s, box-shadow .25s;
}
.wp-block-columns.is-style-cards > .wp-block-column:hover, a.is-style-card:hover, .is-style-card.is-hoverable:hover {
	border-color: color-mix(in srgb, var(--wp--preset--color--accent) 45%, transparent);
	transform: translateY(-3px);
	box-shadow: var(--wp--preset--shadow--glow);
}
.is-style-glass { background: color-mix(in srgb, var(--wp--preset--color--surface) 60%, transparent); backdrop-filter: blur(12px); border: 1px solid var(--pulse-line); border-radius: var(--pulse-radius); padding: clamp(20px, 3vw, 32px); }
.pulse-icon { display: inline-grid !important; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--wp--preset--color--accent) 14%, transparent); color: var(--wp--preset--color--accent); font-size: 1.25rem; margin-bottom: 4px !important; }
.is-style-cards .pulse-stretch { color: inherit; }
.is-style-cards .pulse-stretch:hover { color: var(--wp--preset--color--accent); text-decoration: none; }
.is-style-cards .pulse-stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.wp-block-columns.is-style-cards > .wp-block-column { position: relative; }

/* Typography helpers ------------------------------------------------------------- */
.is-style-eyebrow { font-size: var(--wp--preset--font-size--x-small) !important; text-transform: uppercase; letter-spacing: .14em; font-weight: 600; color: var(--wp--preset--color--accent); }
.is-style-lead { font-size: var(--wp--preset--font-size--large) !important; color: color-mix(in srgb, var(--wp--preset--color--contrast) 78%, transparent); line-height: 1.55; }
.is-style-badge { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--pulse-line); background: var(--wp--preset--color--surface); font-size: var(--wp--preset--font-size--x-small) !important; font-weight: 500; color: var(--wp--preset--color--muted); }
.is-style-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--wp--preset--color--positive); box-shadow: 0 0 0 4px color-mix(in srgb, var(--wp--preset--color--positive) 20%, transparent); }
.is-layout-flex > .is-style-badge, .is-layout-constrained > .is-style-badge.has-text-align-center { margin-inline: auto; }
.is-style-gradient { background: linear-gradient(100deg, var(--wp--preset--color--contrast) 10%, var(--wp--preset--color--accent-2) 55%, var(--wp--preset--color--accent) 90%); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.has-muted-color a { color: inherit; }
.pulse-mono, .pulse-mono * { font-family: var(--wp--preset--font-family--mono) !important; font-variant-numeric: tabular-nums; }

/* Lists ---------------------------------------------------------------------- */
ul.is-style-check { list-style: none; padding-left: 0; }
ul.is-style-check li { position: relative; padding-left: 30px; margin-bottom: .55em; }
ul.is-style-check li::before { content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--wp--preset--color--accent) 18%, transparent); }
ul.is-style-check li::after { content: ""; position: absolute; left: 3px; top: calc(.35em + 3px); width: 12px; height: 12px; background: var(--wp--preset--color--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='2.6'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8'/%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 20 20' fill='none' stroke='%23000' stroke-width='2.6'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E") center/contain no-repeat; }

/* Buttons -------------------------------------------------------------------- */
.wp-block-button__link { transition: transform .15s, background-color .2s, box-shadow .2s; }
.wp-block-button__link:hover { transform: translateY(-1px); text-decoration: none !important; }
.wp-block-button:not(.is-style-ghost):not(.is-style-outline) .wp-block-button__link { box-shadow: var(--wp--preset--shadow--glow); }
.is-style-ghost .wp-block-button__link, .wp-block-button.is-style-outline .wp-block-button__link { background: transparent !important; color: var(--wp--preset--color--contrast) !important; border: 1px solid var(--pulse-line) !important; }
.is-style-ghost .wp-block-button__link:hover, .wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--wp--preset--color--accent) !important; color: var(--wp--preset--color--accent) !important; }

/* Tables --------------------------------------------------------------------- */
.wp-block-table { overflow-x: auto; }
.wp-block-table table, .wp-block-table.is-style-pulse table { border-collapse: separate; border-spacing: 0; width: 100%; border: 1px solid var(--pulse-line); border-radius: var(--pulse-radius); overflow: hidden; background: var(--wp--preset--color--surface); }
.wp-block-table th, .wp-block-table td { border: 0 !important; border-bottom: 1px solid var(--pulse-line) !important; padding: 12px 16px; text-align: left; }
.wp-block-table thead { border: 0; }
.wp-block-table thead th { background: var(--wp--preset--color--surface-2); color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--x-small); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.wp-block-table tbody tr:last-child td { border-bottom: 0 !important; }
.wp-block-table figcaption { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--x-small); }

/* FAQ ------------------------------------------------------------------------ */
.wp-block-details { border-bottom: 1px solid var(--pulse-line); }
.wp-block-details summary { cursor: pointer; font-weight: 600; font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--medium); list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--pulse-line); color: var(--wp--preset--color--accent); transition: transform .25s; }
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { color: color-mix(in srgb, var(--wp--preset--color--contrast) 78%, transparent); }

/* Images --------------------------------------------------------------------- */
.is-style-framed img { border-radius: var(--pulse-radius); border: 1px solid var(--pulse-line); }

/* Posts ---------------------------------------------------------------------- */
.wp-block-post-template.is-layout-grid > li { display: flex; }
.pulse-post-card { width: 100%; display: flex; flex-direction: column; overflow: hidden; padding: 0 !important; }
.pulse-post-card .wp-block-post-featured-image { margin: 0; aspect-ratio: 16/9; overflow: hidden; }
.pulse-post-card .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pulse-post-card:hover .wp-block-post-featured-image img { transform: scale(1.04); }
.pulse-post-card .pulse-post-body { padding: 20px 22px 24px; flex: 1; }
.pulse-post-card .wp-block-post-title a { color: var(--wp--preset--color--contrast); }
.pulse-post-card .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); text-decoration: none; }
.wp-block-post-excerpt { color: var(--wp--preset--color--muted); }
.wp-block-post-content > p, .wp-block-post-content > ul, .wp-block-post-content > ol { color: color-mix(in srgb, var(--wp--preset--color--contrast) 86%, transparent); }
.wp-block-query-pagination { gap: 8px; }
.wp-block-query-pagination-numbers .page-numbers { display: inline-grid; place-items: center; min-width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--pulse-line); }
.wp-block-query-pagination-numbers .page-numbers.current { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); border-color: transparent; }

/* Footer --------------------------------------------------------------------- */
.pulse-footer { border-top: 1px solid var(--pulse-line); }
.pulse-footer h2, .pulse-footer h3 { font-size: var(--wp--preset--font-size--x-small) !important; text-transform: uppercase; letter-spacing: .12em; color: var(--wp--preset--color--muted); font-family: var(--wp--preset--font-family--body) !important; font-weight: 600; }
.pulse-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pulse-footer a { color: color-mix(in srgb, var(--wp--preset--color--contrast) 80%, transparent); }
.pulse-footer a:hover { color: var(--wp--preset--color--accent); text-decoration: none; }

/* Stats strip ------------------------------------------------------------------- */
.pulse-stat-num { font-family: var(--wp--preset--font-family--mono) !important; font-weight: 700 !important; letter-spacing: -.03em; color: var(--wp--preset--color--accent); line-height: 1 !important; }

/* Reveal ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
	.pulse-js .pulse-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
	.pulse-js .pulse-reveal.is-in { opacity: 1; transform: none; }
}

/* Light variation tweaks (applied when base color is light) */
.pulse-light { color-scheme: light; }

@media (max-width: 781px) {
	.pulse-hide-mobile { display: none !important; }
}

/* Post cards (Query Loop) */
.pulse-post-tile { position: relative; display: flex; flex-direction: column; gap: 10px; width: 100%; transition: transform .15s, border-color .15s, box-shadow .15s; }
.pulse-post-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--wp--preset--color--accent) 45%, var(--pulse-line)); }
.pulse-post-tile .wp-block-post-title { margin: 0; line-height: 1.3; }
.pulse-post-tile .wp-block-post-title a { color: inherit; text-decoration: none; }
.pulse-post-tile .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.pulse-post-tile .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.pulse-post-tile .wp-block-post-excerpt { margin: 0; }
.pulse-post-tile .wp-block-post-excerpt__more-text { display: none; }
.pulse-post-tile .wp-block-post-date { margin-top: auto; }
.pulse-post-cat a { position: relative; z-index: 1; display: inline-block; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; text-decoration: none; color: var(--wp--preset--color--accent); }
.wp-block-pulse-tv-widget.alignfull { margin-top: 0; margin-bottom: 0; border-radius: 0; border-bottom: 1px solid var(--pulse-line); }

/* Header menu: switch to the tap-to-open (overlay) menu below a per-site width, so long menus never wrap onto two lines on tablets.
   The header navigation block carries one of these classes (set per site in content/<site>.js as navCollapse). */
@media (min-width: 600px) and (max-width: 781.98px) {
	.wp-block-navigation.pulse-nav-collapse-782 .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.wp-block-navigation.pulse-nav-collapse-782 .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
@media (min-width: 600px) and (max-width: 899.98px) {
	.wp-block-navigation.pulse-nav-collapse-900 .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.wp-block-navigation.pulse-nav-collapse-900 .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
@media (min-width: 600px) and (max-width: 1023.98px) {
	.wp-block-navigation.pulse-nav-collapse-1024 .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.wp-block-navigation.pulse-nav-collapse-1024 .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
