/*
 * Adventiga — brand details theme.json cannot express.
 * Tokens come from theme.json: --wp--preset--color--*, --wp--custom--color--*, --wp--preset--spacing--*.
 */

:root {
	--adv-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 26'%3E%3Cpolygon points='0,0 22,13 0,26 0,19.4 10.9,13 0,6.6'/%3E%3C/svg%3E");
	--adv-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
	--adv-ease: var(--wp--custom--motion--ease, cubic-bezier(0, 0, 0.2, 1));
	--adv-duration: var(--wp--custom--motion--duration, 150ms);
}

html { -webkit-text-size-adjust: 100%; }
body { text-wrap: pretty; }
h1, h2, h3, h4, h5, h6 { text-wrap: pretty; margin: 0; }
p { margin: 0; }

/* Focus: 2px cyan ring, 2px offset, everywhere. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--cyan);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Body copy never runs wider than 65ch. */
.wp-block-post-content > p,
.wp-block-post-content > ul,
.wp-block-post-content > ol { max-width: 65ch; }

/* Muted text helper used by patterns. */
.has-ink-muted-color a { color: inherit; }

/* Line heights per preset size (theme.json sets sizes only). */
.has-xs-font-size { line-height: 1.34; }
.has-sm-font-size { line-height: 1.43; }
.has-base-font-size { line-height: 1.5; }
.has-lg-font-size { line-height: 1.4; }
.has-xl-font-size { line-height: 1.28; }
.has-xxl-font-size { line-height: 1.16; }
.has-xxxl-font-size { line-height: 1.13; }
.has-display-font-size { line-height: 1.06; }
p.has-lg-font-size { max-width: 52ch; }

/* Headings at these sizes keep the tight tracking. */
h1, h2, h3, h4, h5, h6, .wp-block-post-title, .wp-block-site-title { letter-spacing: -0.02em; }

/* Generic chevron helper (pseudo-element). */
.adv-chevron::after,
.adv-chevron::before {
	content: "";
	display: inline-block;
	width: 0.5em;
	height: 0.6em;
	flex-shrink: 0;
	background: var(--wp--preset--color--cyan);
	-webkit-mask: var(--adv-chevron) center / contain no-repeat;
	mask: var(--adv-chevron) center / contain no-repeat;
	vertical-align: -0.02em;
	transition: transform var(--adv-duration) var(--adv-ease);
}

/* ---------- Template parts ---------- */
/* No root block gap between template parts: header, main and footer butt up. */
.wp-site-blocks > main.wp-block-group,
footer.wp-block-template-part { margin-block-start: 0; }

/* ---------- Header ---------- */
.adv-header {
	border-bottom: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--paper);
}
.adv-header > .adv-header__row {
	min-height: var(--wp--custom--layout--header-height, 72px);
	align-items: center;
	flex-wrap: nowrap;
}
.adv-header .wp-block-site-logo img {
	height: 24px;
	width: auto;
	display: block;
}
.adv-header .wp-block-navigation { margin-right: auto; }
.adv-header .wp-block-navigation .wp-block-navigation-item__content { padding: 10px 0; }

/* Navigation collapses below 1024px (brand breakpoint), not at core's 600px. */
@media (max-width: 1023px) {
	.adv-header .wp-block-site-logo { margin-right: auto; }
	.adv-header .wp-block-navigation { margin-right: 0; order: 10; }
	.adv-header .wp-block-navigation .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none; }
	.adv-header .wp-block-navigation .wp-block-navigation__responsive-container-open { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; margin-right: -10px; }
	.adv-header > .adv-header__row { min-height: 64px; gap: 12px; }
	.adv-header .wp-block-site-logo img { height: 20px; }
}

/* Full-screen ink overlay with white 31/800 links. */
.adv-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 32px clamp(20px, 5.56vw, 80px) 48px;
}
.adv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 56px;
	gap: 16px;
}
.adv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--xxl);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.16;
	padding: 4px 0;
}
.adv-header .wp-block-navigation__responsive-container-close {
	top: 20px;
	right: clamp(20px, 5.56vw, 80px);
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
}

