/*
 * Стили секций.
 *
 * Схемы (sc-scheme-*) задают фон и цвет текста парами, прошедшими проверку
 * контраста. Секция никогда не задаёт цвет напрямую - только через схему,
 * поэтому произвольная комбинация «тёмный текст на тёмном фоне» невозможна.
 */

/* --- Схемы и ритм --- */

.sc-section {
	position: relative;
}

.sc-scheme-base { background: var(--sc-color-base); color: var(--sc-color-contrast); }
.sc-scheme-surface-1 { background: var(--sc-color-surface-1); color: var(--sc-color-contrast); }
.sc-scheme-surface-2 { background: var(--sc-color-surface-2); color: var(--sc-color-contrast); }

.sc-space-sm { padding-block: clamp(2rem, 1.6rem + 2vw, 3rem); }
.sc-space-md { padding-block: clamp(3rem, 2.4rem + 3vw, 4.5rem); }
.sc-space-lg { padding-block: clamp(4rem, 3.2rem + 4vw, 6rem); }

.sc-section__head {
	max-width: 46rem;
	margin-block-end: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
}

.sc-section__intro,
.sc-section__note {
	opacity: 0.85;
}

.sc-section__note {
	margin-block-start: 1.5rem;
	font-size: 0.9rem;
}

.sc-section__empty { opacity: 0.7; }

.sc-eyebrow {
	margin: 0 0 0.75rem;
	color: var(--sc-color-accent);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* --- Сетки --- */

.sc-cols-1 { grid-template-columns: 1fr; }
.sc-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sc-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sc-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
	.sc-cols-3,
	.sc-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
	.sc-cols-2,
	.sc-cols-3,
	.sc-cols-4 { grid-template-columns: 1fr; }
}

/* --- Списки-буллеты --- */

.sc-bullets {
	display: grid;
	gap: 0.6rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
}

.sc-bullets li {
	position: relative;
	padding-inline-start: 1.75rem;
}

.sc-bullets--check li::before,
.sc-bullets--dash li::before,
.sc-bullets--plain li::before {
	position: absolute;
	inset-inline-start: 0;
	color: var(--sc-color-accent);
	font-weight: 700;
}

.sc-bullets--check li::before { content: "\2713"; }
.sc-bullets--dash li::before { content: "\2014"; }
.sc-bullets--plain li::before { content: "\2022"; }

/* --- Первый экран: текст и изображение --- */

.sc-hero-split__grid,
.sc-split__grid,
.sc-hero-form__grid,
.sc-contact__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1.5rem, 1.2rem + 2vw, 3.5rem);
	align-items: center;
}

@media (max-width: 900px) {
	.sc-hero-split__grid,
	.sc-split__grid,
	.sc-hero-form__grid,
	.sc-contact__grid { grid-template-columns: 1fr; }
}

/*
 * Изображение переезжает налево только визуально: в разметке текст всегда
 * первый, поэтому порядок чтения с клавиатуры и в скринридере не меняется.
 */
.sc-hero-split--media-start .sc-hero-split__media,
.sc-split--media-start .sc-split__media,
.sc-hero-form--form-start .sc-hero-form__form,
.sc-contact--form-end .sc-contact__form { order: -1; }

.sc-hero-split__img,
.sc-split__img {
	width: 100%;
	border-radius: calc(22px * var(--ls-r-k,1));
	object-fit: cover;
	aspect-ratio: 4 / 3;
}

.sc-hero-split__lead,
.sc-hero-centered__lead,
.sc-hero-bleed__lead,
.sc-hero-form__lead {
	font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
	opacity: 0.9;
}

.sc-split--compact .sc-split__grid { align-items: center; }

/* --- Первый экран по центру --- */

.sc-hero-centered__inner {
	max-width: 46rem;
	margin-inline: auto;
	text-align: center;
}

/* --- Первый экран во всю ширину --- */

.sc-hero-bleed {
	display: grid;
	isolation: isolate;
	min-height: min(70vh, 620px);
	align-content: center;
	color: #fff;
}

.sc-hero-bleed__bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: hidden;
}

