/* Komachi.ir — child overrides for Axivo/Avril */

.komachi-site {
	--k-navy: #151635;
	--k-red: #f43831;
	--k-white: #ffffff;
	--k-muted: #5b5d76;
	--k-line: #e8e9ef;
	--k-soft: #f6f7fb;
	--k-font: "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-family: var(--k-font);
	color: var(--k-navy);
	background: var(--k-white);
}

.komachi-site .avril-content,
.komachi-site #content.avril-content {
	padding: 0;
	margin: 0;
	background: var(--k-white);
}

.komachi-site .breadcrumb-area,
.komachi-site #custom-header {
	display: none !important;
}

.komachi-site .wow {
	visibility: visible !important;
	animation: none !important;
}

/* Header */
.komachi-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: #ffffff !important;
	border-bottom: 1px solid var(--k-line);
	color: #151635;
}

.komachi-header__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	gap: 24px;
}

.komachi-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	flex-shrink: 0;
}

.komachi-logo__mark {
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: transparent;
	border-radius: 0;
	flex-shrink: 0;
}

.komachi-logo__mark img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
}

.komachi-logo--on-dark .komachi-logo__mark,
.komachi-footer .komachi-logo__mark {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #ffffff;
	padding: 5px;
	box-sizing: border-box;
	overflow: hidden;
}

.komachi-logo--on-dark .komachi-logo__mark img,
.komachi-footer .komachi-logo__mark img {
	object-fit: contain;
}

.komachi-logo__word {
	font-weight: 700;
	letter-spacing: 0.14em;
	color: #151635 !important;
	font-size: 15px;
}

.komachi-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.komachi-nav .menu-wrap,
.komachi-nav ul,
.komachi-footer nav .menu-wrap {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	align-items: center;
	justify-content: center;
}

.komachi-header .menu-wrap > li,
.komachi-footer .menu-wrap > li {
	float: none;
	display: inline-flex;
	margin: 0;
	padding: 0;
	background: none;
}

.komachi-nav a {
	color: #151635 !important;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	padding: 6px 0;
	position: relative;
	background: none !important;
}

.komachi-nav a:hover,
.komachi-nav .current-menu-item > a,
.komachi-nav .current_page_item > a {
	color: var(--k-navy);
}

.komachi-nav .current-menu-item > a::after,
.komachi-nav .current_page_item > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--k-red);
}

.komachi-header__tools {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-left: auto;
}

.komachi-search-toggle,
.komachi-menu-toggle {
	background: none;
	border: 0;
	color: var(--k-navy);
	cursor: pointer;
	padding: 6px;
	line-height: 1;
}

.komachi-lang {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
}

.komachi-lang__current {
	color: var(--k-navy);
}

.komachi-lang__sep,
.komachi-lang__soon,
.komachi-lang__alt {
	color: #9aa0b5;
}

.komachi-lang__soon {
	cursor: default;
}

.komachi-lang__alt {
	text-decoration: none;
	font-weight: 600;
}

.komachi-lang__alt:hover {
	color: var(--k-navy);
	text-decoration: underline;
}

.komachi-search-panel {
	display: none;
	padding: 0 24px 16px;
	max-width: 1180px;
	margin: 0 auto;
}

.komachi-search-panel.is-open {
	display: block;
}

.komachi-search-panel input {
	width: 100%;
	border: 1px solid var(--k-line);
	padding: 10px 14px;
	font: inherit;
}

.komachi-menu-toggle {
	display: none !important;
}

.komachi-mobile-drawer {
	display: none;
}

@media (max-width: 991px) {
	.komachi-nav {
		display: none;
	}
	.komachi-menu-toggle {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		gap: 6px;
		color: #151635 !important;
		font-size: 13px;
		font-weight: 600;
		margin-left: auto;
	}
	.komachi-mobile-drawer.is-open {
		display: block;
		padding: 8px 24px 20px;
		border-top: 1px solid var(--k-line);
		background: var(--k-white);
	}
	.komachi-mobile-drawer .menu-wrap,
	.komachi-mobile-drawer ul {
		list-style: none;
		margin: 0;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: 8px;
	}
	.komachi-mobile-drawer a {
		color: var(--k-navy);
		text-decoration: none;
		font-weight: 500;
	}
}

/* Layout helpers */
.komachi-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
}

.komachi-section {
	padding: 72px 0;
}

.komachi-kicker {
	color: var(--k-red);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	margin: 0 0 8px;
}

.komachi-h2 {
	font-size: 32px;
	line-height: 1.2;
	margin: 0 0 28px;
	color: var(--k-navy);
	font-weight: 700;
}

