/* ==========================================================================
   UNVEIL: main stylesheet. Tokens -> base -> layout -> header -> content ->
   footer -> utilities. Block CSS lives next to each block and loads on demand.
   ========================================================================== */

/* ---------- Tokens ------------------------------------------------------- */
:root {
	--u-container: 1240px;
	--u-content: 760px;
	--u-gutter: clamp(1rem, 4vw, 2rem);
	--u-radius: 14px;
	--u-header-h: 76px;
	--u-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--u-shadow: 0 10px 40px rgba(10, 10, 30, 0.08);
}
body {
	--u-bg: var(--wp--preset--color--base, #fff);
	--u-fg: var(--wp--preset--color--contrast, #0b0b14);
	--u-accent: var(--wp--preset--color--accent, #6d4aff);
	--u-accent-2: var(--wp--preset--color--accent-2, #00b8d9);
	--u-surface: var(--wp--preset--color--surface, #f5f5fa);
	--u-muted: var(--wp--preset--color--muted, #5b5b70);
	--u-border: var(--wp--preset--color--border, #e4e4ee);
	--u-link: var(--u-accent);
}
body.scheme-dark {
	--wp--preset--color--base: #0a0a10;
	--wp--preset--color--contrast: #f3f3f8;
	--wp--preset--color--surface: #12121b;
	--wp--preset--color--muted: #a1a1b5;
	--wp--preset--color--border: #262634;
	--u-link: color-mix(in srgb, var(--u-accent) 62%, #fff);
	color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
	body.scheme-auto {
		--wp--preset--color--base: #0a0a10;
		--wp--preset--color--contrast: #f3f3f8;
		--wp--preset--color--surface: #12121b;
		--wp--preset--color--muted: #a1a1b5;
		--wp--preset--color--border: #262634;
		--u-link: color-mix(in srgb, var(--u-accent) 62%, #fff);
		color-scheme: dark;
	}
}

/* ---------- Base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--u-header-h) + 1rem); }
body {
	margin: 0;
	background: var(--u-bg);
	color: var(--u-fg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}
img, video, canvas, svg { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--u-link); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 0.6em; text-wrap: balance; }
p { margin: 0 0 1.2em; }
hr { border: 0; border-top: 1px solid var(--u-border); margin: 2.5rem 0; }
:focus-visible { outline: 3px solid var(--u-accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--u-accent) 30%, transparent); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0; border: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	word-wrap: normal;
}
.skip-link:focus {
	position: fixed !important;
	top: 0.75rem; left: 0.75rem;
	z-index: 100000;
	width: auto; height: auto;
	margin: 0; padding: 0.8rem 1.2rem;
	clip-path: none; overflow: visible;
	background: var(--u-accent);
	color: #fff;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
}

/* ---------- Layout ------------------------------------------------------- */
.container {
	width: min(var(--u-container), 100% - 2 * var(--u-gutter));
	margin-inline: auto;
}
.container--narrow { width: min(var(--u-content), 100% - 2 * var(--u-gutter)); }
.site-main { display: block; outline: 0; min-height: 50vh; }
.content-grid { display: grid; gap: 3rem; padding-block: clamp(2rem, 6vw, 4rem); }
.content-grid.has-sidebar { grid-template-columns: minmax(0, 1fr) 300px; }
@media (max-width: 900px) { .content-grid.has-sidebar { grid-template-columns: 1fr; } }

/* Entry content: constrained column with wide / full alignments, no dependency
   on global-styles layout CSS. */
.entry-content > * {
	width: min(var(--u-content), 100% - 2 * var(--u-gutter));
	margin-inline: auto;
}
.entry-content > .alignwide { width: min(var(--u-container), 100% - 2 * var(--u-gutter)); }
.entry-content > .alignfull { width: 100%; max-width: none; }
.entry-content > .alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.entry-content > .alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content { padding-bottom: clamp(2rem, 6vw, 4rem); }
.entry-content > :first-child { margin-top: 0; }
body.content-narrow { --u-content: 640px; }
.content-full .entry-content > *,
.content-full .entry-content > .alignwide { width: 100%; max-width: none; }
.content-full .entry-content { padding-bottom: 0; }
.entry-content img { border-radius: var(--u-radius); }
.entry-content .wp-block-cover img,
.entry-content .wp-block-cover .wp-block-cover__image-background { border-radius: 0; }

.entry-header { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1rem, 3vw, 2rem); }
.entry-title { margin: 0; font-size: var(--wp--preset--font-size--xx-large, 3rem); letter-spacing: -0.025em; line-height: 1.08; }
.eyebrow { margin: 0 0 0.8rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--u-accent); }
.eyebrow a { text-decoration: none; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; color: var(--u-muted); font-size: 0.9rem; }
.entry-thumb { margin-block: 1rem 2.5rem; }
.entry-thumb img { width: 100%; border-radius: calc(var(--u-radius) * 1.5); }
.entry-footer { padding-bottom: 3rem; }
.tags a { display: inline-block; margin: 0 0.4rem 0.4rem 0; padding: 0.25rem 0.8rem; border: 1px solid var(--u-border); border-radius: 999px; font-size: 0.85rem; text-decoration: none; color: var(--u-muted); }
.tags a:hover { border-color: var(--u-accent); color: var(--u-accent); }
.page-links { margin-block: 2rem; }
.archive-header { padding-bottom: 2rem; }
.archive-description { color: var(--u-muted); margin-top: 0.75rem; }
.not-found { padding-block: clamp(4rem, 12vw, 8rem); }

/* Cards ------------------------------------------------------------------ */
.post-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card { display: flex; flex-direction: column; overflow: hidden; background: var(--u-surface); border: 1px solid var(--u-border); border-radius: calc(var(--u-radius) * 1.4); transition: transform 0.35s var(--u-ease), box-shadow 0.35s var(--u-ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--u-shadow); }
.card__media { display: block; overflow: hidden; aspect-ratio: 10 / 7; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--u-ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 1.4rem 1.5rem 1.6rem; }
.card__title { margin: 0.5rem 0; font-size: 1.3rem; line-height: 1.25; }
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { color: var(--u-link); }
.card__excerpt { color: var(--u-muted); font-size: 0.95rem; }
.card__excerpt p { margin: 0; }

/* Pagination / nav ------------------------------------------------------- */
.pagination { margin-top: 3rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 2.75rem; height: 2.75rem; padding-inline: 0.5rem; border: 1px solid var(--u-border); border-radius: 999px; text-decoration: none; color: inherit; }
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--u-accent); border-color: var(--u-accent); color: #fff; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.post-navigation a { display: block; padding: 1rem 1.2rem; border: 1px solid var(--u-border); border-radius: var(--u-radius); text-decoration: none; color: inherit; }
.post-navigation a:hover { border-color: var(--u-accent); }
.post-navigation .nav-next { text-align: right; }
.nav-sub { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--u-muted); }

/* Forms ------------------------------------------------------------------ */
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type="number"], input[type="tel"], textarea, select {
	width: 100%;
	padding: 0.8rem 1rem;
	border: 1px solid var(--u-border);
	border-radius: 12px;
	background: var(--u-bg);
	color: inherit;
	font: inherit;
}
input:focus, textarea:focus, select:focus { border-color: var(--u-accent); }
.search-form { display: flex; gap: 0.6rem; }
.search-form .search-field { flex: 1; }

/* Buttons ---------------------------------------------------------------- */
.btn, .wp-element-button, button.button, .button {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0.7rem 1.5rem;
	border: 0; border-radius: 999px;
	background: var(--u-accent); color: #fff;
	font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
	transition: transform 0.25s var(--u-ease), box-shadow 0.25s var(--u-ease), background 0.2s;
}
.btn:hover, .wp-element-button:hover { box-shadow: 0 8px 24px color-mix(in srgb, var(--u-accent) 40%, transparent); transform: translateY(-1px); color: #fff; }
.btn--sm { min-height: 2.5rem; padding: 0.5rem 1.2rem; font-size: 0.9rem; }

.icon-btn { position: relative; display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; text-decoration: none; transition: background 0.2s; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.unveil-cart-count { position: absolute; top: 0.2rem; right: 0.1rem; min-width: 1.15rem; height: 1.15rem; padding-inline: 0.3rem; border-radius: 999px; background: var(--u-accent); color: #fff; font-size: 0.68rem; font-weight: 700; line-height: 1.15rem; text-align: center; }
.unveil-cart-count[data-count="0"] { display: none; }

/* ---------- Header ------------------------------------------------------- */
.site-header {
	--u-header-fg: var(--u-fg);
	position: relative;
	z-index: 50;
	color: var(--u-header-fg);
	background: var(--u-bg);
	background: color-mix(in srgb, var(--u-bg) 84%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid var(--u-border);
	transition: transform 0.4s var(--u-ease), background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.site-header a { color: inherit; }
.site-header[data-state="scrolled"] { box-shadow: 0 6px 30px rgba(10, 10, 30, 0.06); }

body[class*="header-sticky-"]:not(.header-sticky-none) .site-header { position: fixed; inset: 0 0 auto 0; }
body.header-sticky-none.header-transparent .site-header { position: absolute; inset: 0 0 auto 0; }
body[class*="header-sticky-"]:not(.header-sticky-none):not(.header-transparent) .site-main { padding-top: var(--u-header-h); }
body.admin-bar[class*="header-sticky-"]:not(.header-sticky-none) .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar[class*="header-sticky-"]:not(.header-sticky-none) .site-header { top: 46px; } }
.site-header[data-state="hidden"]:not(:focus-within) { transform: translateY(-110%); }

.header-transparent .site-header[data-state="top"] { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.header-tone-light .site-header[data-state="top"] { --u-header-fg: #fff; }
.header-tone-dark .site-header[data-state="top"] { --u-header-fg: #0b0b14; }
.header-hidden .site-main { padding-top: 0 !important; }
.is-landing .site-main { padding-top: 0 !important; }

.topbar { background: var(--u-accent); color: #fff; font-size: 0.85rem; text-align: center; }
.topbar__inner { padding-block: 0.45rem; }

.site-header__inner {
	display: grid;
	align-items: center;
	gap: 1rem 2rem;
	min-height: 4.5rem;
	grid-template-columns: auto 1fr auto;
	grid-template-areas: "brand nav actions";
}
.site-header__brand { grid-area: brand; }
.site-nav { grid-area: nav; }
.site-header__actions { grid-area: actions; display: flex; align-items: center; gap: 0.25rem; }
.site-header--logo-center .site-header__inner { grid-template-columns: 1fr auto 1fr; grid-template-areas: "nav brand actions"; }
.site-header--logo-center .site-header__brand { justify-self: center; }
.site-header--logo-center .site-header__actions { justify-self: end; }
.site-header--split .site-nav { justify-self: center; }
.site-header--split .site-header__actions { justify-self: end; }
.site-header--logo-left .site-header__actions { justify-self: end; }

.site-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; text-decoration: none; }
.custom-logo { width: auto; max-height: 3rem; }

/* Primary navigation */
.site-nav .menu { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.site-nav .menu > li { position: relative; display: flex; align-items: center; }
.site-nav .menu a { display: block; padding: 0.7rem 0.85rem; border-radius: 10px; text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-nav .menu a:hover, .site-nav .current-menu-item > a, .site-nav .current-menu-ancestor > a { background: color-mix(in srgb, currentColor 9%, transparent); }
.site-nav .submenu-toggle { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-left: -0.5rem; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.site-nav .submenu-toggle svg { width: 1rem; height: 1rem; transition: rotate 0.25s; }
.site-nav li.is-open > .submenu-toggle svg { rotate: 180deg; }

.site-nav .sub-menu {
	position: absolute; top: 100%; left: 0;
	z-index: 60;
	min-width: 14rem;
	margin: 0; padding: 0.5rem;
	list-style: none;
	background: var(--u-bg);
	color: var(--u-fg);
	border: 1px solid var(--u-border);
	border-radius: var(--u-radius);
	box-shadow: var(--u-shadow);
	opacity: 0; visibility: hidden; translate: 0 8px;
	transition: opacity 0.2s, translate 0.25s var(--u-ease), visibility 0s 0.2s;
}
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu,
.site-nav li.is-open > .sub-menu { opacity: 1; visibility: visible; translate: 0 0; transition-delay: 0s; }
.site-nav .sub-menu li { display: block; }
.site-nav .sub-menu .sub-menu { top: 0; left: 100%; }
.site-nav .sub-menu .submenu-toggle { position: absolute; right: 0.4rem; top: 0.55rem; margin: 0; rotate: -90deg; }

/* Mega menu: add the CSS class "unveil-mega" to a top-level menu item. */
.site-nav .menu > li.unveil-mega { position: static; }
.site-nav .menu > li.unveil-mega > .sub-menu {
	left: 50%; translate: -50% 8px;
	width: min(var(--u-container), 100% - 2 * var(--u-gutter));
	display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.5rem 1.5rem; padding: 1.5rem;
}
.site-nav .menu > li.unveil-mega:hover > .sub-menu,
.site-nav .menu > li.unveil-mega:focus-within > .sub-menu,
.site-nav .menu > li.unveil-mega.is-open > .sub-menu { translate: -50% 0; }
.site-nav .menu > li.unveil-mega > .sub-menu > li > a { font-weight: 700; }
.site-nav .menu > li.unveil-mega .sub-menu .sub-menu { position: static; opacity: 1; visibility: visible; translate: none; border: 0; box-shadow: none; padding: 0; min-width: 0; background: none; }
.site-nav .menu > li.unveil-mega .sub-menu .submenu-toggle { display: none; }

.nav-toggle { display: none; }
@media (max-width: 1023px) {
	.site-nav { display: none; }
	.nav-toggle { display: inline-grid; }
	.site-header__inner, .site-header--logo-center .site-header__inner, .site-header--split .site-header__inner {
		grid-template-columns: 1fr auto; grid-template-areas: "brand actions";
	}
	.site-header--logo-center .site-header__brand { justify-self: start; }
	.site-header__cta { display: none; }
}
/* no-JS fallback: show the menu stacked, hide the burger */
html:not(.unveil-js) .site-nav { display: block; grid-area: auto; }
html:not(.unveil-js) .nav-toggle { display: none; }
html:not(.unveil-js) .site-header__inner { grid-template-columns: 1fr; grid-template-areas: "brand" "nav" "actions"; }

/* ---------- Overlays (mobile drawer + search) ---------------------------- */
.overlay { position: fixed; inset: 0; z-index: 9990; visibility: hidden; pointer-events: none; }
.overlay.is-open { visibility: visible; pointer-events: auto; }
.overlay__backdrop { position: absolute; inset: 0; background: rgba(5, 5, 12, 0.6); opacity: 0; transition: opacity 0.3s; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.overlay.is-open .overlay__backdrop { opacity: 1; }
.overlay__panel { position: absolute; background: var(--u-bg); color: var(--u-fg); box-shadow: var(--u-shadow); transition: transform 0.4s var(--u-ease), opacity 0.3s; }
.overlay__close { position: absolute; top: 0.75rem; right: 0.75rem; }

.drawer .overlay__panel { top: 0; right: 0; bottom: 0; width: min(24rem, 90vw); padding: 4.5rem 1.5rem 2rem; overflow-y: auto; transform: translateX(100%); }
.drawer.is-open .overlay__panel { transform: none; }
.drawer .menu { margin: 0; padding: 0; list-style: none; }
.drawer .menu li { position: relative; }
.drawer .menu a { display: block; padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--u-border); font-size: 1.15rem; font-weight: 600; text-decoration: none; color: inherit; }
.drawer .submenu-toggle { position: absolute; right: 0; top: 0.5rem; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 0; background: none; color: inherit; cursor: pointer; }
.drawer .submenu-toggle svg { transition: rotate 0.25s; }
.drawer li.is-open > .submenu-toggle svg { rotate: 180deg; }
.drawer .sub-menu { display: none; margin: 0; padding: 0 0 0 1rem; list-style: none; }
.drawer li.is-open > .sub-menu { display: block; }
.drawer .sub-menu a { font-size: 1rem; font-weight: 500; }

.search-overlay .overlay__panel { top: 12vh; left: 50%; width: min(40rem, 92vw); padding: 2rem 1.5rem 1.5rem; border-radius: 20px; transform: translate(-50%, -16px); opacity: 0; }
.search-overlay.is-open .overlay__panel { transform: translate(-50%, 0); opacity: 1; }
.search-overlay .search-form { margin-top: 1rem; }
body.drawer-open, body.search-open { overflow: hidden; }

/* ---------- Footer ------------------------------------------------------- */
.site-footer { margin-top: clamp(3rem, 8vw, 6rem); background: var(--u-surface); border-top: 1px solid var(--u-border); }
.footer-widgets { display: grid; gap: 2.5rem; padding-block: clamp(2.5rem, 6vw, 4rem); }
.footer-widgets--cols-2 { grid-template-columns: repeat(2, 1fr); }
.footer-widgets--cols-3 { grid-template-columns: repeat(3, 1fr); }
.footer-widgets--cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .footer-widgets { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-widgets { grid-template-columns: 1fr; } }
.widget { margin-bottom: 2rem; }
.widget-title { font-size: 1rem; margin-bottom: 1rem; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: 0.3rem 0; }
.widget a { color: inherit; text-decoration: none; }
.widget a:hover { color: var(--u-link); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; border-top: 1px solid var(--u-border); color: var(--u-muted); font-size: 0.9rem; }
.footer-widgets + .footer-bottom { border-top: 1px solid var(--u-border); }
.site-footer:not(:has(.footer-widgets)) .footer-bottom { border-top: 0; }
.footer-bottom p { margin: 0; }
.menu--footer { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.menu--footer a { color: inherit; text-decoration: none; }
.menu--footer a:hover { color: var(--u-link); }

.back-to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 90; display: grid; place-items: center; width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: var(--u-accent); color: #fff; box-shadow: var(--u-shadow); cursor: pointer; opacity: 0; visibility: hidden; translate: 0 12px; transition: opacity 0.3s, translate 0.3s var(--u-ease), visibility 0s 0.3s; }
.back-to-top.is-visible { opacity: 1; visibility: visible; translate: 0 0; transition-delay: 0s; }

/* ---------- Comments ----------------------------------------------------- */
.comments-area { padding-block: 2rem 4rem; }
.comment-list { padding: 0; list-style: none; }
.comment-list .comment { margin-bottom: 1.5rem; padding: 1.25rem; border: 1px solid var(--u-border); border-radius: var(--u-radius); }
.comment-list .children { margin-top: 1.5rem; padding-left: 1.5rem; list-style: none; }
.comment-meta { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; }
.comment-author .avatar { border-radius: 50%; }
.comment-form label { display: block; margin-bottom: 0.3rem; font-weight: 600; }

/* ---------- WordPress alignment / captions ------------------------------- */
.wp-caption, figure { max-width: 100%; }
.wp-caption-text, figcaption { margin-top: 0.5rem; color: var(--u-muted); font-size: 0.875rem; }
.woo-wrap { padding-block: clamp(2rem, 6vw, 4rem); }

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