@charset "utf-8";

/* Orken — responsive layer (mobile-first overrides for legacy layout) */

:root {
	--orken-purple: #662d91;
	--orken-purple-dark: #2d0e45;
	--orken-green: #579e29;
	--orken-green-dark: #24450e;
	--orken-bg: #faf7fc;
	--orken-card-shadow: 0 2px 10px rgba(45, 14, 69, 0.1);
	--orken-radius: 10px;
	--tap-min: 44px;
	/* App shell chrome — portrait & landscape bases, scaled up on large viewports */
	--mobile-top-nav: 44px;
	--mobile-bottom-nav: 48px;
	--page-brochure-bar: 200px;
	--app-shell-max: 1120px;
	--shell-ease: 0.35s ease;
	/* Layout ratio tiers (width ÷ height):
	   stacked — max-aspect-ratio: 4/3  (phones & tablets upright)
	   split   — min-aspect-ratio: 4/3  (landscape-ratio viewports) */
}

@media (min-width: 768px) {
	:root {
		--mobile-top-nav: 50px;
		--mobile-bottom-nav: 52px;
		--page-brochure-bar: 168px;
	}
}

@media (min-width: 1200px) {
	:root {
		--mobile-top-nav: 56px;
		--mobile-bottom-nav: 56px;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

img {
	max-width: 100%;
	height: auto;
}

/* ── Site header & nav (all viewports) ── */
.site-header {
	position: relative;
	top: 0;
	z-index: 200;
	height: auto !important;
	min-height: 0 !important;
	padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
	background: linear-gradient(180deg, #f3e4f8 0%, #ffffff 92%) !important;
	background-image: none !important;
	box-shadow: 0 1px 0 rgba(102, 45, 145, 0.14);
}

.bodyClass.booklet .site-header,
.bodyClass.booklet #header.site-header {
	background: linear-gradient(180deg, #f3e4f8 0%, #ffffff 92%) !important;
	background-image: none !important;
	box-shadow: 0 1px 0 rgba(102, 45, 145, 0.14);
	height: auto !important;
}

.nav-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	max-width: 1020px;
	margin: 0 auto;
}

.nav-logo,
#topLogo.nav-logo {
	float: none;
	display: inline-flex;
	align-items: center;
	flex: 0 1 auto;
	width: auto;
	max-width: min(280px, 55vw);
	height: auto;
	margin: 0;
	padding: 0;
	text-align: left;
	min-width: 0;
	line-height: 0;
	text-decoration: none;
}

.nav-logo img,
#topLogo #logo {
	float: none;
	display: block;
	width: auto;
	height: 48px;
	max-width: 100%;
	margin: 0;
	object-fit: contain;
	object-position: left center;
}

.nav-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.lang-switcher ul,
ul#langMenu {
	float: none;
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	border: 2px solid var(--orken-purple);
	border-radius: 9px;
	overflow: hidden;
	background: #fff;
}

.lang-switcher li,
ul#langMenu li {
	float: none;
	width: auto;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 0;
	background: none !important;
	background-image: none !important;
	border-right: 1px solid rgba(102, 45, 145, 0.2);
	border-radius: 0;
}

.lang-switcher li:last-child,
ul#langMenu li:last-child {
	border-right: none;
}

.lang-switcher li a,
.lang-switcher li span,
ul#langMenu li a,
ul#langMenu li span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 38px;
	padding: 8px 12px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 13px;
	font-weight: bold;
	line-height: 1;
	text-decoration: none;
	color: var(--orken-purple);
	letter-spacing: 0.03em;
}

.lang-switcher li.lang-active span,
ul#langMenu li.lang-active span {
	background: var(--orken-purple);
	color: #fff;
	cursor: default;
}

.lang-switcher li a:hover,
.lang-switcher li a:focus-visible,
ul#langMenu li a:hover,
ul#langMenu li a:focus-visible {
	background: rgba(102, 45, 145, 0.1);
	color: var(--orken-purple-dark);
	outline: none;
}

.lang-switcher li a:active,
ul#langMenu li a:active {
	background: var(--orken-purple);
	color: #fff;
}

.nav-home,
a#homeLink.nav-home {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 8px 14px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 13px;
	font-weight: bold;
	text-decoration: none;
	color: var(--orken-purple);
	background: #fff;
	border: 2px solid var(--orken-purple);
	border-radius: 9px;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease;
}

.nav-home:hover,
.nav-home:focus-visible,
a#homeLink.nav-home:hover {
	background: var(--orken-purple);
	color: #fff;
	outline: none;
}

