/* Темы сайта: светлая «Ч/Б» (mono, по умолчанию), тёмная «Графит» (graphite)
   и два зелёных варианта на показ: светлый «Лён» (len) и тёмный «Хвоя» (hvoya) — благородный зелёный, медь только в мелочах.
   Включаются атрибутом <html data-theme="…">; ссылка сразу с темой: index.html?t=graphite.
   Переключатель — полоска слева (светлая / тёмная). Базовые токены «Мох» в app.css :root остались как запасные. */

:root { --light: 1,.87,.64; }

/* ---------- Ч/Б: строго, как у коллеги — белый, чёрный, серые; заголовки гротеском ---------- */
html[data-theme="mono"] {
  --paper: #FFFFFF; --sand: #F3F3F1; --sand-2: #E7E7E4; --ink: #111111; --stone: #6F6F6B; --line: #E3E3E0;
  --moss: #111111; --moss-d: #111111;
  --forest: #141414; --forest-2: #202020; --on-forest: #F3F3F1; --on-forest-2: #A2A29E;
  --warm: #FFFFFF; --dusk: #111111; --dusk-ink: #F3F3F1; --dusk-mute: #9B9B97;
  --bg: #FFFFFF; --sky-d: #FFFFFF; --sky-e: #F5F5F3; --paper-rgb: 255,255,255;
  --glow: 255,255,255; --g1: #FFFFFF; --g2: #DADAD6; --g3: #A9A9A5; --shade: 14,14,14;
  --dim: #ABABA7; --dk1: #E6E6E3; --dk2: #A3A39F; --dk3: #474745;
  --light: 1,.98,.94;
  --round: 'Onest', system-ui, sans-serif;
}
html:is([data-theme="mono"],[data-theme="len"]) h2, html:is([data-theme="mono"],[data-theme="len"]) .rows b, html:is([data-theme="mono"],[data-theme="len"]) .mt b { font-weight: 500; letter-spacing: -.02em; }
html:is([data-theme="mono"],[data-theme="len"]) .hero .hx-h { font-family: 'Onest', system-ui, sans-serif; font-weight: 600; letter-spacing: -.03em; }
html:is([data-theme="mono"],[data-theme="len"]) .hx-nums dd, html:is([data-theme="mono"],[data-theme="len"]) .nums b, html:is([data-theme="mono"],[data-theme="len"]) .why b, html:is([data-theme="mono"],[data-theme="len"]) .calc .big { font-weight: 400; }
html[data-theme="mono"] .btn::before { background: #3A3A3A; }
html[data-theme="mono"] .btn--paper::before { background: #111; }
html[data-theme="mono"] .seg .pill, html[data-theme="mono"] .range .fl { background: #111; }
html:is([data-theme="mono"],[data-theme="len"]) .scene .glow { opacity: .5; }

/* ---------- Графит: тёмный сайт, латунные акценты ---------- */
html[data-theme="graphite"] {
  --paper: #1B1C1F; --sand: #24252A; --sand-2: #2E3036; --ink: #ECE8E0; --stone: #9C988F; --line: #34363C;
  --moss: #C7A66B; --moss-d: #D6B983;
  --forest: #111214; --forest-2: #1D1E22; --on-forest: #ECE8E0; --on-forest-2: #99958C;
  --warm: #E6CFA0; --dusk: #0F1012; --dusk-ink: #ECE8E0; --dusk-mute: #8C887F;
  --bg: #1B1C1F; --sky-d: #1A1B1E; --sky-e: #151618; --paper-rgb: 27,28,31;
  --glow: 255,234,196; --g1: #FFF0D2; --g2: #E2C38A; --g3: #B48F55; --shade: 10,10,12;
  --dim: #5E5F64; --dk1: #18191C; --dk2: #141517; --dk3: #111214;
  --light: 1,.9,.7;
}
/* поверх фото текст всегда светлый — возвращаем светлую «бумагу» внутри первого экрана и шапки над ним */
html:is([data-theme="graphite"],[data-theme="hvoya"]) .hero, html:is([data-theme="graphite"],[data-theme="hvoya"]) .top.over:not(.scr) { --paper: #F3EFE6; --ink: #16171A; }
html:is([data-theme="graphite"],[data-theme="hvoya"]) .top.over:not(.scr) .mega { --paper: #1B1C1F; --ink: #ECE8E0; }
html:is([data-theme="graphite"],[data-theme="hvoya"]) ::selection { color: #111; }
html:is([data-theme="graphite"],[data-theme="hvoya"]) .btn.lq, html:is([data-theme="graphite"],[data-theme="hvoya"]) .cd.lq, html:is([data-theme="graphite"],[data-theme="hvoya"]) .cd.sel { color: #16171A; }
html:is([data-theme="graphite"],[data-theme="hvoya"]) .cd.lq .ico, html:is([data-theme="graphite"],[data-theme="hvoya"]) .cd.sel .ico { color: #16171A; }
html:is([data-theme="graphite"],[data-theme="hvoya"]) .btn--fill { background: var(--ink); color: #16171A; }
html:is([data-theme="graphite"],[data-theme="hvoya"]) .seg button[aria-pressed="true"] { color: #16171A; }
html:is([data-theme="graphite"],[data-theme="hvoya"]) .card .ph img, html:is([data-theme="graphite"],[data-theme="hvoya"]) .sp .ph img { filter: brightness(.86); }
html:is([data-theme="graphite"],[data-theme="hvoya"]) .scene .glow { opacity: .35; }
html:is([data-theme="graphite"],[data-theme="hvoya"]) .ob .sh { opacity: 0; }
html:is([data-theme="graphite"],[data-theme="hvoya"]) .peek .in2 { box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }

/* ---------- Зелёные варианты: благородный бутылочный зелёный + кремовый; медь (--acc) — только мелкие детали ---------- */
/* «Лён» — светлая: белый фон, холодные светло-серые подложки (без бежевого), тёмно-зелёный текст, зелёные кнопки и тёмные блоки */
html[data-theme="len"] {
  --paper: #FFFFFF; --sand: #F1F3F1; --sand-2: #E5E9E6; --ink: #15241C; --stone: #646F69; --line: #E0E4E1;
  --moss: #1E4434; --moss-d: #1E4434;
  --forest: #15291F; --forest-2: #1D3428; --on-forest: #EFEADC; --on-forest-2: #A3B2A6;
  --warm: #D07A3E; --dusk: #13261D; --dusk-ink: #EFEADC; --dusk-mute: #9AA99D;
  --bg: #FFFFFF; --sky-d: #FFFFFF; --sky-e: #F3F5F3; --paper-rgb: 255,255,255;
  --glow: 255,236,208; --g1: #FFF4E2; --g2: #EDBE8F; --g3: #C9783F; --shade: 12,22,17;
  --dim: #A3ABA6; --dk1: #E3E7E4; --dk2: #98A59D; --dk3: #3B4C42;
  --light: 1,.97,.92; --acc: #C56A30;
  --round: 'Onest', system-ui, sans-serif;
}
html[data-theme="len"] .btn--fill.lq { color: var(--paper); }
html[data-theme="len"] .scene .glow { opacity: .5; }

/* «Хвоя» — тёмная: глубокий хвойный зелёный, кремовые кнопки, шалфейные акценты */
html[data-theme="hvoya"] {
  --paper: #12201A; --sand: #182A22; --sand-2: #20352B; --ink: #ECE6D6; --stone: #97A69A; --line: #263B31;
  --moss: #E4DCC6; --moss-d: #A9C6B0;
  --forest: #0B1611; --forest-2: #13231B; --on-forest: #ECE6D6; --on-forest-2: #93A296;
  --warm: #E0904F; --dusk: #0C1712; --dusk-ink: #ECE6D6; --dusk-mute: #8E9D91;
  --bg: #12201A; --sky-d: #11201A; --sky-e: #0E1A15; --paper-rgb: 18,32,26;
  --glow: 255,228,192; --g1: #FFF2DE; --g2: #EBB47E; --g3: #C9783F; --shade: 5,13,9;
  --dim: #5C6E63; --dk1: #16271F; --dk2: #111E18; --dk3: #0D1813;
  --light: 1,.88,.7; --acc: #DC8A4E;
}
html[data-theme="hvoya"] .hero, html[data-theme="hvoya"] .top.over:not(.scr) { --ink: #102019; }
html[data-theme="hvoya"] .top.over:not(.scr) .mega { --paper: #12201A; --ink: #ECE6D6; }
html[data-theme="hvoya"] .btn.lq, html[data-theme="hvoya"] .cd.lq, html[data-theme="hvoya"] .cd.sel,
html[data-theme="hvoya"] .cd.lq .ico, html[data-theme="hvoya"] .cd.sel .ico, html[data-theme="hvoya"] .seg button[aria-pressed="true"],
html[data-theme="hvoya"] .btn--fill, html[data-theme="hvoya"] .chip[aria-pressed="true"] { color: #102019; }

/* медь — мелочи: перекладина логотипа, точки и выноски, полоски прогресса, бегунок, активный пункт меню, фокус */
html:is([data-theme="len"],[data-theme="hvoya"]) .lg-m path + path { fill: var(--acc); }
html:is([data-theme="len"],[data-theme="hvoya"]) .idx button .bar,
html:is([data-theme="len"],[data-theme="hvoya"]) .ln-prog i { background: var(--acc); }
html:is([data-theme="len"],[data-theme="hvoya"]) .range .kn { box-shadow: 0 0 0 1.5px var(--acc), 0 6px 14px -6px rgba(0,0,0,.5); }
html:is([data-theme="len"],[data-theme="hvoya"]) .menu a[aria-current] { color: var(--acc); }
html:is([data-theme="len"],[data-theme="hvoya"]) :focus-visible { outline-color: var(--acc); }
html:is([data-theme="len"],[data-theme="hvoya"]) .logo i { background: var(--acc); }

/* открытое мобильное меню: шапка над первым экраном — в цвет меню, а не светлая */
html[data-theme="graphite"] .menu-open .top.over:not(.scr) { --paper: #1B1C1F; --ink: #ECE8E0; }
html[data-theme="hvoya"] .menu-open .top.over:not(.scr) { --paper: #12201A; --ink: #ECE6D6; }

/* ---------- переключатель схем (для показа заказчику) ---------- */
.thm { position: fixed; left: 14px; top: 50%; transform: translateY(-50%); z-index: 250; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 7px 9px; border-radius: 999px;
  background: #1A1A1A; color: #F2F0EA; font: 500 12px/1 'Onest', system-ui, sans-serif; box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 10px 30px -12px rgba(0,0,0,.5); }
.thm span { margin-bottom: 2px; font-size: 10px; opacity: .7; }
.thm button { position: relative; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); transition: transform .3s cubic-bezier(.3,.7,.1,1); }
.thm button::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid #F2F0EA; opacity: 0; transition: opacity .3s; }
.thm button[aria-pressed="true"]::after { opacity: 1; }
.thm button:hover { transform: scale(1.12); }
.thm button i { position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); padding: 5px 9px; border-radius: 6px; background: #111; color: #F2F0EA; font-style: normal; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.thm button:hover i, .thm button:focus-visible i { opacity: 1; }
/* на ПК в покое — один кружок текущей темы у самого края (не лезет на заголовок), при наведении раскрывается во все варианты */
@media (min-width: 1101px) {
  .thm { left: 6px; gap: 0; padding: 5px; transition: padding .45s var(--soft, ease), box-shadow .3s; }
  .thm span { max-height: 0; margin: 0; overflow: hidden; opacity: 0; transition: max-height .45s var(--soft, ease), opacity .3s, margin .45s var(--soft, ease); }
  .thm button { width: 22px; height: 22px; transition: transform .3s cubic-bezier(.3,.7,.1,1), width .45s cubic-bezier(.3,.7,.1,1), height .45s cubic-bezier(.3,.7,.1,1), margin .45s cubic-bezier(.3,.7,.1,1), opacity .3s; }
  .thm button::after { opacity: 0; }
  .thm button:not([aria-pressed="true"]) { height: 0; opacity: 0; pointer-events: none; }
  .thm:hover, .thm:has(:focus-visible) { padding: 12px 7px 9px; }
  .thm:hover span, .thm:has(:focus-visible) span { max-height: 20px; margin-bottom: 4px; opacity: .7; }
  .thm:hover button, .thm:has(:focus-visible) button { width: 26px; height: 26px; opacity: 1; pointer-events: auto; }
  .thm:hover button + button, .thm:has(:focus-visible) button + button { margin-top: 8px; }
  .thm:hover button[aria-pressed="true"]::after, .thm:has(:focus-visible) button[aria-pressed="true"]::after { opacity: 1; }
}
/* смена схемы — плавно */
html.thm-go, html.thm-go * { transition: background-color .5s ease, color .5s ease, border-color .5s ease, fill .5s ease, stroke .5s ease !important; }
@media (max-width: 1100px) { .thm { top: auto; bottom: 10px; left: 10px; transform: none; flex-direction: row; padding: 6px 8px; } .thm span { display: none; } .thm button i { left: 50%; top: auto; bottom: calc(100% + 10px); transform: translateX(-50%); } }
