/* ==========================================================================
   The Digital Curator — Custom Styles
   Effects beyond theme.json: glassmorphism, gradients, animations, hover states
   ========================================================================== */

/* --- Selection --- */
::selection {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--on-primary);
}

/* --- Material Symbols --- */
.material-symbols-outlined {
	font-family: 'Material Symbols Outlined';
	font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
	display: inline-block;
	vertical-align: middle;
}

/* --- Glassmorphism Header --- */
.site-header {
	position: fixed !important;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: rgba(19, 19, 19, 0.7) !important;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

/* Offset body for fixed header */
body {
	padding-top: 5rem;
}

/* WP admin bar pushes header down */
body.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .site-header {
		top: 46px;
	}
	body {
		padding-top: 5.5rem;
	}
}

/* --- Editorial Gradient Buttons --- */
.editorial-gradient-btn .wp-block-button__link,
.editorial-gradient-btn-raw {
	background: linear-gradient(135deg, #c5c0ff 0%, #8c83f3 100%) !important;
	color: var(--wp--preset--color--on-primary-container) !important;
	transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

.editorial-gradient-btn .wp-block-button__link:hover,
.editorial-gradient-btn-raw:hover {
	transform: scale(1.05);
}

.editorial-gradient-btn .wp-block-button__link:active,
.editorial-gradient-btn-raw:active {
	opacity: 0.8;
}

/* --- Hero CTA Button --- */
.hero-cta-btn .wp-block-button__link {
	transition: background-color 0.5s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-cta-btn .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary) !important;
	color: var(--wp--preset--color--on-primary) !important;
}

/* --- Grayscale → Color Image Hover --- */
.grayscale-hover img,
img.grayscale-hover {
	filter: grayscale(100%);
	transition: filter 0.7s ease, transform 0.7s ease;
}

.grayscale-hover:hover img,
img.grayscale-hover:hover {
	filter: grayscale(0%);
	transform: scale(1.05);
}

/* --- Bento Card Hover Glow --- */
.bento-card {
	transition: box-shadow 0.5s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bento-card:hover {
	box-shadow: 0 0 40px -10px rgba(197, 192, 255, 0.15);
}

/* --- Value Prop Cards --- */
.bento-value-card {
	transition: background-color 0.5s ease;
}

.bento-value-card:hover {
	background-color: var(--wp--preset--color--surface) !important;
}

/* --- Related Article Cards --- */
.related-card {
	cursor: pointer;
}

.related-card .wp-block-post-featured-image img {
	filter: grayscale(100%);
	transition: filter 0.5s ease, transform 0.5s ease;
}

.related-card:hover .wp-block-post-featured-image img {
	filter: grayscale(0%);
	transform: scale(1.05);
}

/* --- Newsletter CTA Background Glow --- */
.newsletter-cta-box {
	position: relative;
	overflow: hidden;
}

.newsletter-cta-box::after {
	content: '';
	position: absolute;
	right: -5rem;
	top: -5rem;
	width: 24rem;
	height: 24rem;
	background: var(--wp--preset--color--primary);
	opacity: 0.05;
	border-radius: 50%;
	filter: blur(100px);
	pointer-events: none;
}

/* --- Newsletter Form Inputs --- */
.curator-newsletter-form input[type="email"]:focus {
	outline: none;
	box-shadow: 0 0 0 2px var(--wp--preset--color--primary);
}

.curator-newsletter-form button:hover {
	transform: scale(1.02);
	transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- Article Sidebar Sticky --- */
.article-sidebar {
	position: sticky;
	top: 8rem;
	align-self: start;
}

/* --- Article Content Typography --- */
.curator-article-content p {
	color: var(--wp--preset--color--foreground-muted);
	line-height: 1.6;
	margin-bottom: 2rem;
}

.curator-article-content h2 {
	margin-top: 4rem;
	margin-bottom: 1.5rem;
}

.curator-article-content blockquote {
	border-left: none;
	border-right: 4px solid var(--wp--preset--color--primary);
	text-align: right;
	background: var(--wp--preset--color--surface-low);
	padding: 3rem;
	margin: 5rem 0;
}

.curator-article-content blockquote p {
	font-family: var(--wp--preset--font-family--headline);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	font-style: italic;
	line-height: 1.2;
}

.curator-article-content blockquote cite {
	font-family: var(--wp--preset--font-family--label);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: var(--wp--preset--color--foreground-muted);
	font-style: normal;
}

/* --- Article Content Images --- */
.curator-article-content .wp-block-image img {
	filter: grayscale(100%);
	transition: filter 0.7s ease;
}

.curator-article-content .wp-block-image:hover img {
	filter: grayscale(0%);
}

.curator-article-content .wp-block-image figcaption {
	font-family: var(--wp--preset--font-family--label);
	font-size: 0.625rem;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: var(--wp--preset--color--foreground-muted);
	opacity: 0.6;
	font-style: italic;
	text-align: right;
}

/* --- Tags/Keywords Styling --- */
.curator-tags a {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	background: var(--wp--preset--color--surface-high);
	color: var(--wp--preset--color--foreground-muted) !important;
	text-decoration: none;
	font-size: 0.625rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* --- Author Bio Box --- */
.author-bio-box {
	position: relative;
	overflow: hidden;
	transition: box-shadow 0.5s ease;
}

.author-bio-box:hover {
	box-shadow: 0 0 60px -10px rgba(197, 192, 255, 0.15);
}

.author-bio-box::after {
	content: '';
	position: absolute;
	right: -4rem;
	bottom: -4rem;
	width: 16rem;
	height: 16rem;
	background: var(--wp--preset--color--primary);
	opacity: 0.04;
	border-radius: 50%;
	filter: blur(80px);
	pointer-events: none;
}

.author-bio-box .wp-block-post-author {
	flex-shrink: 0;
}

.author-bio-box .wp-block-post-author .wp-block-post-author__avatar img,
.author-bio-box .author-avatar-block img {
	width: 80px !important;
	height: 80px !important;
	border-radius: 0.5rem;
	filter: grayscale(100%);
	transition: filter 0.5s ease;
	object-fit: cover;
}

.author-bio-box:hover .wp-block-post-author .wp-block-post-author__avatar img,
.author-bio-box:hover .author-avatar-block img {
	filter: grayscale(0%);
}

/* --- Secondary 10% Background Utility --- */
.has-secondary-10-bg {
	background: rgba(125, 255, 162, 0.1);
}

/* --- Surface High Background Utility --- */
.has-surface-high-bg {
	background: var(--wp--preset--color--surface-high, rgba(255, 255, 255, 0.06));
}

/* --- Hero Inline Email Form --- */
.hero-inline-form input[type="email"]:focus {
	border-color: #c5c0ff !important;
	box-shadow: 0 0 0 2px rgba(197, 192, 255, 0.2) !important;
}

.hero-inline-form button:hover {
	transform: scale(1.03);
	transition: transform 0.3s ease;
}

/* Smooth scroll for anchor links */
html {
	scroll-behavior: smooth;
}

/* --- Ambient Shadows --- */
.ambient-glow-primary {
	box-shadow: 0 0 48px rgba(197, 192, 255, 0.06);
}

/* --- All Transitions Default --- */
a, button, .wp-block-button__link {
	transition: color 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
	            background-color 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
	            transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
	            opacity 0.3s ease;
}

/* --- Responsive Adjustments --- */
@media (max-width: 781px) {
	.article-sidebar {
		position: static;
	}

	.hero-featured {
		min-height: auto !important;
		padding-top: var(--wp--preset--spacing--10) !important;
		padding-bottom: var(--wp--preset--spacing--8) !important;
	}

	/* ===== MOBILE NAV OVERLAY — FULL SCREEN DARK ===== */

	/* Hamburger icon */
	.wp-block-navigation__responsive-container-open,
	.wp-block-navigation__responsive-container-open svg {
		color: #e5e2e1 !important;
		fill: #e5e2e1 !important;
	}

	/* Full-screen overlay */
	.wp-block-navigation__responsive-container.is-menu-open {
		background-color: #131313 !important;
		color: #e5e2e1 !important;
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		width: 100vw !important;
		height: 100vh !important;
		z-index: 99999 !important;
		padding: 5rem 2rem 2rem !important;
		overflow-y: auto !important;
		display: flex !important;
		flex-direction: column !important;
	}

	/* Close button */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close,
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close svg {
		color: #e5e2e1 !important;
		fill: #e5e2e1 !important;
		position: absolute !important;
		top: 1.5rem !important;
		right: 1.5rem !important;
	}

	/* Content wrapper — force column */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 0 !important;
		width: 100% !important;
	}

	/* Nav container — force column */
	.is-menu-open .wp-block-navigation__container,
	.is-menu-open .wp-block-page-list,
	.is-menu-open ul.wp-block-navigation__container {
		display: flex !important;
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		gap: 0 !important;
		width: 100% !important;
		list-style: none !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	/* Each nav item — full width block */
	.is-menu-open .wp-block-navigation-item,
	.is-menu-open .wp-block-navigation-link,
	.is-menu-open li.wp-block-navigation-item {
		display: block !important;
		width: 100% !important;
		float: none !important;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
	}

	/* Nav links — large, tappable, full width */
	.is-menu-open .wp-block-navigation-item a,
	.is-menu-open .wp-block-navigation-item__content {
		color: #e5e2e1 !important;
		font-size: 1.75rem !important;
		font-weight: 600 !important;
		padding: 1.25rem 0 !important;
		display: block !important;
		width: 100% !important;
		text-decoration: none !important;
		font-family: var(--wp--preset--font-family--headline) !important;
	}

	.is-menu-open .wp-block-navigation-item a:hover,
	.is-menu-open .wp-block-navigation-item__content:hover {
		color: #c5c0ff !important;
	}

	/* Remove the ::after underline inside mobile overlay */
	.is-menu-open .wp-block-navigation-item a::after {
		display: none !important;
	}

	/* Hide search, subscribe button in overlay if duplicated */
	.is-menu-open .curator-search,
	.is-menu-open .wp-block-search {
		display: none !important;
	}

	/* Hide search bar on mobile */
	.site-header .curator-search,
	.site-header .wp-block-search,
	.site-header form[role="search"],
	.site-header input[type="search"],
	.site-header .wp-block-search__button {
		display: none !important;
	}

	/* Fix H1 clipping on mobile */
	.hero-featured h1 {
		font-size: clamp(2rem, 10vw, 3rem) !important;
		line-height: 1.15 !important;
		word-break: break-word;
	}

	/* Fix buttons wrapping — stack vertically and prevent text overflow */
	.hero-featured .wp-block-buttons {
		flex-direction: column;
		width: 100%;
	}

	.hero-featured .wp-block-button {
		width: 100%;
	}

	.hero-featured .wp-block-button__link {
		white-space: nowrap;
		font-size: 0.875rem !important;
		padding: 0.875rem 1.5rem !important;
		text-align: center;
		width: 100%;
		box-sizing: border-box;
	}

	/* Stack hero buttons group vertically */
	.hero-featured .wp-block-group:has(.wp-block-buttons) {
		flex-direction: column;
		gap: 0.75rem;
	}

	/* Hero inline form stacks on mobile */
	.hero-inline-form {
		flex-direction: column !important;
	}

	.hero-inline-form input[type="email"] {
		width: 100% !important;
		min-width: unset !important;
	}

	.hero-inline-form button {
		width: 100% !important;
		text-align: center !important;
	}

	/* Hide orbit animation on small screens */
	.hero-orbit-container {
		display: none;
	}

	/* Article hero mobile */
	.article-hero {
		padding-top: var(--wp--preset--spacing--8) !important;
		padding-bottom: var(--wp--preset--spacing--8) !important;
	}

	.article-hero h1 {
		font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
	}

	/* Bento cards full width */
	.bento-grid .wp-block-post-template {
		grid-template-columns: 1fr !important;
	}
}

/* --- Search Icon Styling --- */
.curator-search .wp-block-search__button {
	background: transparent !important;
	border: none !important;
	color: var(--wp--preset--color--foreground-muted);
	padding: 0.5rem;
}

.curator-search .wp-block-search__button:hover {
	color: var(--wp--preset--color--primary);
}

/* --- Avatar Stack (Newsletter Landing) --- */
.avatar-stack {
	display: flex;
}

.avatar-stack > * {
	margin-left: -1rem;
}

.avatar-stack > *:first-child {
	margin-left: 0;
}

/* --- Logo Hover Animation --- */
.site-header .wp-block-site-title a,
.site-footer .wp-block-site-title a {
	display: inline-block;
	position: relative;
	transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), letter-spacing 0.4s ease, color 0.3s ease, filter 0.4s ease, text-shadow 0.4s ease;
}

.site-header .wp-block-site-title a:hover,
.site-footer .wp-block-site-title a:hover {
	transform: scale(1.08) translateY(-2px);
	letter-spacing: 0.03em;
	filter: drop-shadow(0 0 16px rgba(197, 192, 255, 0.5));
	text-shadow: 0 0 20px rgba(197, 192, 255, 0.3);
}

.site-header .wp-block-site-title a:active,
.site-footer .wp-block-site-title a:active {
	transform: scale(0.97);
}

/* --- Nav Link Hover & Active States --- */
.site-header .wp-block-navigation-item a {
	position: relative;
	transition: color 0.3s ease;
}

.site-header .wp-block-navigation-item a:hover {
	color: var(--wp--preset--color--primary) !important;
}

.site-header .wp-block-navigation-item a:active {
	color: var(--wp--preset--color--secondary) !important;
}

.site-header .wp-block-navigation-item a::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--wp--preset--color--primary), var(--wp--preset--color--secondary));
	transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
	border-radius: 2px;
}

