/*
 * Site chrome: skip link, sticky header + nav pill, menu overlay, footer, homepage loader.
 * Ported from design/design/html/home-desktop.html (.hdr, .menu, footer.dk, .loader) and home-mobile.html.
 * Shared classes (.btn*, .arw, .wrap, .g12, .gridbg, .art, .lk*, .flink, .d2, upIn) live in base.css.
 *
 * Header collapse: scroll-driven animations on scroll(root) when supported and motion is allowed;
 * otherwise assets/js/header.js toggles .is-scrolled after 120 px (html.no-sda or reduced motion).
 */

/* Skip link (core's automatic block-theme skip link, target #main) */
html .skip-link.screen-reader-text:focus {
	top: 16px;
	left: 16px;
	z-index: 100001;
	padding: 14px 18px;
	border: 1px solid var(--ink);
	border-radius: 4px;
	background: var(--y);
	color: var(--ink);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

/* Header */
.site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	height: 96px;
	margin-bottom: -96px;
	line-height: normal;
	pointer-events: none;
}

.wp-site-blocks > .site-header + *,
.wp-site-blocks > .site-footer {
	margin-block-start: 0;
}

:is(.site-header, .site-footer) :is(.wp-block-group, .wp-block-buttons, .wp-block-list) > * {
	margin-block: 0;
}

.hdr-in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 96px;
}

.site-header .logo,
.site-header .navpill {
	pointer-events: auto;
}

.logo {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: -14px;
	padding: 10px 14px;
	border-radius: 5px;
	color: var(--ink);
}

.logo:hover {
	color: var(--ink);
}

.logo svg {
	flex: none;
}

.logo .lw {
	display: flex;
	align-items: center;
	font-size: 24px;
	letter-spacing: -0.035em;
	white-space: nowrap;
}

.logo .lan,
.mlogo .lan,
.ft-logo .lan {
	font-weight: 600;
}

.logo .lsep {
	width: 1px;
	height: 18px;
	margin-left: 10px;
	background: currentColor;
	opacity: 0.3;
}

.logo .lag {
	max-width: 120px;
	margin-left: 10px;
}

.logo .lag,
.logo .lsep {
	overflow: hidden;
}

.navpill {
	display: flex;
	align-items: center;
	padding: 4px;
	border-radius: 6px;
	background: var(--black);
}

.navpill :focus-visible,
.menu :focus-visible,
.site-footer :focus-visible {
	outline: 2px solid var(--y);
	outline-offset: 2px;
}

.nav-links {
	display: flex;
	align-items: center;
	max-width: 640px;
	margin: 0;
	overflow: hidden;
	white-space: nowrap;
}

.nav-links a {
	position: relative;
	display: flex;
	align-items: center;
	height: 44px;
	padding: 0 14px;
	color: var(--cream);
	font-size: 16px;
	font-weight: 500;
}

.nav-links a:hover {
	color: var(--cream);
}

.nav-links a::after {
	content: "";
	position: absolute;
	right: 14px;
	bottom: 10px;
	left: 14px;
	height: 1px;
	background: var(--y);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.45s var(--ease);
}

.nav-links a:hover::after,
.nav-links a[aria-current]::after {
	transform: scaleX(1);
	transform-origin: left;
}

