/* EKB SUP — base + chrome + primitives.
   Single compiled stylesheet. Interactive states live in :hover / :focus-visible /
   :active (NOT React state), motion respects prefers-reduced-motion.
   Component-specific styles (cards) are appended per phase. */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; }
img, picture, svg, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; } /* author display rules must not override the hidden attribute */

/* ---------- Theme-only tokens (extend the design-system set; tokens.css stays a 1:1 copy) ---------- */
:root {
	color-scheme: light;
	--on-dark-90: rgba(255, 255, 255, .90);
	--on-dark-70: rgba(255, 255, 255, .70);
	--on-dark-60: rgba(255, 255, 255, .60);
	--on-dark-50: rgba(255, 255, 255, .50);
	--on-dark-12: rgba(255, 255, 255, .12);
	--glass-bg: rgba(255, 255, 255, .82);
	--glass-bg-strong: rgba(255, 255, 255, .92);
}
body {
	background: var(--surface-page);
	color: var(--text-body);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	font-weight: var(--fw-regular);
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	color: var(--text-strong);
	line-height: var(--lh-heading);
	letter-spacing: var(--ls-tight);
	font-weight: var(--fw-semibold);
}
h1 { font-size: var(--fs-hero); line-height: var(--lh-hero); letter-spacing: var(--ls-display); font-weight: var(--fw-black); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { max-width: var(--measure); }
a:not(.btn):hover { color: var(--link); }

/* Transparent outline kept as fallback for Windows high-contrast mode (where box-shadow is dropped). */
:focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: var(--shadow-focus); border-radius: var(--r-sm); }

/* ---------- Layout ---------- */
.sup-container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}
.sup-section { padding-block: var(--space-16); }
@media (min-width: 768px) { .sup-section { padding-block: var(--space-24); } }
.sup-section--warm { background: var(--surface-warm); }
.sup-section--dark { background: var(--surface-dark); color: var(--text-on-dark); }
.sup-section--dark h1, .sup-section--dark h2, .sup-section--dark h3 { color: var(--text-on-dark); }

.sup-eyebrow {
	display: inline-block;
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	letter-spacing: var(--ls-caps);
	text-transform: uppercase;
	color: var(--text-muted);
}
.sup-section--dark .sup-eyebrow { color: rgba(255,255,255,.6); }

.sup-grid { display: grid; gap: var(--space-6); }
.sup-grid-2 { grid-template-columns: 1fr; }
.sup-grid-3 { grid-template-columns: 1fr; }
.sup-grid-4 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
	.sup-grid-2 { grid-template-columns: repeat(2, 1fr); }
	.sup-grid-3 { grid-template-columns: repeat(2, 1fr); }
	.sup-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
	.sup-grid-3 { grid-template-columns: repeat(3, 1fr); }
	.sup-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Button (single action primitive) ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	font-family: var(--font-body);
	font-weight: var(--fw-bold);
	line-height: 1;
	text-align: center;
	border-radius: var(--r-pill);
	border: 1.5px solid transparent;
	padding: 14px 24px;
	cursor: pointer;
	transition: background var(--dur-hover) var(--ease-out),
		color var(--dur-hover) var(--ease-out),
		border-color var(--dur-hover) var(--ease-out),
		transform var(--dur-hover) var(--ease-out),
		box-shadow var(--dur-hover) var(--ease-out);
	min-height: 44px; /* touch target */
}
.btn--sm { padding: 10px 18px; font-size: var(--fs-sm); min-height: 40px; }
.btn--lg { padding: 18px 32px; font-size: var(--fs-body); }
.btn--block { width: 100%; }

.btn--primary { background: var(--action); color: var(--text-on-accent); }
.btn--primary:hover { background: var(--action-hover); transform: scale(1.02); }
.btn--primary:active { transform: scale(0.98); }

.btn--secondary { background: transparent; color: var(--text-strong); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--ink-900); color: var(--text-on-dark); }
.btn--secondary:active { transform: scale(0.98); }

.btn--ghost { background: transparent; color: var(--text-strong); }
.btn--ghost:hover { background: var(--surface-accent-soft); color: var(--accent-600); }

.btn--messenger { background: var(--ink-900); color: var(--text-on-dark); }
.btn--messenger:hover { transform: translateY(-2px); box-shadow: var(--shadow-card); }