.komachi-lead {
	font-size: 16px;
	line-height: 1.7;
	color: var(--k-muted);
	max-width: 52ch;
}

.komachi-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border-radius: 4px;
	padding: 12px 20px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	font-family: inherit;
}

.komachi-btn--primary {
	background: var(--k-red);
	color: var(--k-white);
}

.komachi-btn--ghost {
	background: transparent;
	color: var(--k-white);
	border-color: rgba(255, 255, 255, 0.45);
}

.komachi-btn--light {
	background: var(--k-red);
	color: var(--k-white);
}

.komachi-link {
	color: var(--k-red);
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
}

.komachi-link:hover {
	text-decoration: underline;
}

/* Hero */
.komachi-hero {
	position: relative;
	background: var(--k-navy);
	color: var(--k-white);
	overflow: hidden;
	min-height: 460px;
}

.komachi-hero__bg {
	position: absolute;
	inset: 0;
	background:
		repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 48px),
		repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 48px),
		var(--k-navy);
}

.komachi-hero__accent {
	position: absolute;
	width: 70px;
	height: 220px;
	background: var(--k-red);
	opacity: 0.95;
}

.komachi-hero__accent--l {
	left: -18px;
	top: 40px;
	clip-path: polygon(0 0, 100% 18%, 100% 100%, 0 82%);
}

.komachi-hero__accent--r {
	right: -10px;
	top: 0;
	height: 160px;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 0 55%);
}

.komachi-hero__inner {
	position: relative;
	max-width: 1180px;
	margin: 0 auto;
	padding: 72px 24px 80px;
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
	gap: 40px;
	align-items: center;
}

.komachi-hero__visual {
	min-height: 280px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.03);
}

.komachi-hero__svg {
	display: block;
	width: 100%;
	height: auto;
}

.komachi-hero__label {
	letter-spacing: 0.18em;
	font-size: 12px;
	font-weight: 600;
	opacity: 0.9;
	margin: 0 0 18px;
}

.komachi-hero h1 {
	font-size: clamp(40px, 6vw, 64px);
	margin: 0 0 18px;
	font-weight: 700;
	line-height: 1.05;
}

.komachi-hero h1 span {
	color: var(--k-red);
}

.komachi-hero p {
	max-width: 46ch;
	line-height: 1.7;
	margin: 0 0 28px;
	color: rgba(255, 255, 255, 0.86);
}

.komachi-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.komachi-hero .komachi-link {
	color: #ffffff;
}

/* Expertise */
.komachi-expertise__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 8px;
}

.komachi-expertise__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	text-align: left;
	margin-top: 20px;
	clear: both;
}

.komachi-expertise__item {
	text-decoration: none;
	color: var(--k-navy);
	border: 1px solid var(--k-line);
	background: var(--k-soft);
	padding: 20px 18px 18px;
	min-height: 148px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.komachi-expertise__item:hover,
.komachi-card:hover,
.komachi-skill:hover {
	border-color: #d4d6e2;
}

.komachi-expertise__icon {
	width: 44px;
	height: 44px;
	border: 1px solid var(--k-line);
	background: var(--k-white);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 4px;
}

.komachi-expertise__item svg {
	width: 28px;
	height: 28px;
	color: var(--k-red);
	display: block;
}

.komachi-expertise__title {
	display: block;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.komachi-expertise__sub {
	display: block;
	font-size: 12px;
	font-weight: 500;
	color: var(--k-muted);
	line-height: 1.4;
}

@media (max-width: 991px) {
	.komachi-expertise__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.komachi-expertise__grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* Two column articles / downloads */
.komachi-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
}

.komachi-split__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}

.komachi-article {
	display: grid;
	grid-template-columns: 88px 1fr;
	gap: 16px;
	padding: 16px 0;
	border-bottom: 1px solid var(--k-line);
	text-decoration: none;
	color: inherit;
}

.komachi-article img,
.komachi-article__thumb {
	width: 88px;
	height: 64px;
	object-fit: cover;
	background: var(--k-soft);
	border-radius: 2px;
}

.komachi-article h3 {
	margin: 0 0 4px;
	font-size: 16px;
	color: var(--k-navy);
}

.komachi-article time,
.komachi-article p {
	margin: 0;
	font-size: 13px;
	color: var(--k-muted);
}

.komachi-dl {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid var(--k-line);
	text-decoration: none;
	color: inherit;
}

.komachi-dl__icon {
	width: 36px;
	height: 36px;
	color: var(--k-red);
	flex-shrink: 0;
}

.komachi-dl h3 {
	margin: 0;
	font-size: 15px;
}

.komachi-dl p {
	margin: 2px 0 0;
	font-size: 12px;
	color: var(--k-muted);
}

.komachi-dl__meta {
	margin-left: auto;
	font-size: 12px;
	color: var(--k-muted);
	text-align: right;
}

.komachi-empty {
	border: 1px dashed var(--k-line);
	padding: 28px;
	color: var(--k-muted);
	background: var(--k-soft);
}

/* About band */
.komachi-aboutband {
	background: var(--k-navy);
	color: var(--k-white);
	position: relative;
	overflow: hidden;
}

.komachi-aboutband__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 72px 24px;
	display: grid;
	grid-template-columns: 1.2fr 0.8fr 0.9fr;
	gap: 36px;
	align-items: center;
	position: relative;
	z-index: 1;
}

