/* ==========================================================================
   AlphaPros — global styles (header, footer, typography, blog, pages)
   Home page sections live in home.css.
   ========================================================================== */

/* Tokens
   ========================================================================== */
:root {
	--ap-bg: #1d131b;
	--ap-bg-deep: #0e0a0f;
	--ap-surface: #241a23;
	--ap-surface-2: #2b2129;
	--ap-primary: #af47fe;
	--ap-primary-dark: #9532e3;
	--ap-primary-soft: #c58bf2;
	--ap-white: #ffffff;
	--ap-text: #e9e3ea;
	--ap-muted: #b4a9b6;
	--ap-border: rgba(255, 255, 255, .14);
	--ap-border-soft: rgba(255, 255, 255, .08);

	--ap-font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--ap-font-heading: "Manrope", var(--ap-font-body);

	--ap-container: 1130px;
	--ap-container-wide: 1240px;
	--ap-content: 760px;
	--ap-gutter: clamp(16px, 4vw, 32px);
	--ap-radius: 16px;
	--ap-radius-sm: 8px;
	--ap-shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
	--ap-header-h: 76px;
	--ap-ease: cubic-bezier(.2, .7, .2, 1);

	color-scheme: dark;
}

/* Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--ap-header-h); }

body {
	margin: 0;
	font-family: var(--ap-font-body);
	font-size: 1rem;
	line-height: 1.75;
	color: var(--ap-text);
	background: var(--ap-bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, video, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--ap-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--ap-primary-soft); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ap-font-heading);
	color: var(--ap-white);
	line-height: 1.25;
	margin: 0 0 .6em;
	font-weight: 700;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.25rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1.25em; }

:focus-visible { outline: 2px solid var(--ap-primary); outline-offset: 3px; }

::selection { background: var(--ap-primary); color: var(--ap-white); }

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto;
	top: 8px; left: 8px; z-index: 1000;
	padding: 10px 16px;
	background: var(--ap-white);
	color: var(--ap-bg);
	border-radius: var(--ap-radius-sm);
}

.text-accent { color: var(--ap-primary); }
.text-gradient {
	background: linear-gradient(90deg, #b57be8, #d6a6f5);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.eyebrow {
	margin: 0 0 1em;
	font: 600 .8125rem/1.4 var(--ap-font-body);
	letter-spacing: .25em;
	text-transform: uppercase;
	color: var(--ap-primary);
}

/* Layout
   ========================================================================== */
.container {
	width: 100%;
	max-width: calc(var(--ap-container) + var(--ap-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--ap-gutter);
}
.section { padding-block: clamp(48px, 6vw, 80px); }
.site-header .container { max-width: calc(var(--ap-container-wide) + var(--ap-gutter) * 2); }

.content-area.has-sidebar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 56px;
}
.content-area:not(.has-sidebar) .content-area__main { max-width: var(--ap-content); margin-inline: auto; }

/* Buttons
   ========================================================================== */
.btn,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: .8em 1.6em;
	font: 500 1rem/1.2 var(--ap-font-body);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
	transition: background-color .2s, color .2s, transform .2s var(--ap-ease), box-shadow .2s;
}
.btn--primary,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
	background: var(--ap-primary);
	color: var(--ap-white);
}
.btn--primary:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
	background: var(--ap-primary-dark);
	color: var(--ap-white);
	transform: translateY(-1px);
	box-shadow: 0 10px 28px rgba(175, 71, 254, .35);
}
.btn--muted { background: #3a3139; color: var(--ap-white); }
.btn--muted:hover { background: #4a3f49; color: var(--ap-white); }
.btn--sm { padding: .55em 1.1em; font-size: .9375rem; }
.btn--ghost {
	color: var(--ap-white);
	background: rgba(255, 255, 255, .04);
	box-shadow: inset 0 0 0 1px var(--ap-border);
}
.btn--ghost:hover {
	color: var(--ap-white);
	background: rgba(175, 71, 254, .14);
	box-shadow: inset 0 0 0 1px rgba(175, 71, 254, .6);
}
.btn--ghost .icon { width: 18px; height: 18px; }

/* Forms
   ========================================================================== */
input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="search"], input[type="password"], input[type="number"], textarea, select {
	width: 100%;
	padding: .8em 1.1em;
	font: inherit;
	font-size: .9375rem;
	color: var(--ap-white);
	background: rgba(255, 255, 255, .05);
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius-sm);
	transition: border-color .2s, box-shadow .2s, background-color .2s;
}
::placeholder { color: rgba(255, 255, 255, .38); }
input:focus, textarea:focus, select:focus {
	outline: none;
	border-color: var(--ap-primary);
	background: rgba(255, 255, 255, .07);
	box-shadow: 0 0 0 3px rgba(175, 71, 254, .2);
}
label { display: block; font-size: .9375rem; font-weight: 500; margin-bottom: .45em; color: var(--ap-white); }