/* Brand messenger buttons (own colours, never coral — §accent rule). Visible on dark hero. */
.btn--tg { background: #229ED9; color: #fff; }
.btn--tg:hover { background: #1B87BA; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn--max { background: linear-gradient(135deg, #7C5CFC, #2E90FA); color: #fff; }
.btn--max:hover { filter: brightness(1.07); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn--tg svg, .btn--max svg { flex-shrink: 0; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn:focus-visible { box-shadow: var(--shadow-focus); }

/* ---------- Seasonal banner ---------- */
.sup-season { background: var(--accent-tint); color: var(--accent-600); text-align: center; padding: 10px 0; font-weight: 700; font-size: var(--fs-sm); }

/* ---------- Header ---------- */
.sup-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--glass-bg);
	backdrop-filter: saturate(180%) blur(12px);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid var(--border-subtle);
}
.sup-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-6);
	height: var(--header-h);
}
.sup-logo { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 1.25rem; color: var(--text-strong); letter-spacing: var(--ls-tight); line-height: 1; }
.sup-logo__mark { color: var(--accent); font-size: 1.85em; line-height: 0.7; }
.sup-logo__text { line-height: 0.92; }
.sup-logo--light { color: var(--text-on-dark); }
.sup-nav { display: none; }
.sup-nav ul { display: flex; gap: var(--space-6); list-style: none; padding: 0; margin: 0; }
.sup-nav a { font-weight: var(--fw-medium); color: var(--text-body); padding-block: var(--space-2); }
.sup-nav a:hover, .sup-nav .current-menu-item > a { color: var(--text-strong); }
.sup-header__actions { display: flex; align-items: center; gap: var(--space-3); }
.sup-header__phone { display: none; font-weight: var(--fw-bold); color: var(--text-strong); white-space: nowrap; }
.sup-burger {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; border: 1px solid var(--border-subtle);
	border-radius: var(--r-sm); background: var(--surface-card); cursor: pointer;
}
@media (min-width: 1024px) {
	.sup-nav { display: block; }
	.sup-header__phone { display: inline; }
	.sup-burger { display: none; }
}
/* Mobile nav panel */
.sup-mobile-nav { display: none; border-top: 1px solid var(--border-subtle); background: var(--surface-page); }
.sup-mobile-nav.is-open { display: block; }
.sup-mobile-nav ul { list-style: none; margin: 0; padding: var(--space-4) 0; }
.sup-mobile-nav a { display: block; padding: var(--space-3) var(--container-pad); font-weight: var(--fw-medium); }
.sup-mobile-nav a:hover { background: var(--surface-warm); }
.sup-mobile-nav .sub-menu { padding: 0 0 var(--space-2) var(--space-6); }

/* Header dropdown (Прокат → Сапборды/Катамараны/Лодки/Аксессуары) */
.sup-nav li { position: relative; }
.sup-nav .menu-item-has-children > a::after { content: "▾"; margin-left: 5px; font-size: .75em; opacity: .6; }
.sup-nav .sub-menu {
	position: absolute; top: 100%; left: 0; z-index: 60;
	min-width: 220px; padding: var(--space-3);
	flex-direction: column; gap: 2px; display: none;
	background: var(--surface-card); border: 1px solid var(--border-subtle);
	border-radius: var(--r-md); box-shadow: var(--shadow-card);
}
.sup-nav .menu-item-has-children:hover > .sub-menu,
.sup-nav .menu-item-has-children:focus-within > .sub-menu { display: flex; }
.sup-nav .sub-menu a { padding: 10px 14px; border-radius: var(--r-md); white-space: nowrap; font-size: var(--fs-body); }
.sup-nav .sub-menu a:hover { background: var(--surface-warm); color: var(--text-strong); }