.sc-hero-bleed__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * Подложка обязательна: фотография приходит из стока, и проверять её контраст
 * на каждом сгенерированном сайте некому. Слой гарантирует читаемость заранее.
 *
 * Угол вынесен в переменную и переворачивается в RTL. Раньше здесь стояло жёсткое
 * 90deg: плотный конец заливки всегда оставался у физического левого края, а текст
 * первого экрана прижат к НАЧАЛУ строки. На иврите текст уезжал вправо, где
 * заливки всего 35 процентов, и садился на светлую часть фотографии. Логического
 * ключевого слова у градиента нет, поэтому переворачиваем угол, а не направление.
 */
.sc-hero-bleed__bg { --sc-overlay-angle: 90deg; }

[dir="rtl"] .sc-hero-bleed__bg { --sc-overlay-angle: 270deg; }

.sc-hero-bleed__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	/* rtl-ok: угол берётся из --sc-overlay-angle, которая переворачивается выше */
	background: linear-gradient(var(--sc-overlay-angle), rgb(0 0 0 / 72%) 0%, rgb(0 0 0 / 55%) 60%, rgb(0 0 0 / 35%) 100%);
}

.sc-hero-bleed--overlay-light .sc-hero-bleed__bg::after {
	/* rtl-ok: тот же угол из --sc-overlay-angle */
	background: linear-gradient(var(--sc-overlay-angle), rgb(255 255 255 / 88%) 0%, rgb(255 255 255 / 70%) 60%, rgb(255 255 255 / 45%) 100%);
}

.sc-hero-bleed--overlay-light { color: var(--sc-color-contrast); }

.sc-hero-bleed__inner { max-width: 42rem; }
.sc-hero-bleed .sc-eyebrow { color: inherit; opacity: 0.85; }

/* --- Первый экран с формой --- */

.sc-hero-form__grid { align-items: start; }

/* --- Карточки --- */

.sc-cards__grid,
.sc-pricing__grid,
.sc-gallery__grid,
.sc-blog__grid {
	display: grid;
	gap: clamp(1rem, 0.8rem + 1vw, 1.75rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sc-card {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
	background: var(--sc-color-surface-1);
	border: 1px solid var(--sc-color-line);
	border-radius: calc(22px * var(--ls-r-k,1));
}

.sc-scheme-surface-1 .sc-card { background: var(--sc-color-base); }

.sc-card__title { margin: 0; font-size: 1.2rem; }
.sc-card__title a { color: inherit; text-decoration: none; }
.sc-card__title a:hover { color: var(--sc-color-primary); text-decoration: underline; }

.sc-card__text { margin: 0; opacity: 0.9; }
.sc-card__role { margin: 0; color: var(--sc-color-accent); font-weight: 600; }
.sc-card__meta { margin: 0; font-size: 0.85rem; opacity: 0.7; }
.sc-card__label { margin: 0; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }
.sc-card__contact { font-size: 1.1rem; font-weight: 600; }

.sc-card__img,
.sc-card__portrait {
	width: 100%;
	margin-block-end: 0.5rem;
	border-radius: calc(14px * var(--ls-r-k,1));
	object-fit: cover;
}

.sc-card__img { aspect-ratio: 4 / 3; }
.sc-card__portrait { aspect-ratio: 3 / 4; }

.sc-card__icon {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: calc(12px * var(--ls-r-k,1));
	background: color-mix(in srgb, var(--sc-color-accent) 14%, transparent);
}

.sc-card__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 999px /* kit-free: круг, а не угол: стороны равны */;
	background: var(--sc-color-primary);
	color: var(--sc-color-primary-contrast);
	font-weight: 700;
}

.sc-card__price-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
}

.sc-card__price { font-weight: 700; white-space: nowrap; }

/* --- Цитаты --- */

.sc-quote { margin: 0; display: grid; gap: 0.75rem; }
.sc-quote__text { margin: 0; font-size: 1.05rem; }
.sc-quote__text p { margin: 0; }
.sc-quote__text::before { content: "\201C"; color: var(--sc-color-accent); font-size: 2rem; line-height: 0.5; vertical-align: -0.35em; }
.sc-quote__author { font-weight: 600; }
.sc-quote__role { display: block; font-weight: 400; font-size: 0.9rem; opacity: 0.75; }

/* --- Списки-секции --- */

.sc-list__items {
	display: grid;
	gap: clamp(1rem, 0.8rem + 1vw, 1.5rem);
	margin: 0;
	padding: 0;
	counter-reset: sc-step;
}

