/* =========================================================================
   KSAmet · components.css — buttons, headings, cards, forms, badges
   ========================================================================= */

/* --- Buttons ----------------------------------------------------------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 15px 30px;
	font-family: var(--font-body);
	font-weight: 700; font-size: 15.5px;
	line-height: 1;
	border: 2px solid transparent;
	border-radius: var(--r-sm);
	transition: .22s var(--ease);
	white-space: nowrap;
	text-align: center;
}
.btn .icon { font-size: 19px; }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(26, 95, 180, .28); }
.btn--primary:hover { background: var(--blue-600); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(26, 95, 180, .34); }
.btn--accent { background: var(--accent); color: var(--navy-deep); box-shadow: 0 8px 20px rgba(242, 163, 15, .3); }
.btn--accent:hover { filter: brightness(1.05); transform: translateY(-2px); color: var(--navy-deep); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--sky-50); color: var(--blue-600); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.btn--outline-light:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn--lg { padding: 18px 38px; font-size: 16.5px; }
.btn--block { width: 100%; }

/* --- Section heading --------------------------------------------------- */
.eyebrow {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--font-display);
	font-weight: 600; font-size: 15px;
	text-transform: uppercase; letter-spacing: .12em;
	color: var(--blue);
	margin-bottom: 14px;
}
.eyebrow::before {
	content: ""; width: 34px; height: 2px; background: var(--blue); display: inline-block;
}
.section--dark .eyebrow { color: var(--blue-500); }
.section--dark .eyebrow::before { background: var(--blue-500); }

.section-head { max-width: 720px; margin-bottom: 46px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head p { color: var(--muted); font-size: 17px; margin-top: 8px; }
.section--dark .section-head p { color: #9fb0cd; }

/* --- Card (generic) ---------------------------------------------------- */
.card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--r);
	transition: .28s var(--ease);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: transparent; }