.search-form { display: flex; gap: 8px; max-width: 480px; }
.search-form__input { flex: 1; }

/* Header
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(4, 2, 5, .94);
	backdrop-filter: saturate(160%) blur(14px);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	transition: background-color .3s, box-shadow .3s;
}
/* Bottom edge: hairline with a purple glow in the middle (as on alphapros.ai) */
.site-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background:
		linear-gradient(90deg, transparent 8%, rgba(175, 71, 254, .9) 50%, transparent 92%),
		rgba(255, 255, 255, .06);
	box-shadow: 0 0 14px rgba(175, 71, 254, .45);
	pointer-events: none;
}
.admin-bar .site-header { top: 32px; }
.site-header.is-scrolled { background: rgba(6, 4, 8, .95); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }

.site-header .container { max-width: calc(1300px + var(--ap-gutter) * 2); }
.site-header__inner {
	display: flex;
	align-items: center;
	gap: clamp(32px, 5vw, 72px);
	min-height: var(--ap-header-h);
}

.site-logo { display: block; flex-shrink: 0; transition: opacity .2s; }
.site-logo:hover { opacity: .85; }
.site-logo img, .custom-logo { width: auto; height: 30px; max-height: 30px; }

.primary-nav { display: flex; align-items: center; flex: 1; gap: 24px; }
.primary-nav nav { flex: 1; display: flex; }
.primary-nav .menu { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.primary-nav .menu > li { position: relative; display: flex; align-items: center; }
/* Thin divider between top-level items */
.primary-nav .menu > li + li::before {
	content: "";
	width: 1px;
	height: 13px;
	margin: 0 11px;
	background: rgba(255, 255, 255, .28);
}
.primary-nav .menu a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 10px 0;
	font-size: .84rem;
	font-weight: 600;
	letter-spacing: .005em;
	white-space: nowrap;
	color: #b8b1ba;
	transition: color .2s;
}
.primary-nav .menu > li > a::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2px;
	height: 2px;
	background: var(--ap-primary);
	border-radius: 2px;
	box-shadow: 0 0 10px rgba(175, 71, 254, .8);
	transform: scaleX(0);
	transition: transform .3s var(--ap-ease);
}
.primary-nav .menu-item-has-children > a::after {
	content: "";
	width: 6px;
	height: 6px;
	margin: -3px 0 0 2px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transition: transform .25s var(--ap-ease), margin .25s;
}
.primary-nav .menu-item-has-children:hover > a::after,
.primary-nav .menu-item-has-children:focus-within > a::after { margin-top: 3px; transform: rotate(-135deg); }
.primary-nav .menu a:hover { color: var(--ap-white); }
.primary-nav .menu > li > a:hover::before { transform: scaleX(1); }
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav .current-menu-ancestor > a,
.primary-nav .current-menu-parent > a { color: var(--ap-primary-soft); }
.primary-nav .menu > .current-menu-item > a::before,
.primary-nav .menu > .current_page_item > a::before,
.primary-nav .menu > .current-menu-ancestor > a::before { transform: scaleX(1); }

