/* ============================================================
   LANDMARK — themes.css · четыре элитные цветовые схемы
   ------------------------------------------------------------
   Схема задаётся атрибутом на <html>:  data-theme="ivory"
     ivory     — Слоновая кость и графит  (беж 75% + чёрный)
     bordeaux  — Бордо и шампань          (крем + винный)
     midnight  — Полночь и латунь         (жемчуг + тёмно-синий)
     blush     — Пудра и какао            (розовая пудра + шоколад)
   Зелёного нет ни в одной.

   Все токены ниже — единственный источник цвета. Остальные файлы
   цвета не хардкодят, поэтому смена темы меняет сайт целиком.

   Доля тёмного ≈ 25%: блоки с классом .dark (принципы, подвал)
   плюс полноэкранные видео-полосы. Остальное — светлая доминанта.

   ЗАФИКСИРОВАТЬ ОДНУ ТЕМУ: поставить нужный data-theme в <html>,
   удалить подключение theme-switch.js. Больше ничего не требуется.
   ============================================================ */

/* ---------- 1 · Слоновая кость и графит ---------- */
:root, :root[data-theme="ivory"]{
  --bg:#efe7d8; --bg-2:#e6dbc7; --bg-3:#e5dac4;
  --text:#221d17; --muted:rgba(34,29,23,.62);
  --accent:#a4783a; --accent-soft:#b3924f; --accent-hi:#d8b874;
  --line:rgba(164,120,58,.32); --line-soft:rgba(34,29,23,.08);
  --dark:#16130f; --dark-2:#1e1a15;
  --on-dark:#f2ece1; --muted-dark:rgba(242,236,225,.6); --accent-dark:#d0ae63;
  --on-video:#f6f1e6;
  --header-bg:rgba(239,231,216,.9);
  --fallback:radial-gradient(70% 65% at 62% 38%,#f2ebdc,#e9dfcc 55%,#e2d6bf);
  --frame:linear-gradient(135deg,#e5dac4,#dccfb6 70%);
  --ring:conic-gradient(from 210deg,#c8a961,#e8c078,#d99a5e,#c07a4f,#e0b06a,#c8a961);
  --scrim:19,17,14;
}

/* ---------- 2 · Бордо и шампань ---------- */
:root[data-theme="bordeaux"]{
  --bg:#f4ece2; --bg-2:#ecdfd2; --bg-3:#e8d8c9;
  --text:#2d1218; --muted:rgba(45,18,24,.6);
  --accent:#8f2740; --accent-soft:#b06a52; --accent-hi:#e0a878;
  --line:rgba(143,39,64,.26); --line-soft:rgba(45,18,24,.09);
  --dark:#3f0f1d; --dark-2:#4d1626;
  --on-dark:#f6e9dc; --muted-dark:rgba(246,233,220,.62); --accent-dark:#e2b07e;
  --on-video:#f8ece0;
  --header-bg:rgba(244,236,226,.9);
  --fallback:radial-gradient(70% 65% at 62% 38%,#f6efe6,#ecdcd0 55%,#e3cec0);
  --frame:linear-gradient(135deg,#e8d6c8,#dcc3b4 70%);
  --ring:conic-gradient(from 210deg,#c9a15e,#e5c184,#c2705f,#8f2740,#d99a6a,#c9a15e);
  --scrim:30,10,16;
}

/* ---------- 3 · Полночь и латунь ---------- */
:root[data-theme="midnight"]{
  --bg:#ecebe4; --bg-2:#e0dfd6; --bg-3:#dbdad0;
  --text:#151d2e; --muted:rgba(21,29,46,.6);
  --accent:#8a6d33; --accent-soft:#9c8347; --accent-hi:#c9a86a;
  --line:rgba(21,29,46,.2); --line-soft:rgba(21,29,46,.09);
  --dark:#0e1a2e; --dark-2:#152439;
  --on-dark:#eceade; --muted-dark:rgba(236,234,222,.62); --accent-dark:#c9a86a;
  --on-video:#f2f0e6;
  --header-bg:rgba(236,235,228,.9);
  --fallback:radial-gradient(70% 65% at 62% 38%,#f0efe8,#e2e1d8 55%,#d6d5cb);
  --frame:linear-gradient(135deg,#dedcd2,#cdcbc0 70%);
  --ring:conic-gradient(from 210deg,#b8963f,#dcc084,#8fa6c4,#33507e,#c9a86a,#b8963f);
  --scrim:10,18,32;
}

/* ---------- 4 · Пудра и какао ---------- */
:root[data-theme="blush"]{
  --bg:#f2e5de; --bg-2:#e9d7cd; --bg-3:#e4cec2;
  --text:#33201a; --muted:rgba(51,32,26,.6);
  --accent:#a8674c; --accent-soft:#c08a72; --accent-hi:#e0b096;
  --line:rgba(168,103,76,.3); --line-soft:rgba(51,32,26,.09);
  --dark:#2a1a15; --dark-2:#37231c;
  --on-dark:#f5e7de; --muted-dark:rgba(245,231,222,.62); --accent-dark:#d99f7e;
  --on-video:#f8ece4;
  --header-bg:rgba(242,229,222,.9);
  --fallback:radial-gradient(70% 65% at 62% 38%,#f6ebe4,#eeddd3 55%,#e5cec2);
  --frame:linear-gradient(135deg,#e6d1c5,#d8bcae 70%);
  --ring:conic-gradient(from 210deg,#c99a6e,#e8c3a0,#d08a6a,#a8674c,#e0b096,#c99a6e);
  --scrim:26,16,12;
}

/* ============================================================
   Совместимость: старые имена переменных → новые токены
   ============================================================ */
:root, :root[data-theme]{
  /* ореол подписей в галерее: всегда цвет подложки секции, поэтому
     текст читается и на светлом фоне, и поверх самих снимков.
     .dark и .tint ниже переопределяют его для своих блоков */
  --cap-halo:var(--bg);
  --ink:var(--bg); --ink-2:var(--bg-2); --paper:var(--text);
  --gold:var(--accent); --gold-dim:var(--accent-soft);
  --ivory:var(--bg); --ivory-2:var(--bg-2);
  --ink-text:var(--text); --ink-muted:var(--muted);
  --gold-deep:var(--accent); --coal:var(--bg); --ink-warm:var(--dark);
  --terra:var(--accent-soft);
}

/* ============================================================
   Тёмные блоки (~25% страницы): принципы и подвал
   ============================================================ */
.dark{background:var(--dark)!important;color:var(--on-dark)!important;
  border-top:1px solid var(--line)!important;border-bottom:none!important;
  --cap-halo:var(--dark)}
/* !important нужен: инлайновые <style> в <head> идут после подключённых
   файлов и при равной специфичности перебивали бы тему */
.dark h1,.dark h2,.dark h3,.dark h4,.dark .brand,.dark strong,.dark b{color:var(--on-dark)!important}
.dark p,.dark li,.dark small,.dark .l,.dark .foot,.dark figcaption{color:var(--muted-dark)!important}
.dark span:not(.accent):not(.n){color:var(--muted-dark)}
.dark a{color:var(--on-dark)!important}
.dark a:hover{color:var(--accent-dark)!important}
.dark em,.dark .sig,.dark .eyebrow,.dark .kicker,.dark .n,.dark .accent,
.dark .no,.dark .arrow{color:var(--accent-dark)!important}
.dark .sec-head{border-bottom-color:rgba(255,255,255,.16)!important}
.dark .sec-head span{color:var(--muted-dark)!important}
.dark .cred-grid{background:rgba(255,255,255,.13)!important;border-color:rgba(255,255,255,.13)!important}
.dark .cred-grid .c{background:var(--dark)!important}
.dark .cred-grid .n{color:var(--accent-dark)!important}
.dark .cred-grid .l{color:var(--muted-dark)!important}
.dark .btn{border-color:var(--accent-dark)!important;color:var(--accent-dark)!important}
.dark .btn:hover{background:var(--accent-dark)!important;color:var(--dark)!important}
.dark .ph::before{border-color:rgba(255,255,255,.14)!important}
/* волновая галерея внутри тёмной секции */
.dark .wgal-stage{background:var(--dark)!important;
  border-top-color:rgba(255,255,255,.14)!important;border-bottom-color:rgba(255,255,255,.14)!important}
.dark .wgal-cap{color:var(--on-dark)!important}
.dark .wgal-cap::before{background:var(--accent-dark)!important}
.dark .wgal-hint{color:var(--accent-dark)!important}
.dark .wgal-fallback figcaption{color:var(--muted-dark)!important}

/* ============================================================
   Временный переключатель схем (удалить перед сдачей)
   ============================================================ */
.thm{position:fixed;right:22px;bottom:22px;z-index:95;font-family:'Jost',sans-serif;font-weight:300}
.thm-btn{display:flex;align-items:center;gap:9px;background:var(--dark);color:var(--on-dark);
  border:1px solid var(--accent-dark);font-size:10px;letter-spacing:.24em;text-transform:uppercase;
  padding:12px 16px;cursor:pointer;font-family:inherit;box-shadow:0 10px 30px rgba(0,0,0,.28);transition:.3s}
.thm-btn:hover{background:var(--accent-dark);color:var(--dark)}
.thm-box{position:absolute;right:0;bottom:52px;width:288px;background:var(--dark);
  border:1px solid var(--accent-dark);box-shadow:0 24px 60px rgba(0,0,0,.35);padding:18px;display:none}
.thm.open .thm-box{display:block}
.thm-t{font-family:'Cormorant Garamond',serif;font-size:19px;color:var(--on-dark);margin-bottom:2px}
.thm-s{font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:var(--muted-dark);margin-bottom:12px}
.thm-row{display:flex;align-items:center;gap:11px;width:100%;text-align:left;background:none;
  border:1px solid transparent;padding:9px;cursor:pointer;font-family:inherit;font-weight:300;
  color:var(--on-dark);transition:.22s}
.thm-row:hover{background:rgba(255,255,255,.05)}
.thm-row.on{border-color:var(--accent-dark);background:rgba(255,255,255,.07)}
.thm-sw{flex:0 0 auto;width:34px;height:34px;border-radius:50%;position:relative;overflow:hidden;
  border:1px solid rgba(255,255,255,.2)}
.thm-sw s{position:absolute;inset:0;display:block;text-decoration:none}
.thm-sw s:nth-child(1){clip-path:polygon(0 0,100% 0,0 100%)}
.thm-sw s:nth-child(2){clip-path:polygon(100% 0,100% 100%,0 100%)}
.thm-row b{display:block;font-weight:400;font-size:13px}
.thm-row i{display:block;font-style:normal;font-size:10.5px;color:var(--muted-dark);margin-top:2px}
.thm-note{margin-top:11px;font-size:10px;line-height:1.5;color:var(--muted-dark)}
@media(max-width:560px){.thm{right:14px;bottom:14px}.thm-box{width:calc(100vw - 28px)}}

/* ============================================================
   Промежуточный тон (для ритма 60-30-10)
   ============================================================ */
.tint{background:var(--bg-2)!important;color:var(--text)!important;
  border-top:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft);
  --cap-halo:var(--bg-2)}
.tint .sec-head{border-bottom-color:var(--line)}
.tint .sec-head span{color:var(--muted)}
.tint p,.tint .l{color:var(--muted)}
.tint .cred-grid{background:var(--line-soft);border-color:var(--line-soft)}
.tint .cred-grid .c{background:var(--bg-2)}
.tint .st-chip img{border-color:var(--bg-2);background:var(--bg-2)}
.tint .st-chip i{border-color:var(--bg-2);background:var(--accent);color:var(--bg)}
.tint .wgal-stage{background:var(--bg-2)}

/* тёмная секция: кольца и значки сториз обрамляются тёмным */
.dark .st-chip img{border-color:var(--dark)!important;background:var(--dark)!important}
.dark .st-chip i{border-color:var(--dark)!important}
.dark .st-chip u{color:var(--on-dark)!important;opacity:.8}
.dark .st-head b{color:var(--on-dark)!important}
.dark .st-head span{color:var(--muted-dark)!important}
/* цитата на тёмном */
.dark .quote::before{color:var(--accent-dark)!important;opacity:.16}
.dark .manifesto p,.dark blockquote p{color:var(--on-dark)!important}
.dark .manifesto p .lead,.dark .quote .lead{color:var(--accent-dark)!important}
.dark .sig::before,.dark .sig::after{background:var(--accent-dark)!important}

/* разделитель и мини-схема ритма в панели */
.thm-div{margin:14px 0 8px;font-size:9.5px;letter-spacing:.26em;text-transform:uppercase;
  color:var(--muted-dark);border-top:1px solid rgba(255,255,255,.14);padding-top:12px}
.thm-rh{flex:0 0 auto;width:34px;height:34px;display:grid;grid-template-rows:repeat(4,1fr);
  border:1px solid rgba(255,255,255,.2);overflow:hidden}
.thm-rh s{display:block;text-decoration:none}