@media (min-width: 901px) {
	.site-header {
		padding: 10px 20px 12px;
	}

	.nav-logo img,
	#topLogo #logo {
		height: 54px;
	}

	.lang-switcher li a,
	.lang-switcher li span,
	ul#langMenu li a,
	ul#langMenu li span {
		min-width: 48px;
		min-height: 40px;
		padding: 10px 14px;
		font-size: 14px;
	}

	.nav-home,
	a#homeLink.nav-home {
		min-height: 40px;
		padding: 10px 16px;
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.site-header {
		padding-left: 12px;
		padding-right: 12px;
	}

	.nav-bar {
		gap: 8px;
	}

	.nav-logo,
	#topLogo.nav-logo {
		max-width: min(180px, 48vw);
	}

	.nav-logo img,
	#topLogo #logo {
		height: 36px;
	}

	.lang-switcher li a,
	.lang-switcher li span,
	ul#langMenu li a,
	ul#langMenu li span {
		min-width: 40px;
		min-height: 44px;
		padding: 8px 10px;
		font-size: 12px;
	}

	.nav-home,
	a#homeLink.nav-home {
		min-height: 44px;
		padding: 8px 10px;
		font-size: 12px;
	}
}

@media (max-width: 320px) {
	.nav-home,
	a#homeLink.nav-home {
		padding: 8px;
		font-size: 11px;
	}
}


/* ── Fluid container (tablet) ── */
@media (max-width: 1020px) {
	body {
		overflow-x: hidden;
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
	}

	.bodyClass #container,
	#mainContent {
		width: 100%;
		max-width: 100%;
	}

	#mainContent {
		background-size: 100% auto;
	}
}