.primary-nav .sub-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 10;
	min-width: 250px;
	list-style: none;
	margin: 0;
	padding: 8px;
	background: rgba(18, 12, 20, .97);
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 14px;
	box-shadow: 0 24px 50px rgba(0, 0, 0, .6), 0 0 0 1px rgba(175, 71, 254, .08);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s, transform .25s var(--ap-ease), visibility .2s;
}
/* Hover bridge so the menu doesn't close crossing the gap */
.primary-nav .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a { padding: 10px 14px; font-size: .875rem; color: #d6d0d8; border-radius: 9px; }
.primary-nav .sub-menu a:hover,
.primary-nav .sub-menu .current-menu-item > a { color: var(--ap-white); background: rgba(175, 71, 254, .16); }
.primary-nav .sub-menu .sub-menu { top: 0; left: 100%; }

.site-header__actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.site-header__login {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	font-size: .9375rem;
	font-weight: 500;
	color: var(--ap-white);
	background: #2b252d;
	border: 1px solid rgba(255, 255, 255, .06);
	border-radius: 10px;
	transition: background-color .25s, border-color .25s, box-shadow .25s, transform .25s var(--ap-ease);
}
.site-header__login:hover {
	color: var(--ap-white);
	background: var(--ap-primary);
	border-color: var(--ap-primary);
	box-shadow: 0 8px 24px rgba(175, 71, 254, .4);
	transform: translateY(-1px);
}

.menu-toggle { display: none; }

/* Page hero (inner pages)
   ========================================================================== */
.page-hero {
	margin-top: calc(var(--ap-header-h) * -1);
	padding: calc(var(--ap-header-h) + clamp(48px, 7vw, 88px)) 0 clamp(48px, 7vw, 88px);
	background:
		radial-gradient(70% 90% at 50% 0%, rgba(122, 44, 170, .35), transparent 70%),
		linear-gradient(180deg, #1b1021, var(--ap-bg));
	text-align: center;
}
.page-hero__title { margin-bottom: .25em; }
.page-hero__subtitle { color: var(--ap-muted); max-width: 640px; margin-inline: auto; }
.page-hero__subtitle p:last-child { margin: 0; }

/* Entry content
   ========================================================================== */
.entry-content { max-width: var(--ap-content); margin-inline: auto; }
.entry-content--wide { max-width: var(--ap-container); }
.entry-content--full { max-width: none; }
.entry-content > * + * { margin-top: 1.25em; }
.entry-content h2, .entry-content h3 { margin-top: 1.8em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .35em; }
.entry-content blockquote {
	margin-inline: 0;
	padding: 1em 1.5em;
	border-left: 4px solid var(--ap-primary);
	background: var(--ap-surface);
	border-radius: 0 var(--ap-radius-sm) var(--ap-radius-sm) 0;
	font-size: 1.1rem;
	color: var(--ap-white);
}
.entry-content img { border-radius: var(--ap-radius); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .75em; border-bottom: 1px solid var(--ap-border); text-align: left; }
.entry-content code { background: var(--ap-surface-2); padding: .15em .4em; border-radius: 4px; font-size: .9em; }
.entry-content pre { background: var(--ap-bg-deep); padding: 1.25em; border-radius: var(--ap-radius); overflow-x: auto; border: 1px solid var(--ap-border-soft); }
.entry-content pre code { background: none; padding: 0; }

.alignwide { max-width: var(--ap-container); margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .875rem; color: var(--ap-muted); text-align: center; margin-top: .5em; }

.entry-meta { font-size: .875rem; color: var(--ap-muted); }
.entry-meta a { color: inherit; }
.cat-links a { color: var(--ap-primary); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; }
.page-hero .entry-meta + .page-hero__title { margin-top: .5em; }

.entry-thumbnail { margin: 0 0 2em; }
.entry-thumbnail img { width: 100%; border-radius: var(--ap-radius); }

.entry-footer { margin-top: 2.5em; }
.tag-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-links a {
	padding: 4px 12px;
	font-size: .8125rem;
	border: 1px solid var(--ap-border);
	border-radius: 999px;
	color: var(--ap-text);
}
.tag-links a:hover { border-color: var(--ap-primary); color: var(--ap-primary); }

.post-navigation { margin-top: 3em; padding-top: 2em; border-top: 1px solid var(--ap-border); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.post-navigation a { display: block; color: var(--ap-white); }
.post-navigation .nav-label { display: block; font-size: .8125rem; color: var(--ap-muted); text-transform: uppercase; letter-spacing: .1em; }
.post-navigation .nav-title { font-weight: 600; font-family: var(--ap-font-heading); }
.post-navigation a:hover .nav-title { color: var(--ap-primary-soft); }

/* Cards / grid
   ========================================================================== */
.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
	gap: 28px;
}
.card {
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01));
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius);
	overflow: hidden;
	transition: transform .3s var(--ap-ease), border-color .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(175, 71, 254, .5); box-shadow: var(--ap-shadow-lg); }