.sc-list__items > li { list-style: none; }

.sc-list--horizontal .sc-list__items { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.sc-list__item {
	position: relative;
	padding-inline-start: 3.25rem;
}

ol.sc-list__items .sc-list__item::before {
	counter-increment: sc-step;
	content: counter(sc-step);
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 999px /* kit-free: круг, а не угол: стороны равны */;
	background: var(--sc-color-primary);
	color: var(--sc-color-primary-contrast);
	font-weight: 700;
}

ul.sc-list__items .sc-list__item::before {
	content: "\2713";
	position: absolute;
	inset-inline-start: 0.5rem;
	color: var(--sc-color-accent);
	font-weight: 700;
	font-size: 1.25rem;
}

.sc-list__title { margin: 0 0 0.25rem; font-size: 1.15rem; }
.sc-list__text { margin: 0; opacity: 0.9; }

/* --- Полосы --- */

.sc-band__title { margin-block-end: 1.5rem; }

.sc-band__logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: clamp(1.5rem, 1.2rem + 2vw, 3rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sc-band__logo-img { max-height: 44px; width: auto; }
.sc-band__logo-text { font-weight: 700; font-size: 1.1rem; opacity: 0.7; }

.sc-band__stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: clamp(1rem, 0.8rem + 1vw, 2rem);
	margin: 0;
	text-align: center;
}

.sc-stat { display: flex; flex-direction: column-reverse; gap: 0.25rem; }
.sc-stat__value { margin: 0; font-family: var(--sc-font-heading); font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.8rem); font-weight: 700; color: var(--sc-color-primary); }
.sc-stat__label { font-size: 0.95rem; opacity: 0.8; }

.sc-band--boxed .sc-band__stats,
.sc-band--boxed .sc-band__quote {
	padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
	background: var(--sc-color-surface-1);
	border: 1px solid var(--sc-color-line);
	border-radius: calc(22px * var(--ls-r-k,1));
}

.sc-band__quote {
	max-width: 52rem;
	margin-inline: auto;
	text-align: center;
}

.sc-band__quote blockquote { margin: 0; }
.sc-band__quote p { font-family: var(--sc-font-heading); font-size: clamp(1.2rem, 1.1rem + 0.8vw, 1.7rem); line-height: 1.4; }
.sc-band__quote figcaption { margin-block-start: 1rem; font-weight: 600; }
.sc-band__role { display: block; font-weight: 400; opacity: 0.75; }

.sc-band__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.sc-band__copy { max-width: 42rem; }
.sc-band__cta .sc-actions { margin-block-start: 0; }

.sc-band--primary {
	background: var(--sc-color-primary);
	color: var(--sc-color-primary-contrast);
}

.sc-band--primary .sc-btn--primary {
	background: var(--sc-color-primary-contrast);
	color: var(--sc-color-primary);
}

.sc-band--primary .sc-btn--secondary {
	border-color: var(--sc-color-primary-contrast);
	color: var(--sc-color-primary-contrast);
}

/* --- Вопросы и ответы --- */

.sc-faq__items {
	display: grid;
	gap: 0.75rem;
	max-width: 52rem;
}

.sc-faq__item {
	padding: 0.25rem 1.25rem;
	background: var(--sc-color-surface-1);
	border: 1px solid var(--sc-color-line);
	border-radius: calc(14px * var(--ls-r-k,1));
}

.sc-scheme-surface-1 .sc-faq__item { background: var(--sc-color-base); }