.burger {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 52px;
	height: 44px;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: none;
	color: var(--cream);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.burger:hover {
	color: var(--cream);
}

.burger span {
	display: block;
	flex: none;
	width: 18px;
	height: 1.5px;
	background: currentColor;
	transition: transform 0.35s var(--ease);
}

.burger span:nth-child(2) {
	display: none;
}

.burger:hover span:first-child {
	transform: translateX(3px);
}

.burger:hover span:last-child {
	transform: translateX(-3px);
}

.hdr-cta {
	flex: none;
	margin-left: 6px;
}

.hdr-cta .cta-short {
	display: none;
}

/* Collapsed header: class fallback (header.js) */
.site-header.is-scrolled .logo {
	background-color: color-mix(in srgb, var(--cream) 94%, transparent);
	box-shadow: 0 0 0 1px rgba(20, 19, 19, 0.08), 0 10px 30px rgba(0, 0, 0, 0.08);
}

.site-header.is-scrolled .logo .lag,
.site-header.is-scrolled .logo .lsep {
	max-width: 0;
	margin-left: 0;
	opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {

	.logo,
	.logo .lag,
	.logo .lsep,
	.nav-links,
	.site-header .burger {
		transition: max-width 0.5s var(--ease), width 0.5s var(--ease), margin 0.5s var(--ease), opacity 0.3s, visibility 0.5s, background-color 0.3s, box-shadow 0.3s;
	}
}

@media (min-width: 1201px) {

	.site-header .burger {
		width: 0;
		opacity: 0;
		visibility: hidden;
	}

	.site-header.is-scrolled .nav-links {
		max-width: 0;
		opacity: 0;
		visibility: hidden;
	}

	.site-header.is-scrolled .burger {
		width: 52px;
		opacity: 1;
		visibility: visible;
	}
}

/* Collapsed header: scroll-driven */
@keyframes navCollapse {
	0% {
		max-width: 640px;
		opacity: 1;
	}

	55% {
		opacity: 0;
	}

	100% {
		max-width: 0;
		opacity: 0;
		visibility: hidden;
	}
}

@keyframes burgerIn {
	from {
		width: 0;
		opacity: 0;
		visibility: hidden;
	}

	to {
		width: 52px;
		opacity: 1;
		visibility: visible;
	}
}

@keyframes logoChip {
	from {
		background-color: color-mix(in srgb, var(--cream) 0%, transparent);
		box-shadow: 0 0 0 0 rgba(20, 19, 19, 0), 0 0 0 rgba(0, 0, 0, 0);
	}

	to {
		background-color: color-mix(in srgb, var(--cream) 94%, transparent);
		box-shadow: 0 0 0 1px rgba(20, 19, 19, 0.08), 0 10px 30px rgba(0, 0, 0, 0.08);
	}
}

@keyframes lagOut {
	from {
		max-width: 120px;
		margin-left: 10px;
		opacity: 1;
	}

	to {
		max-width: 0;
		margin-left: 0;
		opacity: 0;
	}
}

@supports (animation-timeline: scroll()) {

	@media (prefers-reduced-motion: no-preference) and (min-width: 601px) {

		html:not(.no-sda) .site-header .logo {
			animation: logoChip linear both;
			animation-timeline: scroll(root);
			animation-range: 120px 280px;
		}

		html:not(.no-sda) .site-header .logo :is(.lag, .lsep) {
			animation: lagOut linear both;
			animation-timeline: scroll(root);
			animation-range: 120px 280px;
		}
	}

	@media (prefers-reduced-motion: no-preference) and (min-width: 1201px) {

		html:not(.no-sda) .site-header .nav-links {
			animation: navCollapse linear both;
			animation-timeline: scroll(root);
			animation-range: 0px 260px;
		}

		html:not(.no-sda) .site-header .burger {
			animation: burgerIn linear both;
			animation-timeline: scroll(root);
			animation-range: 160px 300px;
		}
	}

	@media (prefers-reduced-motion: no-preference) and (max-width: 600px) {

		html:not(.no-sda) .site-header .logo {
			animation: logoChip linear both;
			animation-timeline: scroll(root);
			animation-range: 80px 200px;
		}
	}
}

@media (max-width: 1200px) {

	.nav-links {
		display: none;
	}
}

@media (max-width: 600px) {

	.site-header {
		height: 72px;
		margin-bottom: -72px;
	}

	.hdr-in {
		height: 72px;
		padding: 0 16px 0 20px;
	}

	.logo {
		gap: 9px;
		margin-left: -10px;
		padding: 8px 10px;
	}

	.logo svg {
		width: 26px;
		height: 18px;
	}

	.logo .lw {
		font-size: 20px;
	}

	.logo .lsep {
		height: 15px;
		margin-left: 8px;
	}

	.logo .lag {
		margin-left: 8px;
	}

	/* Mobile keeps "Agency"; only the chip appears on scroll. */
	.site-header.is-scrolled .logo .lag,
	.site-header.is-scrolled .logo .lsep {
		max-width: 120px;
		margin-left: 8px;
		opacity: 1;
	}

	.site-header.is-scrolled .logo .lsep {
		opacity: 0.3;
	}

	/* Inner pages show only the mark + "ANPS" on mobile (front page: "ANPS | Agency"). */
	body:not(.home) .site-header .logo :is(.lag, .lsep) {
		display: none;
	}

	.navpill {
		gap: 4px;
		border-radius: 5px;
	}

	.burger {
		gap: 3.7px;
		width: 44px;
		height: 40px;
	}

	.burger span {
		width: 16px;
		height: 1.3px;
	}

	.burger span:nth-child(2) {
		display: block;
	}

	.hdr-cta {
		margin-left: 0;
	}

	.hdr-cta .cta-full {
		display: none;
	}

	.hdr-cta .cta-short {
		display: inline-flex;
		gap: 10px;
		height: 40px;
		padding: 0 12px;
		font-size: 14px;
	}
}

/* Menu overlay */
.menu {
	position: fixed;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: auto;
	border: 0;
	background: var(--dark);
	color: var(--cream);
	line-height: normal;
	pointer-events: auto;
}

.menu[open] {
	display: flex;
	flex-direction: column;
	animation: menuIn 0.8s var(--ease) both;
}

.menu::backdrop {
	background: transparent;
}

html:has(.menu[open]) {
	overflow: hidden;
}

.menu a,
.menu a:hover {
	color: var(--cream);
}

@keyframes menuIn {
	from {
		clip-path: inset(0 0 100% 0);
	}

	to {
		clip-path: inset(0 0 0 0);
	}
}

.mtop {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	height: 96px;
}

.mlogo {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 24px;
	letter-spacing: -0.035em;
}

.mlogo .lan {
	margin-right: -2px;
}

.mclose {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--cream) 30%, transparent);
	border-radius: 6px;
	background: none;
	color: var(--cream);
	cursor: pointer;
	transition: transform 0.5s var(--ease), border-color 0.3s;
	-webkit-appearance: none;
	appearance: none;
}