.card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ap-surface); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ap-ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__placeholder { display: block; width: 100%; height: 100%; background: radial-gradient(circle at 30% 20%, rgba(175, 71, 254, .45), transparent 60%), var(--ap-surface); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.card__title { font-size: 1.25rem; margin: .35em 0 .5em; }
.card__title a { color: var(--ap-white); }
.card__title a:hover { color: var(--ap-primary-soft); }
.card__excerpt { color: var(--ap-muted); font-size: .9375rem; }
.card__excerpt p { margin: 0; }
.card__meta { margin-top: auto; padding-top: 16px; }

.pagination { margin-top: 56px; }
.pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--ap-border);
	border-radius: 8px;
	color: var(--ap-white);
	font-weight: 500;
}
.pagination .page-numbers.current,
.pagination a.page-numbers:hover { background: var(--ap-primary); border-color: var(--ap-primary); color: var(--ap-white); }

/* Sidebar / widgets
   ========================================================================== */
.widget { margin-bottom: 32px; }
.widget-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1em; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 6px 0; }
.content-area__sidebar .widget { padding: 24px; background: var(--ap-surface); border: 1px solid var(--ap-border-soft); border-radius: var(--ap-radius); }

/* Comments
   ========================================================================== */
.comments-area { max-width: var(--ap-content); margin: 4em auto 0; }
.comment-list { list-style: none; padding: 0; margin: 0 0 2em; }
.comment-list .children { list-style: none; padding-left: 32px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--ap-border); }
.comment-author { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ap-white); }
.comment-author .avatar { border-radius: 50%; }
.comment-metadata { font-size: .8125rem; margin: 4px 0 8px 60px; }
.comment-metadata a { color: var(--ap-muted); }
.comment-content { margin-left: 60px; }
.reply { margin-left: 60px; font-size: .875rem; font-weight: 600; }
.comment-form p { margin-bottom: 1em; }

/* 404 / no results
   ========================================================================== */
.not-found, .no-results { text-align: center; }
.not-found .search-form, .no-results .search-form { margin: 24px auto; }
.not-found__code {
	font: 800 clamp(5rem, 15vw, 9rem)/1 var(--ap-font-heading);
	background: linear-gradient(135deg, var(--ap-primary), #e3b8ff);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	margin-bottom: .1em;
}

/* Footer
   ========================================================================== */
.site-footer { padding-top: clamp(48px, 6vw, 80px); font-size: .9375rem; }
.site-footer__top {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) repeat(3, minmax(0, 1fr));
	gap: 40px;
	padding-bottom: 40px;
}
.site-footer__brand .site-logo img, .site-footer__brand .custom-logo { max-height: 40px; }
.site-footer__about { margin: 22px 0 0; max-width: 470px; line-height: 1.9; color: var(--ap-text); }

.site-footer__heading {
	position: relative;
	display: inline-block;
	padding-bottom: 12px;
	margin-bottom: 18px;
	font-size: 1.375rem;
}
.site-footer__heading::before,
.site-footer__heading::after {
	content: "";
	position: absolute;
	bottom: 0;
	height: 2px;
	border-radius: 2px;
}
.site-footer__heading::before { left: 0; width: 60px; background: var(--ap-white); }
.site-footer__heading::after { left: 68px; width: 20px; background: var(--ap-primary); }

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 4px 0; }
.footer-links a { display: inline-flex; align-items: center; gap: 12px; color: var(--ap-text); }
.footer-links a::before {
	content: "";
	width: 6px;
	height: 6px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s var(--ap-ease);
}
.footer-links a:hover { color: var(--ap-primary-soft); }
.footer-links a:hover::before { transform: translateX(3px) rotate(45deg); }