.sc-faq__q {
	padding-block: 1rem;
	font-family: var(--sc-font-heading);
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

.sc-faq__q::-webkit-details-marker { display: none; }

.sc-faq__q::after {
	content: "+";
	float: inline-end;
	margin-inline-start: 1rem;
	color: var(--sc-color-primary);
	font-size: 1.4rem;
	line-height: 1;
}

.sc-faq__item[open] .sc-faq__q::after { content: "\2212"; }

.sc-faq__a { padding-block-end: 1rem; }
.sc-faq__a p { margin: 0; opacity: 0.9; }

/* --- Тарифы --- */

.sc-plan {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
	background: var(--sc-color-surface-1);
	border: 1px solid var(--sc-color-line);
	border-radius: calc(22px * var(--ls-r-k,1));
}

.sc-scheme-surface-1 .sc-plan { background: var(--sc-color-base); }

.sc-plan--featured { border-color: var(--sc-color-primary); border-width: 2px; }

.sc-plan__badge {
	align-self: flex-start;
	margin: 0;
	padding: 0.25rem 0.75rem;
	background: var(--sc-color-primary);
	color: var(--sc-color-primary-contrast);
	border-radius: var(--ls-r-pill,999px);
	font-size: 0.8rem;
	font-weight: 700;
}

.sc-plan__title { margin: 0; font-size: 1.3rem; }
.sc-plan__price { margin: 0; display: flex; align-items: baseline; gap: 0.35rem; }
.sc-plan__amount { font-family: var(--sc-font-heading); font-size: clamp(1.8rem, 1.5rem + 1.2vw, 2.4rem); font-weight: 700; }
.sc-plan__period { opacity: 0.7; }
.sc-plan__text { margin: 0; opacity: 0.9; }
.sc-plan .sc-actions { margin-block-start: auto; padding-block-start: 1rem; }

/* --- Галерея --- */

.sc-gallery__item { margin: 0; }
.sc-gallery__figure { margin: 0; }

.sc-gallery__img {
	width: 100%;
	border-radius: calc(14px * var(--ls-r-k,1));
	object-fit: cover;
	aspect-ratio: 4 / 3;
}

.sc-gallery__caption { margin-block-start: 0.5rem; font-size: 0.9rem; opacity: 0.75; }

/* --- Контакты --- */

.sc-contact__grid { align-items: start; }

.sc-contact__details {
	display: grid;
	gap: 1rem;
	margin-block-end: 1.5rem;
}

.sc-contact__row { display: grid; gap: 0.15rem; }
.sc-contact__label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.7; }
.sc-contact__value { font-size: 1.1rem; font-style: normal; }

.sc-map {
	position: relative;
	display: grid;
	gap: 0.75rem;
	padding: 1.25rem;
	background: var(--sc-color-surface-2);
	border-radius: calc(22px * var(--ls-r-k,1));
	min-height: 140px;
	align-content: center;
	justify-items: start;
}

.sc-map__fallback { margin: 0; font-size: 0.9rem; }
.sc-map.is-loaded { padding: 0; min-height: 320px; }
.sc-map.is-loaded .sc-map__button,
.sc-map.is-loaded .sc-map__fallback { display: none; }
.sc-map iframe { width: 100%; height: 320px; border: 0; border-radius: calc(22px * var(--ls-r-k,1)); }

/* --- Часы работы --- */

.sc-hours__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
}

.sc-hours--boxed .sc-hours__col {
	padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
	background: var(--sc-color-surface-1);
	border: 1px solid var(--sc-color-line);
	border-radius: calc(22px * var(--ls-r-k,1));
}

.sc-hours__subtitle { margin: 0 0 0.75rem; font-size: 1.1rem; }
.sc-hours__address { font-style: normal; }
.sc-hours__list { margin: 0; }
.sc-hours__row { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.35rem; border-block-end: 1px solid var(--sc-color-line); }
.sc-hours__row:last-child { border-block-end: 0; }
.sc-hours__row dt { font-weight: 600; }
.sc-hours__row dd { margin: 0; opacity: 0.85; }

/* --- Блог --- */

.sc-blog__item { display: flex; flex-direction: column; gap: 0.5rem; }
.sc-blog__img { width: 100%; border-radius: calc(14px * var(--ls-r-k,1)); object-fit: cover; aspect-ratio: 16 / 10; }
.sc-blog__title { margin: 0; font-size: 1.2rem; }
.sc-blog__title a { color: inherit; text-decoration: none; }
.sc-blog__title a:hover { color: var(--sc-color-primary); text-decoration: underline; }
.sc-blog__meta { margin: 0; font-size: 0.85rem; opacity: 0.7; }
.sc-blog__excerpt { margin: 0; opacity: 0.9; }

.sc-blog__pagination { margin-block-start: 2rem; }
.sc-blog__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding-inline: 0.5rem;
	border-radius: calc(12px * var(--ls-r-k,1));
	text-decoration: none;
}

.sc-blog__pagination .current { background: var(--sc-color-primary); color: var(--sc-color-primary-contrast); }