/* ── Mobile & small tablet ── */
@media (max-width: 900px) {
	body {
		background-image: none;
		background-color: var(--orken-bg);
	}

	body.booklet {
		background: #3a3a3a;
	}

	.bodyClass #container {
		background: transparent;
	}

	/* Header overrides handled by global .site-header nav styles above */

	/* Main content shell — skip pages with dedicated shells */
	.bodyClass:not(.home):not(.page2) #mainContent {
		position: relative;
		padding: 16px 14px 28px;
		min-height: 0 !important;
		background-image: none !important;
		background-color: #fff;
		border-radius: 16px 16px 0 0;
		margin-top: 4px;
	}

	.booklet #mainContent {
		background: #4d4d4d;
		border-radius: 0;
		margin-top: 0;
		padding: 8px 8px 0;
	}

	/* Sub navigation */
	.sub-nav {
		margin: 0 -4px 16px;
	}

	.page2 #sub {
		float: none;
		position: relative;
		top: auto;
		right: auto;
		width: 100%;
		height: auto;
		margin: 0;
		padding: 0;
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		gap: 4px;
		border-bottom: 2px solid #ece4f2;
	}

	.page2 #sub::-webkit-scrollbar {
		display: none;
	}

	.page2 ul#sub li,
	body.page2.ru ul#sub li,
	body.page2.kk ul#sub li {
		float: none;
		flex: 1 0 auto;
		margin: 0;
		padding: 10px 14px;
		min-height: var(--tap-min);
		display: flex;
		align-items: center;
		justify-content: center;
		border-top: none !important;
		border-bottom: 3px solid transparent;
		border-radius: 8px 8px 0 0;
		font-size: 14px;
		white-space: nowrap;
	}

	.page2 ul#sub li a {
		padding: 4px 0;
	}

	.page2 ul#sub li:hover,
	.aboutUs ul#sub li.aboutus,
	.contact ul#sub li.contact,
	.projects ul#sub li.projects {
		border-top: none !important;
		border-bottom-color: var(--orken-purple);
		background: rgba(102, 45, 145, 0.06);
	}

	/* Home — layout owned by home-page.css (mobile-first landing) */

	/* Inner pages (about, contact, projects) */
	.page2 #mainContent {
		display: flex;
		flex-direction: column;
	}

	.page2 #left,
	.aboutUs #left,
	.contact #left,
	.projects #left {
		float: none;
		width: 100%;
		height: auto;
		min-height: 0;
		background-image: none !important;
		order: 1;
	}

	.page2 #left #box {
		position: relative;
		top: auto;
		left: auto;
		width: 100%;
		height: auto;
		margin: 0 0 12px;
		padding: 20px 18px;
		text-align: center;
		background-image: none !important;
		background: linear-gradient(135deg, #f8f0fc 0%, #ede0f5 100%);
		border-radius: var(--orken-radius);
		border: 1px solid #e0d0ec;
	}

	.page2 #left #box h1 {
		font-size: 20px;
		margin-bottom: 8px;
		color: var(--orken-purple-dark);
	}

	.page2 #left #box .lightPink {
		font-size: 16px;
		line-height: 1.4;
	}

	.page2 #right,
	.aboutUs #right,
	.contact #right,
	.projects #right,
	body.aboutUs.ru #right,
	body.aboutUs.kk #right,
	body.contact.ru #right,
	body.contact.kk #right {
		float: none;
		position: relative;
		right: auto;
		top: auto !important;
		width: 100%;
		margin: 0;
		padding: 0;
		background: none;
		order: 2;
	}

	.page2 #right #greenBox,
	body.aboutUs.ru #right #greenBox,
	body.aboutUs.kk #right #greenBox,
	body.contact.ru #right #greenBox,
	body.contact.kk #right #greenBox,
	.projects #right #greenBox {
		float: none;
		width: 100%;
		min-height: 0;
		margin: 0;
		padding: 18px 16px;
		font-size: 15px;
		line-height: 1.55;
		color: #fff;
		background-image: none !important;
		background: linear-gradient(160deg, var(--orken-green) 0%, #3d7018 100%);
		border-radius: var(--orken-radius);
		box-shadow: var(--orken-card-shadow);
	}

	.page2 #right #greenBox h1 {
		font-size: 18px;
		margin: 0 0 12px;
		color: #fff;
	}

	.page2 #right #greenBox p {
		margin: 0 0 12px;
	}

	.page2 #right #greenBox a {
		color: #e8ffd4;
		text-decoration: underline;
	}

	/* Brochure link grids */
	.brochure-menu,
	.page2 #links,
	.projects #links {
		position: relative !important;
		top: auto !important;
		width: 100% !important;
		height: auto !important;
		margin: 20px 0 0 !important;
		padding: 18px 0 8px !important;
		background-image: none !important;
		border-top: 2px solid #ece4f2;
		order: 3;
	}

	.brochure-menu h1,
	.page2 #links h1,
	.projects #links h1 {
		float: none;
		width: auto;
		margin: 0 0 16px;
		text-align: center;
		font-size: 18px;
		color: var(--orken-purple);
	}

	.brochure-menu ul,
	.page2 #links ul,
	.projects #links ul {
		float: none;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.brochure-menu ul li,
	.page2 #links ul li,
	.projects #links ul li {
		float: none;
		width: 100% !important;
		height: auto !important;
		min-height: 100px;
		margin: 0 !important;
		padding: 72px 8px 12px !important;
		display: flex;
		align-items: flex-end;
		justify-content: center;
		text-align: center;
		background-size: 64px auto !important;
		background-position: center 12px !important;
		background-repeat: no-repeat !important;
		border-radius: var(--orken-radius);
		background-color: #f8f4fb;
		border: 1px solid #e8ddf0;
		box-shadow: var(--orken-card-shadow);
	}

	.brochure-menu ul li a,
	.page2 #links ul li a,
	.projects #links ul li a {
		font-size: 11px !important;
		line-height: 1.3;
		color: var(--orken-green-dark) !important;
		font-weight: bold;
		display: block;
		width: 100%;
	}

	/* Contact form */
	.contact-form .form-row {
		margin-bottom: 14px;
	}

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

	.contact-form input[type="text"],
	.contact-form input[type="email"],
	.contact-form textarea,
	#contactFrom input[type="text"],
	#contactFrom input[type="email"],
	#contactFrom textarea,
	body.contact.ru #right #greenBox input[type="text"],
	body.contact.kk #right #greenBox input[type="text"],
	body.contact.ru #right #greenBox textarea,
	body.contact.kk #right #greenBox textarea {
		width: 100%;
		max-width: 100%;
		padding: 12px;
		font-size: 16px;
		font-family: inherit;
		border: 1px solid rgba(255, 255, 255, 0.45);
		border-radius: 8px;
		background: rgba(255, 255, 255, 0.95);
		color: #222;
		-webkit-appearance: none;
		appearance: none;
	}

	.contact-form textarea,
	#contactFrom textarea {
		min-height: 120px;
		resize: vertical;
	}

	.contact-form .form-note {
		margin: 8px 0 0;
		font-size: 13px;
		opacity: 0.9;
	}

	#contactFrom table,
	#contactFrom tbody,
	#contactFrom tr,
	#contactFrom td {
		display: block;
		width: 100%;
	}

	#contactFrom td {
		padding: 0 0 12px;
	}

	#submit {
		display: block;
		width: 160px;
		max-width: 100%;
		height: 44px;
		margin: 8px auto 0;
		cursor: pointer;
		touch-action: manipulation;
	}

	.contactStatus.success {
		border-radius: 8px;
	}

	/* Booklet layout — see /css/booklet.css */
	.booklet #mainContent.booklet-view {
		width: 100%;
		padding: 0;
		border-radius: 0;
	}

	/* Footer */
	.bodyClass #footer {
		background-image: none !important;
		background: var(--orken-purple-dark);
		padding: 16px;
		padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	}

	.bodyClass #footer p {
		font-size: 12px;
		line-height: 1.5;
	}
}