.site-footer__bottom {
	padding-block: 24px 32px;
	border-top: 1px solid var(--ap-border);
	text-align: center;
	font-size: 1rem;
}
.site-footer__bottom p { margin: 0; }

/* Shared sections: headings + contact block (home, about, …)
   ========================================================================== */
.section-title { max-width: 820px; margin-bottom: .7em; line-height: 1.4; }
.section-lead { max-width: 1060px; }

.contact { padding-top: clamp(32px, 4vw, 56px); padding-bottom: clamp(32px, 4vw, 48px); }
.contact__box {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
	gap: clamp(32px, 5vw, 72px);
	padding: clamp(32px, 4vw, 56px) clamp(20px, 2.2vw, 32px) clamp(32px, 3vw, 44px) clamp(24px, 4vw, 66px);
	overflow: hidden;
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius);
	background:
		radial-gradient(60% 80% at 0% 0%, rgba(110, 40, 160, .55), transparent 70%),
		linear-gradient(135deg, transparent 70%, rgba(130, 50, 190, .35)),
		rgba(255, 255, 255, .01);
}
.contact__title { font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.45; margin-bottom: .8em; max-width: 440px; }
.contact__intro p:last-child { line-height: 2; margin: 0; max-width: 460px; }

@media (max-width: 960px) {
	.contact__box { grid-template-columns: 1fr; }
}

/* Video modal (YouTube popup, used by home hero, Frank, …)
   ========================================================================== */
.video-modal {
	width: min(1100px, calc(100vw - 32px));
	max-width: none;
	max-height: none;
	padding: 0;
	overflow: visible;
	background: #000;
	border: 1px solid var(--ap-border);
	border-radius: 14px;
	box-shadow: 0 40px 120px rgba(0, 0, 0, .7);
}
.video-modal::backdrop { background: rgba(10, 5, 12, .85); backdrop-filter: blur(6px); }
.video-modal[open] { animation: ap-modal-in .3s var(--ap-ease); }
@keyframes ap-modal-in { from { opacity: 0; transform: scale(.96); } }
.video-modal__frame { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
.video-modal__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-modal__close {
	position: absolute;
	top: -52px;
	right: 0;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	color: var(--ap-white);
	background: rgba(255, 255, 255, .12);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .2s;
}
.video-modal__close:hover { background: var(--ap-primary); }
.video-modal__close .icon { width: 22px; height: 22px; }

/* Click-to-play video embeds ([data-embed-src] buttons, see main.js)
   ========================================================================== */
.video-facade {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #000;
	border: 1px solid var(--ap-border);
	border-radius: 22px;
	box-shadow: 0 30px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(175, 71, 254, .12);
}
.video-facade__button {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}
.video-facade__button img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ap-ease), filter .5s; }
.video-facade__button:hover img { transform: scale(1.04); filter: brightness(.85); }
.video-facade__play {
	position: absolute;
	left: 20px;
	bottom: 20px;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 6px 18px 6px 6px;
	color: var(--ap-white);
	background: rgba(20, 10, 22, .65);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 999px;
	transition: transform .3s var(--ap-ease), background-color .3s;
}
.video-facade__play-icon {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	background: var(--ap-primary);
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(175, 71, 254, .6);
	animation: ap-play-pulse 2.2s var(--ap-ease) infinite;
}
.video-facade__play-icon .icon { width: 20px; height: 20px; margin-left: 3px; }
.video-facade__play-text { display: grid; line-height: 1.25; text-align: left; }
.video-facade__play-text strong { font-size: .95rem; font-weight: 600; }
.video-facade__play-text small { font-size: .78rem; color: var(--ap-muted); }
.video-facade__button:hover .video-facade__play { transform: translateY(-3px); background: rgba(175, 71, 254, .35); }
@keyframes ap-play-pulse {
	70% { box-shadow: 0 0 0 18px rgba(175, 71, 254, 0); }
	100% { box-shadow: 0 0 0 0 rgba(175, 71, 254, 0); }
}
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Lightbox ([data-lightbox] links, see main.js)
   ========================================================================== */