.site-header .wp-block-navigation-item a:hover::after {
	width: 100%;
}

.site-header .wp-block-navigation-item.current-menu-item a,
.site-header .wp-block-navigation-item.current-menu-ancestor a {
	color: var(--wp--preset--color--primary) !important;
}

.site-header .wp-block-navigation-item.current-menu-item a::after {
	width: 100%;
}

/* --- Post Featured Image Overflow --- */
.wp-block-post-featured-image {
	overflow: hidden;
}

/* ==========================================================================
   Orbiting Rings Animation — Hero
   ========================================================================== */

.hero-orbit-container {
	position: relative;
	width: 100%;
	aspect-ratio: 1;
	max-width: 500px;
	margin: 0 auto;
}

.hero-orbit-ring {
	position: absolute;
	border-radius: 50%;
	border: 1px solid rgba(197, 192, 255, 0.12);
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.hero-orbit-ring--1 {
	width: 65%;
	height: 65%;
	animation: orbit-spin 20s linear infinite;
}

.hero-orbit-ring--2 {
	width: 82%;
	height: 82%;
	border-color: rgba(125, 255, 162, 0.08);
	animation: orbit-spin 30s linear infinite reverse;
}

.hero-orbit-ring--3 {
	width: 100%;
	height: 100%;
	border-color: rgba(197, 192, 255, 0.06);
	animation: orbit-spin 45s linear infinite;
}

/* Tilted elliptical rings */
.hero-orbit-ring--4 {
	width: 55%;
	height: 90%;
	border-color: rgba(140, 131, 243, 0.10);
	animation: orbit-spin 25s linear infinite reverse;
	transform: translate(-50%, -50%) rotateY(60deg);
}

.hero-orbit-ring--5 {
	width: 75%;
	height: 95%;
	border-color: rgba(125, 255, 162, 0.06);
	animation: orbit-spin 35s linear infinite;
	transform: translate(-50%, -50%) rotateY(-45deg) rotateX(15deg);
}

/* Orbiting dots */
.hero-orbit-dot {
	position: absolute;
	border-radius: 50%;
	top: 50%;
	left: 50%;
}

.hero-orbit-dot--1 {
	width: 10px;
	height: 10px;
	background: #c5c0ff;
	box-shadow: 0 0 20px 4px rgba(197, 192, 255, 0.5), 0 0 60px 10px rgba(197, 192, 255, 0.2);
	animation: orbit-dot-1 20s linear infinite;
}

.hero-orbit-dot--2 {
	width: 7px;
	height: 7px;
	background: #7dffa2;
	box-shadow: 0 0 16px 3px rgba(125, 255, 162, 0.5), 0 0 48px 8px rgba(125, 255, 162, 0.15);
	animation: orbit-dot-2 30s linear infinite reverse;
}

.hero-orbit-dot--3 {
	width: 5px;
	height: 5px;
	background: #8c83f3;
	box-shadow: 0 0 14px 3px rgba(140, 131, 243, 0.6), 0 0 40px 8px rgba(140, 131, 243, 0.2);
	animation: orbit-dot-3 25s linear infinite;
}

.hero-orbit-dot--4 {
	width: 4px;
	height: 4px;
	background: #c5c0ff;
	box-shadow: 0 0 12px 2px rgba(197, 192, 255, 0.4);
	animation: orbit-dot-4 35s linear infinite reverse;
}

.hero-orbit-dot--5 {
	width: 6px;
	height: 6px;
	background: #7dffa2;
	box-shadow: 0 0 14px 3px rgba(125, 255, 162, 0.4);
	animation: orbit-dot-5 45s linear infinite;
}

/* Center core */
.hero-orbit-core {
	position: absolute;
	width: 18%;
	height: 18%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(140, 131, 243, 0.25) 0%, rgba(140, 131, 243, 0.05) 60%, transparent 70%);
	animation: core-pulse 4s ease-in-out infinite;
}