.mclose:hover {
	border-color: var(--cream);
	transform: rotate(90deg);
}

.mbody {
	flex-grow: 1;
	align-items: end;
	padding-bottom: 64px;
	border-top: 1px solid var(--lined);
}

.mnav {
	display: flex;
	grid-column: 1 / span 7;
	flex-direction: column;
}

.mlink {
	display: flex;
	align-items: baseline;
	gap: 28px;
	font-size: clamp(48px, 5vw, 96px);
	line-height: 1.08;
	letter-spacing: -0.05em;
	animation: upIn 0.9s var(--out) both;
}

.mlink .mn {
	width: 28px;
	color: color-mix(in srgb, var(--cream) 50%, transparent);
	font-size: 16px;
	letter-spacing: 0;
}

.menu a.mlink:hover,
.menu a.mlink[aria-current] {
	color: var(--y);
}

.m1 {
	animation-delay: 0.25s;
}

.m2 {
	animation-delay: 0.31s;
}

.m3 {
	animation-delay: 0.37s;
}

.m4 {
	animation-delay: 0.43s;
}

.m5 {
	animation-delay: 0.49s;
}

.m6 {
	animation-delay: 0.55s;
}

.mlink.mc {
	grid-column: 9 / span 4;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	font-size: 18px;
	line-height: normal;
	letter-spacing: -0.01em;
	animation-delay: 0.61s;
}

.mc p {
	margin: 0;
	color: var(--cream2);
}

.mc-mail {
	font-size: 28px;
	letter-spacing: -0.025em;
}

.mc .btn-l {
	margin-top: 12px;
}

@media (prefers-reduced-motion: reduce) {

	.menu[open],
	.mlink {
		animation: none;
	}
}