/* --- Media / photo placeholder (blueprint line-art) -------------------- */
.ph {
	position: relative;
	background:
		linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%);
	color: rgba(255, 255, 255, .5);
	display: grid; place-items: center;
	overflow: hidden;
}
.ph::before {
	content: "";
	position: absolute; inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
	background-size: 28px 28px;
	mask-image: radial-gradient(120% 120% at 70% 20%, #000 40%, transparent 100%);
}
.ph .icon { position: relative; font-size: 64px; stroke-width: 1.1; opacity: .8; }

/* --- Form -------------------------------------------------------------- */
.form { display: grid; gap: 16px; }
.form__row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 7px; }
.field > label { font-size: 14px; font-weight: 600; color: var(--ink); }
.input, .select, .textarea {
	width: 100%;
	padding: 14px 16px;
	font: inherit; font-size: 16px;
	color: var(--ink);
	background: #fff;
	border: 1.5px solid var(--line-strong);
	border-radius: var(--r-sm);
	transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: #9aa5bd; }
.input:focus, .select:focus, .textarea:focus {
	outline: none; border-color: var(--blue);
	box-shadow: 0 0 0 4px rgba(26, 95, 180, .12);
}
.textarea { min-height: 118px; resize: vertical; }
.select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2346516b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 5 7 9 11 5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px;
}
/* Custom styled select (JS enhances native .select) */
.cselect { position: relative; }
.cselect > .select { display: none; }
.cselect__trigger {
	width: 100%; text-align: left; cursor: pointer;
	padding: 14px 44px 14px 16px;
	font: inherit; font-size: 16px; color: var(--ink);
	background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm);
	display: flex; align-items: center; min-height: 52px;
	transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.cselect__trigger::after {
	content: ""; position: absolute; right: 16px; top: 50%; width: 14px; height: 14px;
	transform: translateY(-50%);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2346516b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 5 7 9 11 5'/%3E%3C/svg%3E") no-repeat center;
	transition: transform .22s var(--ease);
}
.cselect.is-open .cselect__trigger { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(26, 95, 180, .12); }
.cselect.is-open .cselect__trigger::after { transform: translateY(-50%) rotate(180deg); }
.cselect.is-placeholder .cselect__trigger { color: #9aa5bd; }
.cselect__list {
	position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50;
	background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
	box-shadow: var(--shadow); padding: 6px; max-height: 260px; overflow-y: auto;
	opacity: 0; visibility: hidden; transform: translateY(-6px);
	transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
}
.cselect.is-open .cselect__list { opacity: 1; visibility: visible; transform: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.cselect__opt {
	padding: 11px 14px; border-radius: var(--r-sm); cursor: pointer;
	font-size: 15px; color: var(--ink); transition: background .15s var(--ease), color .15s var(--ease);
}
.cselect__opt:hover { background: var(--sky-50); color: var(--blue); }
.cselect__opt.is-active { background: var(--blue); color: #fff; }
.field--icon .cselect__trigger { padding-left: 46px; }

/* Icon-prefixed inputs */
.field--icon { position: relative; }
.field--icon > .icon {
	position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
	font-size: 20px; color: var(--blue); pointer-events: none;
}
.field--icon .input, .field--icon .select { padding-left: 46px; }

.form__note { font-size: 13px; color: var(--muted); }
.form__note a { text-decoration: underline; }
.form__status { font-size: 15px; font-weight: 600; }
.form__status.is-ok { color: #1a8f4a; }
.form__status.is-err { color: #cc2b2b; }

.form__consent { display: grid; gap: 9px; }
.checkbox { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.checkbox input { width: 17px; height: 17px; flex: none; margin-top: 2px; accent-color: var(--blue); cursor: pointer; }
.checkbox a { color: var(--ink); text-decoration: underline; }

/* On dark backgrounds */
.form--on-dark .field > label { color: #cdd8ec; }
.form--on-dark .input, .form--on-dark .select, .form--on-dark .textarea {
	background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: #fff;
}
.form--on-dark .input::placeholder, .form--on-dark .textarea::placeholder { color: #8b9dbd; }
.form--on-dark .select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23cdd8ec' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 5 7 9 11 5'/%3E%3C/svg%3E");
}
.form--on-dark .form__note { color: #8b9dbd; }
.form--on-dark .checkbox { color: #8b9dbd; }
.form--on-dark .checkbox a { color: #cdd8ec; }

/* --- Badge / chip ------------------------------------------------------ */
.chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 5px 12px;
	font-size: 12.5px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .04em;
	color: var(--blue); background: var(--sky-50);
	border-radius: 100px;
}

/* --- Modal («Получить расчёт») ----------------------------------------- */
.modal {
	position: fixed; inset: 0; z-index: 200;
	display: grid; place-items: center; padding: 20px;
	overflow-y: auto; /* container scrolls on tiny screens, not the dialog */
	visibility: hidden; opacity: 0;
	transition: opacity .25s var(--ease), visibility 0s .25s;
}
.modal[aria-hidden="false"] { visibility: visible; opacity: 1; transition: opacity .25s var(--ease); }
.modal__overlay { position: fixed; inset: 0; background: rgba(10, 27, 58, .6); backdrop-filter: blur(3px); }
.modal__dialog {
	position: relative; width: min(460px, 100%);
	background: #fff; border-radius: var(--r-lg); padding: 34px;
	box-shadow: var(--shadow-lg);
	transform: translateY(14px) scale(.98); transition: transform .28s var(--ease);
}
.modal[aria-hidden="false"] .modal__dialog { transform: none; }
.modal__close {
	position: absolute; top: 14px; right: 14px;
	width: 40px; height: 40px; border: 0; border-radius: 50%;
	background: var(--bg-alt); color: var(--muted);
	display: grid; place-items: center; transition: .2s var(--ease);
}
.modal__close:hover { background: var(--navy); color: #fff; }
.modal__close .icon { font-size: 22px; }
.modal__head { margin-bottom: 22px; padding-right: 34px; }
.modal__head h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 24px; margin-bottom: 8px; }
.modal__head p { color: var(--muted); font-size: 14.5px; margin: 0; }
body.modal-open { overflow: hidden; }

/* --- Breadcrumbs ------------------------------------------------------- */
.breadcrumbs { font-size: 14px; color: var(--muted); padding-block: 16px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--blue); }