.komachi-aboutband h2,
.komachi-aboutband .komachi-kicker {
	color: var(--k-white);
}

.komachi-aboutband .komachi-kicker {
	color: var(--k-red);
}

.komachi-aboutband p {
	color: rgba(255, 255, 255, 0.86);
	line-height: 1.7;
}

.komachi-facts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 18px;
}

.komachi-facts li {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 12px;
	align-items: start;
}

.komachi-facts svg {
	width: 24px;
	height: 24px;
	color: var(--k-red);
}

.komachi-facts strong {
	display: block;
	font-size: 14px;
}

.komachi-facts span {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
}

.komachi-aboutband__art {
	min-height: 180px;
	background:
		repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 28px),
		repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 28px);
	border-left: 8px solid var(--k-red);
	position: relative;
	padding: 20px;
}

.komachi-identity {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.komachi-identity li {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 10px;
	align-items: center;
	color: var(--k-white);
	font-size: 13px;
	font-weight: 600;
}

.komachi-identity svg {
	width: 22px;
	height: 22px;
	color: var(--k-red);
}

.komachi-identity--light {
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin: 0 0 20px;
}

.komachi-identity--light li {
	border: 1px solid var(--k-line);
	background: var(--k-soft);
	padding: 12px 14px;
	color: var(--k-navy);
	font-size: 13px;
}

/* Projects */
.komachi-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.komachi-card {
	border: 1px solid var(--k-line);
	padding: 0;
	text-decoration: none;
	color: inherit;
	background: var(--k-white);
	min-height: 180px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.komachi-card__diagram {
	line-height: 0;
	border-bottom: 1px solid var(--k-line);
}

.komachi-card__diagram svg {
	display: block;
	width: 100%;
	height: auto;
}

.komachi-card__body {
	padding: 18px 20px 20px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.komachi-case-diagram {
	margin: 16px 0 24px;
	border: 1px solid var(--k-line);
	max-width: 760px;
}

.komachi-case-diagram svg {
	display: block;
	width: 100%;
	height: auto;
}

.komachi-card__type {
	color: var(--k-red);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 10px;
}

.komachi-card h3 {
	margin: 0 0 10px;
	font-size: 18px;
}

.komachi-card p {
	margin: 0;
	color: var(--k-muted);
	font-size: 14px;
	line-height: 1.5;
}

/* Page interiors */
.komachi-pagehero {
	padding: 48px 0 12px;
}

.komachi-pagehero h1 {
	font-size: 40px;
	margin: 0;
}

.komachi-prose {
	max-width: 760px;
}

.komachi-prose h2 {
	font-size: 24px;
	margin: 36px 0 12px;
}

.komachi-prose p,
.komachi-prose li {
	line-height: 1.75;
	color: #33354c;
}

.komachi-grid-2,
.komachi-grid-3 {
	display: grid;
	gap: 16px;
}

.komachi-grid-2 {
	grid-template-columns: 1fr 1fr;
}

.komachi-grid-3 {
	grid-template-columns: 1fr 1fr 1fr;
}

.komachi-box {
	border: 1px solid var(--k-line);
	padding: 18px 20px;
	background: var(--k-white);
}

.komachi-box h3 {
	margin: 0 0 8px;
	font-size: 16px;
}

.komachi-box__icon {
	display: inline-flex;
	width: 36px;
	height: 36px;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--k-line);
	margin-bottom: 10px;
}

.komachi-box__icon svg {
	width: 22px;
	height: 22px;
	color: var(--k-red);
}

.komachi-skill {
	position: relative;
}

.komachi-skill::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--k-red);
}

.komachi-box p,
.komachi-box ul {
	margin: 0;
	color: var(--k-muted);
	font-size: 14px;
}

.komachi-pub {
	padding: 14px 0;
	border-bottom: 1px solid var(--k-line);
	font-size: 15px;
	line-height: 1.6;
}

.komachi-pub a {
	color: var(--k-red);
}

.komachi-skills {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

/* Contact */
.komachi-contact {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
}

.komachi-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 14px;
}