/* ---------- Footer ---------- */
.sup-footer { background: var(--surface-dark); color: var(--on-dark-70); padding-block: var(--space-16); }
.sup-footer a { color: var(--on-dark-70); }
.sup-footer a:hover { color: var(--text-on-dark); }
.sup-footer__grid { display: grid; gap: var(--space-8); grid-template-columns: 1fr; }
@media (min-width: 600px) { .sup-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .sup-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.sup-footer__title { color: var(--text-on-dark); font-family: var(--font-display); font-weight: var(--fw-semibold); margin-bottom: var(--space-4); }
.sup-footer__muted { margin-top: var(--space-3); color: var(--on-dark-60); max-width: 32ch; }
.sup-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sup-footer__list a { display: inline-block; }
.sup-footer__plain { color: var(--on-dark-60); }
.sup-footer__cta { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: var(--space-6); max-width: 260px; }
.sup-footer__cta .btn { width: 100%; justify-content: center; }
/* Соц-иконка (кружок). База — под светлый фон; в футере переопределяется на тёмный. */
.sup-social { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-pill); background: var(--accent-tint); color: var(--accent); transition: background .18s ease, color .18s ease, transform .18s ease; }
.sup-social:hover { transform: translateY(-2px); color: #fff; }
.sup-social--vk:hover { background: #0077FF; }
.sup-social--tg:hover { background: #229ED9; }
.sup-footer__social { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.sup-footer__social .sup-social { background: var(--on-dark-12); color: var(--text-on-dark); }
/* Сквозной блок «Мы в соцсетях» в конце статьи — ненавязчивый. */
.sup-social-follow { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--border-subtle); }
.sup-social-follow__label { font-family: var(--font-display); font-weight: var(--fw-semibold); color: var(--text-strong); }
.sup-social-follow__icons { display: flex; gap: var(--space-2); }
.sup-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); font-size: var(--fs-sm); color: var(--on-dark-50); margin-top: var(--space-12); border-top: 1px solid var(--on-dark-12); padding-top: var(--space-6); }
/* light button for dark surfaces */
.btn--light { background: rgba(255,255,255,.10); color: var(--text-on-dark); border: 1px solid var(--on-dark-20); }
.btn--light:hover { background: rgba(255,255,255,.18); }

/* ---------- Sticky mobile bar ---------- */
.sup-sticky-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
	display: flex; gap: var(--space-3);
	padding: var(--space-3) var(--space-4);
	padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
	background: var(--glass-bg-strong);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	border-top: 1px solid var(--border-subtle);
	transform: translateY(120%);
	visibility: hidden; /* keep links out of tab-order + a11y tree while hidden */
	transition: transform var(--dur-hover) var(--ease-out), visibility 0s linear var(--dur-hover);
}
.sup-sticky-bar.is-visible {
	transform: translateY(0);
	visibility: visible;
	transition: transform var(--dur-hover) var(--ease-out);
}
.sup-sticky-bar .btn { flex: 1; }
@media (min-width: 1024px) { .sup-sticky-bar { display: none; } }
/* Reserve space so the fixed bar never overlaps content (ТЗ §4). Body class toggled by JS. */
@media (max-width: 1023px) { body.sup-stickybar-on { padding-bottom: 76px; } }