/* ---------- Footer ---------- */
/* Logo on the ink background: flip the dark mark to light, keep the cyan chevron. */
.adv-footer .wp-block-site-logo img {
	filter: invert(1) hue-rotate(180deg);
	height: 26px;
	width: auto;
	display: block;
}
.adv-footer .wp-block-navigation.is-vertical .wp-block-navigation-item__content {
	padding: 6px 0;
	font-weight: 400;
	color: var(--wp--preset--color--ink-light);
}
.adv-footer .wp-block-navigation.is-vertical .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--paper);
	text-decoration: underline;
}
.adv-footer__bottom {
	border-top: 1px solid var(--wp--custom--color--ink-700);
}
.adv-footer__bottom a { color: inherit; font-weight: 400; }
.adv-footer__bottom a:hover { color: var(--wp--preset--color--paper); }

/* Wordmark: site title + cyan chevron. */
.is-style-wordmark a::after,
.is-style-wordmark:not(:has(a))::after {
	content: "";
	display: inline-block;
	width: 0.6em;
	height: 0.7em;
	margin-left: 2px;
	background: var(--wp--preset--color--cyan);
	-webkit-mask: var(--adv-chevron) center / contain no-repeat;
	mask: var(--adv-chevron) center / contain no-repeat;
	vertical-align: -0.02em;
}

/* ---------- Section styles (Group "Styles" panel) ---------- */
.is-style-section-inverse {
	color: var(--wp--preset--color--paper);
}
.is-style-section-inverse .is-style-card {
	background: var(--wp--custom--color--ink-800);
	border-color: var(--wp--custom--color--ink-700);
	color: var(--wp--preset--color--paper);
}
.is-style-section-inverse .is-style-avatar {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}
.is-style-section-inverse .is-style-step-number {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}
.is-style-section-inverse .has-ink-muted-color { color: var(--wp--preset--color--ink-light) !important; }

/* ---------- Blog cards ---------- */
.adv-post-card {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	overflow: hidden;
	background: var(--wp--preset--color--paper);
	height: 100%;
}
.adv-post-card .wp-block-post-featured-image img { border-radius: 0; }
.adv-post-card .wp-block-post-title { font-size: var(--wp--preset--font-size--xl); line-height: 1.28; }
.adv-post-card .wp-block-post-title a { color: inherit; font-weight: 800; }
.adv-post-card .wp-block-post-title a:hover { text-decoration: none; color: var(--wp--preset--color--cyan-text); }

/* Single post/page prose. */
.adv-prose > * { margin-left: 0; max-width: 65ch; }
.adv-prose > * + * { margin-top: 24px; }
.adv-prose h2 { margin-top: 48px; }
.adv-prose h3 { margin-top: 32px; }
.adv-prose a { text-decoration: underline; }

/* Reduced motion. */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
}

/* Footer: wordmark and contact links stay in the text colour, not link cyan. */
.adv-footer .wp-block-site-title a,
.adv-footer .wp-block-site-title a:hover { color: inherit; text-decoration: none; }
.adv-footer p a { color: inherit; font-weight: 400; }
.adv-footer p a:hover { color: var(--wp--preset--color--paper); text-decoration: underline; }
.is-style-wordmark { text-transform: lowercase; }

/* "Start a project" inside the mobile overlay only: accent button, full width. */
.adv-header .wp-block-navigation .adv-nav-cta { display: none; }
.adv-header .wp-block-navigation__responsive-container.is-menu-open .adv-nav-cta { display: flex; width: 100%; margin-top: 16px; }
.adv-header .wp-block-navigation__responsive-container.is-menu-open .adv-nav-cta .wp-block-navigation-item__content {
	display: flex;
	width: 100%;
	justify-content: center;
	min-height: 52px;
	padding: 15px 20px;
	border-radius: 4px;
	background: var(--wp--preset--color--cyan);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 20px;
}
.adv-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { width: 100%; align-self: stretch; }
.adv-header .wp-block-navigation__responsive-container.is-menu-open .adv-nav-cta { align-self: stretch; }
.adv-header .wp-block-navigation__responsive-container.is-menu-open .adv-nav-cta .wp-block-navigation-item__content { height: 52px; box-sizing: border-box; align-items: center; }

/* Calendly embed on the contact page. */
.adv-calendly { background: var(--wp--preset--color--paper); border: 1px solid var(--wp--preset--color--border); border-radius: 8px; overflow: hidden; }