.komachi-form input,
.komachi-form textarea {
	width: 100%;
	border: 1px solid var(--k-line);
	padding: 10px 12px;
	font: inherit;
	margin-bottom: 14px;
}

.komachi-hp {
	position: absolute;
	left: -9999px;
}

.komachi-form-notice {
	padding: 12px 14px;
	margin-bottom: 16px;
}

.komachi-form-notice--ok {
	background: #eef8f0;
}

.komachi-form-notice--err {
	background: #fdecec;
}

.komachi-profiles {
	list-style: none;
	padding: 0;
	margin: 16px 0 0;
}

.komachi-profiles a {
	color: var(--k-red);
	text-decoration: none;
	font-weight: 600;
}

/* Footer */
.komachi-footer {
	background: var(--k-navy);
	color: var(--k-white);
	padding: 36px 0 28px;
}

.komachi-footer__inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
	display: grid;
	grid-template-columns: 1.1fr 2fr auto;
	gap: 24px;
	align-items: center;
}

.komachi-footer .komachi-logo__word {
	color: var(--k-white);
}

.komachi-footer p {
	margin: 8px 0 0;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
}

.komachi-footer nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	justify-content: center;
}

.komachi-footer nav a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	font-size: 13px;
}

.komachi-footer__copy {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.55);
	text-align: right;
}

.komachi-social {
	display: flex;
	gap: 10px;
	margin-top: 10px;
}

.komachi-social a {
	color: var(--k-white);
	border: 1px solid rgba(255, 255, 255, 0.25);
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	text-decoration: none;
	font-size: 11px;
	font-weight: 700;
}

.komachi-site .scrollup {
	display: none !important;
}

@media (max-width: 991px) {
	.komachi-split,
	.komachi-aboutband__inner,
	.komachi-cards,
	.komachi-contact,
	.komachi-footer__inner,
	.komachi-grid-3,
	.komachi-skills {
		grid-template-columns: 1fr;
	}
	.komachi-grid-2 {
		grid-template-columns: 1fr;
	}
	.komachi-footer__copy,
	.komachi-footer nav ul {
		text-align: left;
		justify-content: flex-start;
	}
	.komachi-hero__inner {
		padding: 48px 24px 52px;
		grid-template-columns: 1fr;
		gap: 24px;
	}
	.komachi-hero__visual {
		min-height: 0;
		max-height: 220px;
		overflow: hidden;
	}
	.komachi-identity--light {
		grid-template-columns: 1fr 1fr;
	}
	.komachi-section {
		padding: 48px 0;
	}
}

@media (max-width: 420px) {
	.komachi-search-toggle {
		display: none;
	}
	.komachi-header__inner {
		padding: 12px 16px;
		gap: 10px;
	}
	.komachi-logo__mark {
		width: 38px;
		height: 38px;
	}
	.komachi-logo--on-dark .komachi-logo__mark,
	.komachi-footer .komachi-logo__mark {
		width: 42px;
		height: 42px;
	}
	.komachi-expertise__grid {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 992px) and (max-width: 1199px) {
	.komachi-cards {
		grid-template-columns: repeat(2, 1fr);
	}
	.komachi-expertise__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Persian RTL — keep the same layout system; only fix directional edges. */
html[dir="rtl"] .komachi-site,
.komachi-lang-fa {
	--k-font: "Vazirmatn", "Fira Sans", system-ui, sans-serif;
}

html[dir="rtl"] .komachi-header__tools {
	margin-left: 0;
	margin-right: auto;
}

html[dir="rtl"] .komachi-dl__meta {
	margin-left: 0;
	margin-right: auto;
	text-align: left;
}

html[dir="rtl"] .komachi-footer__copy {
	text-align: left;
}

html[dir="rtl"] .komachi-aboutband__art {
	border-left: 0;
	border-right: 8px solid var(--k-red);
}

html[dir="rtl"] .komachi-expertise__grid,
html[dir="rtl"] .komachi-expertise__item {
	text-align: right;
}

html[dir="rtl"] .komachi-kicker {
	letter-spacing: 0.08em;
}

html[dir="rtl"] .komachi-hero__label {
	letter-spacing: 0.08em;
}

html[dir="rtl"] .komachi-form input,
html[dir="rtl"] .komachi-form textarea,
html[dir="rtl"] .komachi-search-panel input {
	text-align: right;
}

@media (max-width: 991px) {
	html[dir="rtl"] .komachi-menu-toggle {
		margin-left: 0;
		margin-right: auto;
	}
	html[dir="rtl"] .komachi-footer__copy,
	html[dir="rtl"] .komachi-footer nav ul {
		text-align: right;
		justify-content: flex-start;
	}
}