.hero-orbit-core::after {
	content: '';
	position: absolute;
	width: 35%;
	height: 35%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: rgba(197, 192, 255, 0.6);
	box-shadow: 0 0 30px 10px rgba(197, 192, 255, 0.3), 0 0 80px 30px rgba(140, 131, 243, 0.15);
}

/* Ambient glow behind the whole animation */
.hero-orbit-container::before {
	content: '';
	position: absolute;
	width: 60%;
	height: 60%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: radial-gradient(circle, rgba(140, 131, 243, 0.08) 0%, transparent 70%);
	filter: blur(40px);
	pointer-events: none;
}

/* Keyframes */
@keyframes orbit-spin {
	from { transform: translate(-50%, -50%) rotate(0deg); }
	to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes orbit-dot-1 {
	from { transform: rotate(0deg)   translateX(calc(65% / 2 * 1.53)) rotate(0deg); }
	to   { transform: rotate(360deg) translateX(calc(65% / 2 * 1.53)) rotate(-360deg); }
}

@keyframes orbit-dot-2 {
	from { transform: rotate(0deg)   translateX(calc(82% / 2 * 1.53)) rotate(0deg); }
	to   { transform: rotate(-360deg) translateX(calc(82% / 2 * 1.53)) rotate(360deg); }
}

@keyframes orbit-dot-3 {
	from { transform: rotate(45deg)  translateX(calc(55% / 2 * 1.53)) rotate(-45deg); }
	to   { transform: rotate(405deg) translateX(calc(55% / 2 * 1.53)) rotate(-405deg); }
}

@keyframes orbit-dot-4 {
	from { transform: rotate(120deg)  translateX(calc(75% / 2 * 1.53)) rotate(-120deg); }
	to   { transform: rotate(-240deg) translateX(calc(75% / 2 * 1.53)) rotate(240deg); }
}

@keyframes orbit-dot-5 {
	from { transform: rotate(200deg)  translateX(calc(100% / 2 * 1.53)) rotate(-200deg); }
	to   { transform: rotate(560deg)  translateX(calc(100% / 2 * 1.53)) rotate(-560deg); }
}

@keyframes core-pulse {
	0%, 100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
	50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.1); }
}

/* (mobile orbit handled in main responsive block above) */