.lightbox {
	width: auto;
	max-width: min(1400px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	padding: 0;
	overflow: visible;
	background: transparent;
	border: 0;
}
.lightbox::backdrop { background: rgba(8, 4, 10, .88); backdrop-filter: blur(8px); }
.lightbox[open] { animation: ap-lb-in .35s var(--ap-ease); }
@keyframes ap-lb-in { from { opacity: 0; transform: scale(.94); } }
.lightbox__img { display: block; max-width: 100%; max-height: calc(100vh - 48px); border-radius: 14px; box-shadow: 0 40px 120px rgba(0, 0, 0, .7); background: #fff; }
.lightbox__close {
	position: absolute;
	top: -18px;
	right: -18px;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	padding: 0;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--ap-white);
	background: var(--ap-primary);
	border: 0;
	border-radius: 50%;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
	cursor: pointer;
}

/* Page loader (template-parts/loader.php)
   Shown only while html has .js-loader; .loader-out plays the exit.
   ========================================================================== */
.site-loader { display: none; }
.js-loader body { overflow: hidden; }
.js-loader .site-loader {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	background:
		radial-gradient(40% 40% at 50% 50%, rgba(140, 50, 200, .28), transparent 70%),
		var(--ap-bg);
	clip-path: inset(0 0 0 0);
	transition: clip-path .9s cubic-bezier(.76, 0, .24, 1);
}
.site-loader__inner { display: grid; justify-items: center; gap: 22px; transition: transform .9s cubic-bezier(.76, 0, .24, 1), opacity .5s; }
.site-loader__logo { width: min(300px, 70vw); height: auto; color: var(--ap-white); overflow: visible; }

/* "A" mark pops in, then glows */
.site-loader__mark {
	transform-box: fill-box;
	transform-origin: 50% 50%;
	animation:
		ap-loader-mark .8s cubic-bezier(.34, 1.56, .64, 1) .1s both,
		ap-loader-glow 1.8s ease-in-out .9s infinite;
}
@keyframes ap-loader-mark {
	from { opacity: 0; transform: scale(.3) rotate(-25deg); }
	to { opacity: 1; transform: none; }
}
@keyframes ap-loader-glow {
	0%, 100% { filter: drop-shadow(0 0 0 rgba(175, 71, 254, 0)); }
	50% { filter: drop-shadow(0 0 6px rgba(175, 71, 254, .9)); }
}

/* Letters rise in left to right (--i set per letter in the markup) */
.site-loader__letter {
	transform-box: fill-box;
	transform-origin: 50% 100%;
	animation: ap-loader-letter .6s cubic-bezier(.22, 1, .36, 1) calc(.45s + var(--i) * .05s) both;
}
@keyframes ap-loader-letter {
	from { opacity: 0; transform: translateY(60%) scaleY(1.2); }
	to { opacity: 1; transform: none; }
}

/* Progress line */
.site-loader__bar {
	position: relative;
	width: min(300px, 70vw);
	height: 2px;
	overflow: hidden;
	background: rgba(255, 255, 255, .08);
	border-radius: 2px;
}
.site-loader__bar::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, var(--ap-primary), #e3b8ff);
	box-shadow: 0 0 12px rgba(175, 71, 254, .8);
	transform: scaleX(0);
	transform-origin: left;
	animation: ap-loader-bar 1.4s cubic-bezier(.65, 0, .35, 1) .3s forwards;
}
@keyframes ap-loader-bar { to { transform: scaleX(1); } }

/* Exit: the overlay wipes up and the logo lifts away */
.loader-out .site-loader { clip-path: inset(0 0 100% 0); }
.loader-out .site-loader__inner { transform: translateY(-40px); opacity: 0; }