/* ── Small phones ── */
@media (max-width: 400px) {
	.brochure-menu ul,
	.page2 #links ul,
	.projects #links ul {
		grid-template-columns: 1fr;
	}

	.brochure-menu ul li,
	.page2 #links ul li,
	.projects #links ul li {
		min-height: 80px;
		padding-top: 60px !important;
	}
}

/* ── App shell: fixed top nav + bottom tabs (all viewports except booklet) ── */
.mobile-tab-bar {
	display: none;
}

.bodyClass:not(.booklet) .site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	padding: calc(4px + env(safe-area-inset-top, 0px)) 12px 4px;
	background: linear-gradient(180deg, #f3e4f8 0%, #ffffff 92%) !important;
	box-shadow: 0 1px 0 rgba(102, 45, 145, 0.12);
}

.bodyClass:not(.booklet) .nav-bar {
	min-height: var(--mobile-top-nav);
	max-width: var(--app-shell-max);
	gap: 8px;
	transition: min-height var(--shell-ease), gap var(--shell-ease);
}

.bodyClass:not(.booklet) .nav-logo,
.bodyClass:not(.booklet) #topLogo.nav-logo {
	max-width: min(200px, 42vw);
	transition: max-width var(--shell-ease);
}

.bodyClass:not(.booklet) .nav-logo img,
.bodyClass:not(.booklet) #topLogo #logo {
	height: clamp(28px, 4vw, 42px);
	transition: height var(--shell-ease);
}

.bodyClass:not(.booklet) .lang-switcher li a,
.bodyClass:not(.booklet) .lang-switcher li span,
.bodyClass:not(.booklet) ul#langMenu li a,
.bodyClass:not(.booklet) ul#langMenu li span {
	min-width: clamp(32px, 4.5vw, 42px);
	min-height: clamp(32px, 4.5vw, 38px);
	padding: clamp(5px, 0.9vw, 8px) clamp(7px, 1.1vw, 12px);
	font-size: clamp(10px, 1.3vw, 13px);
	font-family: system-ui, -apple-system, "Segoe UI", Verdana, Arial, sans-serif;
}

.bodyClass:not(.booklet) .lang-switcher ul,
.bodyClass:not(.booklet) ul#langMenu {
	border-width: 1.5px;
	border-radius: 8px;
}

/* Bottom tabs handle primary navigation */
.bodyClass:not(.booklet) .nav-home,
.bodyClass:not(.booklet) a#homeLink.nav-home {
	display: none !important;
}

.bodyClass:not(.booklet) #container {
	padding-top: calc(var(--mobile-top-nav) + env(safe-area-inset-top, 0px) + 4px);
	padding-bottom: calc(var(--mobile-bottom-nav) + env(safe-area-inset-bottom, 0px) + 4px);
}

.bodyClass.booklet #container {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.bodyClass:not(.booklet) .mobile-tab-bar {
	display: flex;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 300;
	margin: 0;
	padding: 0;
	padding-bottom: env(safe-area-inset-bottom, 0px);
	background: #fff;
	border-top: 1px solid rgba(102, 45, 145, 0.14);
	box-shadow: 0 -4px 20px rgba(45, 14, 69, 0.08);
}

.bodyClass:not(.booklet) .mobile-tab {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: var(--mobile-bottom-nav);
	padding: 4px 4px 6px;
	text-decoration: none;
	color: #888;
	font-family: system-ui, -apple-system, "Segoe UI", Verdana, Arial, sans-serif;
	font-size: clamp(9px, 1.2vw, 11px);
	font-weight: 600;
	line-height: 1.1;
	text-align: center;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	transition: color 0.15s ease, background 0.15s ease;
}

.bodyClass:not(.booklet) .mobile-tab-icon {
	width: clamp(18px, 2.5vw, 22px);
	height: clamp(18px, 2.5vw, 22px);
	flex-shrink: 0;
}

.bodyClass:not(.booklet) .mobile-tab-label {
	display: block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bodyClass:not(.booklet) .mobile-tab.active {
	color: var(--orken-purple);
}

.bodyClass:not(.booklet) .mobile-tab.active .mobile-tab-icon {
	stroke-width: 2.2;
}

.bodyClass:not(.booklet) .mobile-tab:active {
	background: rgba(102, 45, 145, 0.06);
}

.bodyClass:not(.booklet):not(.home):not(.page2) #mainContent {
	border-radius: 12px 12px 0 0;
}

