/* Nahang Shell 0.3 — dark baseline, local typography and responsive hardening. */
@font-face {
	font-family: "Vazirmatn";
	src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2");
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
}

:root {
	--font-ui: Vazirmatn, IRANSansX, "Yekan Bakh", Tahoma, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	--font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body,
button,
input,
textarea,
select {
	font-family: var(--font-ui);
}

body {
	font-kerning: normal;
	font-synthesis: none;
}

h1,
h2,
h3,
p,
a,
button,
label,
li {
	overflow-wrap: break-word;
}

h1,
h2,
h3 {
	text-wrap: balance;
}

p {
	text-wrap: pretty;
}

input,
textarea,
select {
	font-size: max(16px, 1em);
}

body[data-theme="dark"] {
	color-scheme: dark;
}

body[data-theme="dark"] .site-header:not(.is-scrolled) {
	background: linear-gradient(180deg, rgba(5, 8, 13, 0.9), rgba(5, 8, 13, 0));
}

body[data-theme="dark"] .site-nav__list .sub-menu {
	border-color: #2a3749;
	background: rgba(12, 18, 28, 0.97);
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

body[data-theme="dark"] .site-nav__list .sub-menu a:hover {
	background: #162337;
}

body[data-theme="dark"] .cart-link > span {
	border-color: #0b1119;
}

body[data-theme="dark"] .commerce-shell {
	background: linear-gradient(180deg, #08111d 0, #080c12 440px);
}

body[data-theme="dark"] .commerce-intro,
body[data-theme="dark"] .woocommerce ul.products li.product,
body[data-theme="dark"] .woocommerce-page ul.products li.product,
body[data-theme="dark"] .woocommerce div.product,
body[data-theme="dark"] .woocommerce-message,
body[data-theme="dark"] .woocommerce-info,
body[data-theme="dark"] .woocommerce-error,
body[data-theme="dark"] .woocommerce table.shop_table,
body[data-theme="dark"] .woocommerce-checkout-review-order {
	border-color: #293648;
	background: #101722;
	color: #f5f8fc;
}

body[data-theme="dark"] .woocommerce ul.products li.product a img,
body[data-theme="dark"] .woocommerce div.product div.images img {
	background: #0a1018;
}

body[data-theme="dark"] .woocommerce .woocommerce-ordering select,
body[data-theme="dark"] .woocommerce form .form-row input.input-text,
body[data-theme="dark"] .woocommerce form .form-row textarea,
body[data-theme="dark"] .woocommerce form .form-row select,
body[data-theme="dark"] .woocommerce .quantity .qty {
	border-color: #303e51;
	background: #0a111a;
	color: #f7f9fc;
}

body[data-theme="dark"] .woocommerce a.remove {
	color: #ff6f7a !important;
}

.site-header__inner,
.hero__grid,
.diagnostic__grid,
.evaluated__grid,
.infrastructure__grid,
.brand-story__grid,
.request-grid {
	min-width: 0;
}

.site-nav__list a,
.button,
.icon-button,
.theme-switch {
	touch-action: manipulation;
}

.hero-system__core > div,
.hero-system__metrics > span,
.chapter-copy,
.chapter-heading,
.digital__head,
.service-layer > div {
	min-width: 0;
}

.section-image,
.hero__image {
	height: auto;
}

@media (max-width: 1180px) {
	.site-nav {
		display: none;
	}

	.menu-toggle {
		display: grid;
	}

	.site-nav.is-open {
		position: fixed;
		z-index: 1001;
		display: block;
		inset: 0;
		padding: calc(var(--header) + 45px) clamp(22px, 5vw, 58px) 120px;
		background: rgba(248, 250, 252, 0.98);
		backdrop-filter: blur(24px);
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.site-nav.is-open .site-nav__list {
		display: grid;
		align-content: start;
		gap: 0;
	}

	.site-nav.is-open .site-nav__list > li > a {
		padding: 13px 4px;
		border-bottom: 1px solid #dce4ed;
		font-size: clamp(18px, 2.4vw, 23px);
	}

	body[data-theme="dark"] .site-nav.is-open {
		background: rgba(7, 11, 17, 0.985);
	}

	body[data-theme="dark"] .site-nav.is-open .site-nav__list > li > a {
		border-color: #263244;
	}
}

@media (max-width: 900px) {
	.hero__grid {
		grid-template-columns: 1fr;
	}

	.hero__copy {
		max-width: 760px;
	}

	.hero__visual {
		width: min(100%, 650px);
		margin-inline: auto;
	}

	.footer-cta h2 {
		font-size: clamp(42px, 10vw, 76px);
	}
}

@media (max-width: 780px) {
	:root {
		--header: 68px;
	}

	.site-header__inner {
		gap: 8px;
	}

	.site-header__actions {
		margin-right: auto;
	}

	.brand {
		gap: 8px;
	}

	.brand__mark {
		width: 39px;
		height: 39px;
		border-radius: 12px;
	}

	.brand__type strong {
		font-size: 15px;
	}

	.brand__type small {
		display: none;
	}

	.hero {
		padding-top: calc(var(--header) + 38px);
	}

	.hero__copy .button-row {
		display: grid;
		grid-template-columns: 1fr;
	}

	.hero__copy .button {
		width: 100%;
	}

	.hero-system {
		padding: 12px;
		border-radius: 24px;
		transform: none;
	}

	.hero-system__core {
		gap: 15px;
		padding: 18px;
	}

	.hero-system__core img {
		width: 54px;
		height: 54px;
	}

	.hero-system__core strong {
		font-size: clamp(18px, 5vw, 24px);
	}

	.hero-system__core span {
		font-size: 7px;
		line-height: 1.5;
	}

	.hero-system__metrics > span {
		padding: 12px 10px;
	}

	.intent-list,
	.knowledge-grid,
	.engineering-stage__steps {
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.service-layer,
	.knowledge-card,
	.request-card,
	.diagnostic-board,
	.commerce-intro {
		border-radius: 18px;
	}

	.form-nav {
		flex-wrap: wrap;
	}

	.form-nav .button {
		flex: 1 1 140px;
	}

	.woocommerce table.shop_table_responsive,
	.entry-content table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
	}
}

@media (max-width: 520px) {
	.shell {
		width: calc(100% - 28px);
	}

	.site-header__actions {
		gap: 5px;
	}

	.icon-button,
	.theme-switch,
	.menu-toggle {
		width: 40px;
		height: 40px;
	}

	.custom-logo {
		max-width: 132px;
		max-height: 42px;
	}

	.hero h1 {
		font-size: clamp(35px, 10.6vw, 45px);
		line-height: 1.16;
	}

	.eyebrow,
	.chapter-label {
		letter-spacing: 0.06em;
		line-height: 1.8;
	}

	.trust-cues {
		grid-template-columns: 1fr;
	}

	.hero__visual {
		min-height: 300px;
	}

	.hero-system__top {
		font-size: 7px;
	}

	.hero-system__core {
		align-items: flex-start;
	}

	.hero-system__metrics {
		gap: 6px;
	}

	.hero-system__metrics small {
		font-size: 7px;
	}

	.choice-grid,
	.form-field-grid,
	.quality-grid,
	.footer-grid {
		grid-template-columns: 1fr;
	}

	.quality-grid span,
	.quality-grid span:nth-child(2) {
		border-left: 0;
		border-bottom: 1px solid #1d2b3e;
	}

	.footer-grid > div:last-child {
		grid-column: auto;
	}

	.deep-dock {
		right: 8px;
		left: 8px;
		height: 66px;
		padding: 7px 5px;
		border-radius: 20px;
	}

	.deep-dock a {
		font-size: 7px;
	}
}

@media (max-width: 360px) {
	.brand__type {
		display: none;
	}

	.hero h1 {
		font-size: 34px;
	}

	.hero-system__core img {
		width: 46px;
		height: 46px;
	}
}