/* Smooth scrolling (Lenis)
   ========================================================================== */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Scroll reveal
   [data-reveal]            → element animates in when it enters the viewport
   [data-reveal="left"|"right"|"zoom"|"fade"] → variants (default: up)
   [data-reveal-group]      → its children animate in one after another
   Hidden states only apply under html.js-anim (set in <head>, skipped for reduced motion).
   ========================================================================== */
.js-anim [data-reveal]:not(.reveal-done),
.js-anim [data-reveal-group] > :not(.reveal-done) {
	opacity: 0;
	transform: translate3d(0, 32px, 0);
	transition:
		opacity .8s var(--ap-ease) var(--reveal-delay, 0s),
		transform .9s var(--ap-ease) var(--reveal-delay, 0s);
}
.js-anim [data-reveal="left"]:not(.reveal-done) { transform: translate3d(-48px, 0, 0); }
.js-anim [data-reveal="right"]:not(.reveal-done) { transform: translate3d(48px, 0, 0); }
.js-anim [data-reveal="zoom"]:not(.reveal-done) { transform: scale(.92); }
.js-anim [data-reveal="fade"]:not(.reveal-done) { transform: none; }

/* Once done (.reveal-done, added by main.js) these rules stop applying, so elements keep their own hover transitions. */
.js-anim [data-reveal].is-visible:not(.reveal-done),
.js-anim [data-reveal-group] > .is-visible:not(.reveal-done) {
	opacity: 1;
	transform: none;
}

/* Responsive
   ========================================================================== */
@media (max-width: 1080px) {
	.site-footer__top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.site-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
	.content-area.has-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 1180px) {
	:root { --ap-header-h: 70px; }

	.menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		margin-left: auto;
		padding: 0;
		background: none;
		border: 0;
		cursor: pointer;
	}
	.menu-toggle__bar,
	.menu-toggle__bar::before,
	.menu-toggle__bar::after {
		display: block;
		width: 22px;
		height: 2px;
		background: var(--ap-white);
		border-radius: 2px;
		transition: transform .25s var(--ap-ease), background-color .2s;
	}
	.menu-toggle__bar { position: relative; }
	.menu-toggle__bar::before, .menu-toggle__bar::after { content: ""; position: absolute; left: 0; }
	.menu-toggle__bar::before { top: -7px; }
	.menu-toggle__bar::after { top: 7px; }
	.menu-toggle[aria-expanded="true"] .menu-toggle__bar { background: transparent; }
	.menu-toggle[aria-expanded="true"] .menu-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
	.menu-toggle[aria-expanded="true"] .menu-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

	.primary-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
		padding: 12px var(--ap-gutter) 24px;
		background: #1a1019;
		border-bottom: 1px solid var(--ap-border);
		box-shadow: var(--ap-shadow-lg);
		max-height: calc(100vh - var(--ap-header-h));
		overflow-y: auto;
	}
	.primary-nav.is-open { display: flex; }
	.primary-nav nav { display: block; }
	.primary-nav .menu { flex-direction: column; gap: 0; }
	.primary-nav .menu a { padding: 12px 0; border-bottom: 1px solid var(--ap-border-soft); }
	.primary-nav .menu-item-has-children > a::after { margin-left: auto; }
	.primary-nav .menu { align-items: stretch; }
	.primary-nav .menu > li { display: block; }
	.primary-nav .menu > li + li::before,
	.primary-nav .menu > li > a::before { display: none; }
	.primary-nav .menu a { font-size: 1rem; color: var(--ap-white); }
	.site-header__actions { margin-left: 0; }
	.site-header__login { flex: 1; }
	.primary-nav .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		background: none;
		padding: 0 0 0 16px;
		min-width: 0;
	}
	.primary-nav .sub-menu a { padding: 10px 0; border-radius: 0; }
	.site-header__actions { justify-content: space-between; }
	.site-header.nav-open { background: #1a1019; }
}

@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
	.video-facade__play { left: 12px; bottom: 12px; }
	.admin-bar .site-header { top: 0; }
	.site-footer__top { grid-template-columns: 1fr 1fr; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.post-navigation .nav-next { grid-column: auto; text-align: left; }
	.comment-metadata, .comment-content, .reply { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