.bodyClass:not(.booklet) #footer {
	margin-bottom: 0;
}

/* Sub-nav replaced by bottom tabs */
.bodyClass:not(.booklet) .sub-nav {
	display: none !important;
}

#brochures {
	scroll-margin-top: calc(var(--mobile-top-nav) + env(safe-area-inset-top, 0px) + 12px);
}

@media (min-width: 768px) {
	.bodyClass:not(.booklet) .site-header {
		padding: calc(8px + env(safe-area-inset-top, 0px)) clamp(16px, 3vw, 28px) 8px;
	}

	.bodyClass:not(.booklet) .nav-bar {
		gap: 12px;
	}
}

@media (max-width: 360px) {
	.mobile-tab-label {
		font-size: 9px;
	}

	.mobile-tab-icon {
		width: 20px;
		height: 20px;
	}
}

/* ── Orientation: compact chrome on short wide-ratio viewports ── */
@media (min-aspect-ratio: 4/3) and (max-height: 520px) {
	:root {
		--mobile-top-nav: 40px;
		--mobile-bottom-nav: 44px;
		--page-brochure-bar: 112px;
		--home-mobile-cover-bar: 88px;
	}

	.bodyClass:not(.booklet) .site-header {
		padding-top: calc(4px + env(safe-area-inset-top, 0px));
		padding-bottom: 4px;
	}

	.bodyClass:not(.booklet) .nav-logo img,
	.bodyClass:not(.booklet) #topLogo #logo {
		height: 28px;
	}

	.bodyClass:not(.booklet) .mobile-tab {
		padding: 4px 2px 6px;
		gap: 1px;
	}
}

@media (min-aspect-ratio: 4/3) and (min-width: 568px) and (min-height: 521px) {
	:root {
		--page-brochure-bar: 168px;
		--home-mobile-cover-bar: clamp(92px, 14vh, 120px);
	}
}

/* Landscape frame — keep bottom nav present but visually secondary */
@media (min-aspect-ratio: 4/3) and (min-width: 568px) {
	.bodyClass:not(.booklet) .mobile-tab-bar {
		background: rgba(255, 255, 255, 0.92);
		border-top-color: rgba(102, 45, 145, 0.1);
		box-shadow: 0 -2px 12px rgba(45, 14, 69, 0.05);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
	}

	.bodyClass:not(.booklet) .mobile-tab {
		gap: 1px;
		padding: 4px 4px 6px;
		color: rgba(45, 14, 69, 0.52);
		font-size: 10px;
	}

	.bodyClass:not(.booklet) .mobile-tab-icon {
		width: 20px;
		height: 20px;
	}

	.bodyClass:not(.booklet) .mobile-tab.active {
		color: var(--orken-purple);
	}
}

/* Tall-ratio tablets (e.g. iPad portrait) — scaled chrome */
@media (max-aspect-ratio: 4/3) and (min-width: 768px) {
	:root {
		--mobile-top-nav: 52px;
		--mobile-bottom-nav: 54px;
		--home-mobile-cover-bar: clamp(296px, 36vh, 392px);
		--page-brochure-bar: clamp(140px, 14vh, 180px);
	}

	.bodyClass:not(.booklet) .site-header {
		padding: calc(10px + env(safe-area-inset-top, 0px)) clamp(24px, 4vw, 40px) 10px;
	}

	.bodyClass:not(.booklet) .nav-bar {
		gap: 14px;
	}

	.bodyClass:not(.booklet) .nav-logo,
	.bodyClass:not(.booklet) #topLogo.nav-logo {
		max-width: min(260px, 36vw);
	}

	.bodyClass:not(.booklet) .nav-logo img,
	.bodyClass:not(.booklet) #topLogo #logo {
		height: 52px;
	}

	.bodyClass:not(.booklet) .lang-switcher li a,
	.bodyClass:not(.booklet) .lang-switcher li span,
	.bodyClass:not(.booklet) ul#langMenu li a,
	.bodyClass:not(.booklet) ul#langMenu li span {
		min-width: 48px;
		min-height: 42px;
		padding: 10px 14px;
		font-size: 14px;
	}

	.bodyClass:not(.booklet) .mobile-tab {
		gap: 4px;
		padding: 8px 6px 10px;
		font-size: 12px;
	}

	.bodyClass:not(.booklet) .mobile-tab-icon {
		width: 26px;
		height: 26px;
	}
}
