/**
 * IranDesigner 2.0.9 — focused homepage, mobile navigation and footer fixes.
 */

/* Desktop: keep the showcase in an independent, fully opaque layer and align
   its center with the geometry through the geometry's own position and size. */
@media (min-width: 1280px) {
	body.is-irandesigner-home .home-hero-art-card {
		top: calc(51% + 20px);
		left: calc(
			max(10rem, 50% - 34rem)
			+ clamp(11.875rem, 18.5vw, 17.5rem)
		);
		width: min(43vw, 46rem);
		opacity: 1;
		translate: -50% -50%;
	}
}

@media (min-width: 1500px) {
	body.is-irandesigner-home .home-hero-art-card {
		left: calc(
			max(11.5rem, 50% - 33.5rem)
			+ clamp(11.875rem, 18.5vw, 17.5rem)
		);
	}
}

/* Mobile/tablet: preserve a quiet trace of the geometry outside the content
   column, then fade it out precisely at the shared 30px content gutter. */
@media (max-width: 1279px) {
	body.is-irandesigner-home .home-hero-tech-orbit {
		--home-hero-orbit-size: clamp(17.5rem, 78vw, 23rem) !important;
		top: 43% !important;
		right: auto !important;
		left: calc(1.875rem - (var(--home-hero-orbit-size) * 0.86)) !important;
		width: var(--home-hero-orbit-size) !important;
		opacity: 0.17 !important;
		-webkit-mask-image: linear-gradient(
			to right,
			#000 0%,
			#000 58%,
			rgba(0, 0, 0, 0.58) 72%,
			transparent 86%,
			transparent 100%
		);
		mask-image: linear-gradient(
			to right,
			#000 0%,
			#000 58%,
			rgba(0, 0, 0, 0.58) 72%,
			transparent 86%,
			transparent 100%
		);
		transform: translateY(calc(-50% + 8px)) !important;
	}

	/* Align the hamburger's outside edge with the 30px page content line. */
	body.irandesigner-exact-ui nav[data-hero-nav-state]
		.public-nav-glass.public-nav-glass--mobile {
		padding-left: 0 !important;
	}
}

@media (max-width: 767px) {
	#public-mobile-menu {
		right: 1.875rem !important;
		left: 1.875rem !important;
		width: auto !important;
		max-width: none !important;
	}
}

/* Footer typography: retain hierarchy without the previous heavy black
   weights across headings, link groups, newsletter and legal navigation. */
.site-footer p.text-lg.font-black {
	font-weight: 500 !important;
}

.site-footer ul.font-bold,
.site-footer ul.font-bold a {
	font-weight: 350 !important;
}

.site-footer p.text-sm.font-bold {
	font-weight: 350 !important;
}

#site-footer .footer-newsletter-submit,
#site-footer input[type="email"] + button.footer-newsletter-submit {
	font-weight: 500 !important;
}

.site-footer .site-footer__copyright {
	font-weight: 350 !important;
}

.site-footer .site-footer__legal-link {
	font-weight: 400 !important;
}

.site-footer p.text-base {
	font-weight: 300 !important;
}

/* Portfolio archive: keep the project action compact. The generic motion
   button is a flex item, so its default stretch made the shimmer layer read as
   a full-width rectangular colour bar on hover. */
.page-template-page-portfolio
	.id-portfolio-showcase-card
	a.brand-button-motion--primary {
	align-self: flex-start !important;
	flex: 0 0 auto;
	width: max-content !important;
	max-width: 100%;
	overflow: visible !important;
	background: none !important;
	box-shadow: none !important;
}

.page-template-page-portfolio
	.id-portfolio-showcase-card
	a.brand-button-motion--primary::before {
	display: none !important;
	content: none !important;
}

.page-template-page-portfolio
	.portfolio-page
	.id-portfolio-showcase-card
	a.brand-button-motion--primary:is(:hover, :focus-visible) {
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
}

.page-template-page-portfolio
	.id-portfolio-showcase-card
	a.brand-button-motion--primary:focus-visible {
	border-radius: 0.35rem !important;
	outline: 3px solid rgb(159 77 62 / 18%);
	outline-offset: 0.28rem;
}

/* Home portfolio: reserve enough internal space for the lifted card shadow
   before the horizontal slider clips it. A compensating negative margin keeps
   the section rhythm unchanged while the shadow now dissolves naturally. */
body.is-irandesigner-home #featured-projects-slider {
	margin-bottom: -3.5rem;
	padding-bottom: 5.5rem !important;
}

body.is-irandesigner-home .home-portfolio-card {
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 88%),
		0 20px 44px -32px rgb(23 18 28 / 34%),
		0 8px 24px -20px rgb(39 103 200 / 16%) !important;
}

body.is-irandesigner-home .home-portfolio-card:hover {
	transform: translateY(-0.25rem);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 94%),
		0 30px 64px -40px rgb(23 18 28 / 40%),
		0 16px 36px -27px rgb(39 103 200 / 20%) !important;
}

@media (prefers-reduced-motion: reduce) {
	body.is-irandesigner-home .home-portfolio-card:hover {
		transform: none;
	}
}

/* Desktop header and hero showcase typography: keep the navigation calm and
   let the small slide artwork read like an editorial caption, not a headline
   competing with the real H1. */
@media (min-width: 1280px) {
	body.irandesigner-exact-ui
		nav[data-hero-nav-state]
		[data-public-nav-link-list]
		> a,
	body.irandesigner-exact-ui
		nav[data-hero-nav-state]
		[data-public-nav-link-list]
		> .relative.group
		> a,
	body.irandesigner-exact-ui
		nav[data-hero-nav-state]
		.public-nav-popover
		a {
		font-weight: 400 !important;
	}

	body.irandesigner-exact-ui
		nav[data-hero-nav-state]
		.public-nav-active-indicator {
		height: 3px !important;
	}

	body.is-irandesigner-home .home-hero-art-card__eyebrow {
		font-weight: 450 !important;
	}

	body.is-irandesigner-home .home-hero-art-card__title {
		font-size: clamp(0.8rem, 0.92vw, 0.88rem) !important;
		font-weight: 350 !important;
		line-height: 1.7 !important;
		letter-spacing: 0.005em;
	}

	body.is-irandesigner-home .home-hero-art-card__body {
		font-weight: 350 !important;
	}
}

/* Alternate homepage sections reuse the technical square grid from internal
   pages at a quieter intensity. The vertical mask prevents a hard rectangular
   hand-off into the neighbouring clean sections. */
body.is-irandesigner-home .home-alternate-grid-pattern {
	pointer-events: none;
	opacity: 0.58;
	background-image:
		linear-gradient(rgb(39 103 200 / 5.5%) 1px, transparent 1px),
		linear-gradient(90deg, rgb(39 103 200 / 5.5%) 1px, transparent 1px) !important;
	background-position: center top;
	background-size: 44px 44px !important;
	-webkit-mask-image: linear-gradient(
		to bottom,
		transparent 0%,
		#000 15%,
		#000 85%,
		transparent 100%
	);
	mask-image: linear-gradient(
		to bottom,
		transparent 0%,
		#000 15%,
		#000 85%,
		transparent 100%
	);
}

@media (max-width: 767px) {
	body.is-irandesigner-home .home-alternate-grid-pattern {
		opacity: 0.4;
		background-size: 52px 52px !important;
		-webkit-mask-image: linear-gradient(
			to bottom,
			transparent 0%,
			#000 11%,
			#000 89%,
			transparent 100%
		);
		mask-image: linear-gradient(
			to bottom,
			transparent 0%,
			#000 11%,
			#000 89%,
			transparent 100%
		);
	}
}