/* ---------- Floating contact FAB (раскрывается по клику) ---------- */
.sup-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 12px; transition: bottom .25s var(--ease-out); }
@media (max-width: 1023px) {
	.sup-fab { right: 16px; bottom: 16px; }
	body.sup-stickybar-on .sup-fab { bottom: 90px; } /* поднять над нижним sticky-баром */
}
.sup-fab__menu { display: flex; flex-direction: column; align-items: center; gap: 12px; opacity: 0; transform: translateY(12px) scale(.85); pointer-events: none; transition: opacity .25s var(--ease-out), transform .25s var(--ease-out); }
.sup-fab.is-open .sup-fab__menu { opacity: 1; transform: none; pointer-events: auto; }
.sup-fab__item { position: relative; width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; box-shadow: var(--shadow-card); transition: transform var(--dur-hover) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out); }
.sup-fab__item svg { fill: #fff; }
.sup-fab__item:hover { transform: scale(1.09); box-shadow: var(--shadow-hover); }
.sup-fab__item--tg { background: #229ED9; }
.sup-fab__item--max { background: linear-gradient(135deg, #7C5CFC, #2E90FA); }
.sup-fab__item--phone { background: #22C55E; }
.sup-fab__item::before { content: attr(data-label); position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%); background: var(--surface-dark); color: #fff; font-size: var(--fs-sm); font-weight: 600; line-height: 1; padding: 7px 12px; border-radius: var(--r-pill); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--dur-hover) var(--ease-out); }
.sup-fab__item:hover::before { opacity: 1; }
.sup-fab__toggle { width: 60px; height: 60px; border-radius: 50%; border: none; background: var(--accent); color: #fff; cursor: pointer; box-shadow: var(--shadow-hover); display: inline-flex; align-items: center; justify-content: center; transition: transform var(--dur-hover) var(--ease-out); }
.sup-fab__toggle:hover { transform: scale(1.06); }
.sup-fab__ico { display: inline-flex; }
.sup-fab__ico--close { display: none; }
.sup-fab.is-open .sup-fab__ico--open { display: none; }
.sup-fab.is-open .sup-fab__ico--close { display: inline-flex; }

/* ---------- Motion: reveal on scroll (progressive enhancement — only when JS present) ---------- */
.sup-js .sup-reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--dur-enter) var(--ease-out), transform var(--dur-enter) var(--ease-out); }
.sup-js .sup-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
	.sup-reveal { opacity: 1; transform: none; }
	.btn--primary:hover, .btn--messenger:hover, .sup-floating a:hover { transform: none; }
}

/* ---------- Screen-reader only (for heading structure without visual dupes) ---------- */
.sup-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- Cookie banner ---------- */
.sup-cookie {
	position: fixed; left: var(--space-4); right: var(--space-4); bottom: var(--space-4); z-index: 70;
	background: var(--surface-dark); color: var(--on-dark-90);
	border-radius: var(--r-lg); box-shadow: var(--shadow-hover);
	padding: var(--space-4) var(--space-6);
}
.sup-cookie__inner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); max-width: var(--container-max); margin-inline: auto; }
.sup-cookie__text { margin: 0; flex: 1; min-width: 240px; font-size: var(--fs-sm); line-height: 1.5; max-width: none; }
.sup-cookie__text a { color: #fff; text-decoration: underline; }
.sup-cookie .btn { flex-shrink: 0; }
@media (max-width: 1023px) { .sup-cookie { left: var(--space-3); right: var(--space-3); bottom: 84px; } } /* над sticky-баром */

/* ---------- Skip link (a11y) ---------- */
.sup-skip { position: absolute; left: -9999px; top: 0; background: var(--ink-900); color: var(--text-on-dark); padding: 12px 20px; z-index: 100; border-radius: 0 0 var(--r-sm) 0; }
.sup-skip:focus { left: 0; }

/* ---------- Hero ---------- */
.sup-hero { position: relative; }
.sup-hero .sup-container { position: relative; z-index: 2; }
.sup-hero__bg { position: absolute; inset: 0; z-index: 0; }
.sup-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
/* Оверлей на фото: темнее слева/снизу (там текст) — чтобы читалось на любой картинке */
.sup-hero--photo::after { content: ""; position: absolute; inset: 0; z-index: 1;
	background: linear-gradient(180deg, rgba(11,20,22,.28) 0%, rgba(11,20,22,.62) 100%),
	            linear-gradient(90deg, rgba(11,20,22,.55) 0%, rgba(11,20,22,.12) 65%, rgba(11,20,22,0) 100%); }
.sup-hero__inner { max-width: 820px; }
.sup-hero--photo .sup-eyebrow, .sup-hero--photo .sup-hero__title, .sup-hero--photo .sup-hero__sub, .sup-hero--photo .sup-hero__trust { text-shadow: 0 1px 12px rgba(11,20,22,.45); }
.sup-hero__title { margin-top: var(--space-5); margin-bottom: var(--space-2); line-height: 1.07; }
.sup-hero__sub { margin-top: var(--space-6); color: var(--text-on-dark); font-size: var(--fs-body); }
.sup-hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.sup-hero__trust { margin-top: var(--space-6); color: var(--on-dark-90); font-size: var(--fs-sm); font-weight: 500; }
/* Mobile: заголовок не должен «прижиматься» — больше воздуха и мягче интерлиньяж */
@media (max-width: 767px) {
	.sup-hero .sup-section__inner, .sup-hero__inner { padding-block: var(--space-6); }
	.sup-hero__title { font-size: clamp(1.9rem, 7.8vw, 2.4rem); line-height: 1.25; margin-top: var(--space-5); }
	.sup-hero__sub { margin-top: var(--space-5); }
}

/* ---------- Section intro / prose ---------- */
.sup-section__head { margin-bottom: var(--space-12); }
.sup-section__title { margin-top: var(--space-3); }
.sup-prose { margin-top: var(--space-4); }
/* Утилиты отступов вынесены в конец components.css (последний стиль) —
   иначе margin:0 компонентов (.sup-checklist/.sup-programme) перебивает их
   при равной специфичности из-за порядка загрузки base→components. */