@media (max-width: 600px) {

	.mtop {
		height: 72px;
		padding: 0 16px 0 20px;
		border-bottom: 1px solid var(--lined);
	}

	.mlogo {
		gap: 9px;
		font-size: 20px;
	}

	.mlogo svg {
		width: 26px;
		height: 18px;
	}

	.mclose {
		width: 48px;
		height: 48px;
	}

	.mclose svg {
		width: 16px;
		height: 16px;
	}

	.mbody {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		justify-content: space-between;
		padding: 32px 20px;
		border-top: 0;
	}

	.mnav {
		gap: 4px;
	}

	.mlink {
		gap: 16px;
		font-size: 48px;
		line-height: 1.1;
	}

	.mlink .mn {
		width: 22px;
		font-size: 13px;
	}

	.mlink.mc {
		align-items: stretch;
		gap: 14px;
		font-size: 16px;
	}

	.mc .mc-q,
	.mc .mc-addr {
		display: none;
	}

	.mc-mail {
		font-size: 22px;
		letter-spacing: -0.02em;
	}

	.mc .btn-l {
		margin-top: 0;
	}
}

/* Footer */
.site-footer {
	background: var(--black);
	color: var(--cream);
	line-height: normal;
}

.site-footer a,
.site-footer a:hover {
	color: var(--cream);
}

.ft {
	display: flex;
	flex-direction: column;
	gap: 120px;
	padding-top: 56px;
	padding-bottom: 40px;
}

.ft-top {
	align-items: start;
}

.ft-nav {
	grid-column: 1 / span 8;
}

.ft-nav p {
	margin: 0;
	font-size: clamp(44px, 3.3vw, 64px);
	line-height: 1.15;
}

.ft-side {
	display: flex;
	grid-column: 10 / span 3;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 0;
	font-size: 16px;
	list-style: none;
}

.ft-bot {
	align-items: end;
}

.ft-meta {
	display: grid;
	grid-column: 1 / span 5;
	grid-template-columns: auto auto;
	justify-content: space-between;
	row-gap: 24px;
	font-size: 15px;
}

.ft-meta p {
	margin: 0;
	color: var(--cream2);
}

.ft-sister {
	grid-column: 1 / -1;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--lined);
}

.ft-sister a {
	margin-left: 6px;
	font-weight: 500;
}

.ft-art.gridbg {
	position: relative;
	grid-column: 7 / span 6;
	height: 400px;
	background-color: var(--black);
}

.ft-map {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.ft-card {
	position: absolute;
	top: 110px;
	left: 16%;
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: min(420px, 60%);
	padding: 24px 28px;
	border-radius: 2px;
	background: var(--py);
	color: var(--ink);
}

.ft-card p {
	margin: 0;
}

.site-footer .ft-card a {
	color: var(--ink);
}

.ft-cl {
	color: var(--ink2);
	font-size: 14px;
}

.ft-cv {
	font-size: 21px;
	letter-spacing: -0.02em;
}

.ft-brand {
	position: absolute;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: min(360px, 50%);
	height: 176px;
	padding: 24px 28px;
	background: var(--y);
	color: var(--ink);
}

.ft-brand p {
	margin: 0;
}

.ft-tag {
	font-size: 14px;
}

.ft-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 28px;
	letter-spacing: -0.035em;
}

/* Inner pages: no contact art, one meta row (© · sister brand · credit) */
.ft:not(:has(.ft-art)) {
	gap: 96px;
}

.ft-bot:not(:has(.ft-art)) {
	display: block;
}

.ft-bot:not(:has(.ft-art)) .ft-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 24px;
	border-top: 1px solid var(--lined);
}

.ft-bot:not(:has(.ft-art)) .ft-sister {
	order: 2;
	padding: 0;
	border: 0;
}

.ft-bot:not(:has(.ft-art)) .ft-copy {
	order: 1;
}

.ft-bot:not(:has(.ft-art)) .ft-made {
	order: 3;
}

@media (max-width: 600px) {

	.ft {
		gap: 48px;
		padding: 40px 20px 28px;
	}

	.ft-top {
		display: flex;
		flex-direction: column;
		gap: 32px;
	}

	.ft-nav p {
		font-size: 32px;
		line-height: 1.2;
	}

	.ft-nav br {
		display: none;
	}

	.ft-side {
		gap: 10px;
		font-size: 15px;
	}

	.ft-bot {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
	}

	.ft-art.gridbg {
		order: -1;
		height: 300px;
		background-size: 20px 20px;
	}

	.ft-map {
		display: none;
	}

	.ft-card {
		top: 24px;
		right: 32px;
		left: 0;
		gap: 4px;
		width: auto;
		padding: 18px 20px;
	}

	.ft-cl {
		font-size: 13px;
	}

	.ft-cv {
		font-size: 17px;
		letter-spacing: -0.01em;
	}

	.ft-brand {
		width: 230px;
		height: 120px;
		padding: 16px 18px;
	}

	.ft-tag {
		font-size: 12px;
	}

	.ft-logo {
		gap: 8px;
		font-size: 20px;
	}

	.ft-logo svg {
		width: 26px;
		height: 18px;
	}

	.ft-meta {
		font-size: 12px;
	}

	.ft-sister {
		padding-bottom: 16px;
		font-size: 14px;
	}

	.ft:not(:has(.ft-art)) {
		gap: 40px;
	}

	.ft:not(:has(.ft-art)) .ft-side {
		display: none;
	}

	.ft-bot:not(:has(.ft-art)) .ft-meta {
		display: grid;
		row-gap: 14px;
		padding-top: 20px;
		font-size: 13px;
	}

	.ft-bot:not(:has(.ft-art)) .ft-sister {
		order: 0;
		font-size: 13px;
	}
}

/* Homepage loader (anps/loader) */
.loader {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--dark);
	pointer-events: none;
	animation: loaderOut 0.45s var(--ease) 0.75s both;
}

.loader svg {
	max-width: 90vw;
	height: auto;
}

.loader .gl {
	fill: none;
	stroke: color-mix(in srgb, var(--cream) 22%, transparent);
	stroke-width: 1;
	stroke-dasharray: 480;
	animation: gdraw 0.5s var(--ease) both;
}

.loader .mark {
	transform-box: fill-box;
	transform-origin: center;
	animation: markIn 0.4s var(--out) 0.35s both;
}

.loader .gt {
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	fill: color-mix(in srgb, var(--cream) 70%, transparent);
}

@keyframes loaderOut {
	to {
		clip-path: inset(0 0 100% 0);
		visibility: hidden;
	}
}

@keyframes gdraw {
	from {
		stroke-dashoffset: 480;
	}

	to {
		stroke-dashoffset: 0;
	}
}

@keyframes markIn {
	from {
		opacity: 0;
		transform: scale(0.6);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

html.has-intro {
	--ld-base: 0.75s;
}

html.no-intro .loader {
	display: none;
}

@media (prefers-reduced-motion: reduce) {

	.loader {
		display: none;
	}
}

/* Editor previews */
.editor-styles-wrapper .site-header .burger,
.editor-styles-wrapper .burger {
	width: 52px;
	opacity: 1;
	visibility: visible;
	animation: none;
}

.loader-ph {
	padding: 12px 16px;
	border: 1px dashed var(--line);
	color: var(--ink2);
	font-size: 14px;
}

/* The footer part is edited without its <footer class="site-footer"> wrapper. */
.editor-styles-wrapper .ft {
	background: var(--black);
	color: var(--cream);
	line-height: normal;
}

.editor-styles-wrapper .ft a {
	color: var(--cream);
}

.editor-styles-wrapper .ft .ft-card a {
	color: var(--ink);
}

.editor-styles-wrapper .ft .rv {
	opacity: 1;
	transform: none;
	animation: none;
}

.editor-styles-wrapper .ft-art > :is(.ft-card, .ft-brand) {
	position: absolute;
}
