/* ОЗЕРО ФИТНЕС ХОЛЛ — стили юридических страниц.
   Наследуют палитру и типографику главной страницы. */

:root {
  /* ── Бренд (не зависит от темы) ── */
  --gold: #d99a3d;
  --gold-soft: #f2c470;
  --bronze: #8a5a2a;
  --ivory: #fdfbf7;
  --ivory-dim: #c5bba8;
  --radius: 20px;
  --radius-pill: 100px;
  --font-head: 'Trajan Pro 3', 'Trajan Pro', serif;
  --font-body: 'Montserrat', sans-serif;
  --easing: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* ── Тёмная тема (по умолчанию) ── */
  color-scheme: dark;
  --bg-base: #060403;
  --bg-grad: #120d09;
  --text: #fdfbf7;
  --text-dim: #c5bba8;
  --text-mute: rgba(255, 255, 255, 0.4);
  --text-faint: rgba(255, 255, 255, 0.3);
  --accent: #f2c470;
  --on-accent: #110e08;
  --accent-tint: rgba(217, 154, 61, 0.06);
  --gold-glow: rgba(217, 154, 61, 0.4);
  --surface: rgba(20, 15, 12, 0.5);
  --line: rgba(255, 255, 255, 0.05);
  --line-soft: rgba(255, 255, 255, 0.08);
  --line-gold: rgba(242, 196, 112, 0.15);
  --line-gold-strong: rgba(242, 196, 112, 0.3);
  --header-bg: rgba(6, 4, 3, 0.88);
  --bullet: #8a5a2a;
  --glass-border: var(--line-gold);
}

/* ── Светлая тема ──
   Золотой текст #f2c470 на светлом фоне нечитаем, поэтому акцент
   уходит в бронзу; золотые заливки (ховер кнопки) остаются золотыми. */
[data-theme="light"] {
  color-scheme: light;
  --bg-base: #f4efe6;
  --bg-grad: #fffdf9;
  --text: #1a1310;
  --text-dim: #574a3d;
  --text-mute: rgba(26, 19, 16, 0.45);
  --text-faint: rgba(26, 19, 16, 0.4);
  --accent: #8f5a18;
  --on-accent: #21170e;
  --accent-tint: rgba(143, 90, 24, 0.07);
  --gold-glow: rgba(143, 90, 24, 0.3);
  --surface: rgba(255, 255, 255, 0.72);
  --line: rgba(26, 19, 16, 0.1);
  --line-soft: rgba(26, 19, 16, 0.12);
  --line-gold: rgba(143, 90, 24, 0.2);
  --line-gold-strong: rgba(143, 90, 24, 0.38);
  --header-bg: rgba(255, 253, 248, 0.9);
  --bullet: #a06a20;
}

/* ── Переключатель темы ── */
.doc-header-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border: 1px solid var(--line-gold-strong); border-radius: 50%;
  background: var(--accent-tint); color: var(--accent);
  cursor: pointer; padding: 0;
  transition: all 0.35s var(--easing);
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.theme-toggle .ic-sun { display: none; }
[data-theme="light"] .theme-toggle .ic-sun { display: block; }
[data-theme="light"] .theme-toggle .ic-moon { display: none; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-base);
  background-image: radial-gradient(circle at 50% 0%, var(--bg-grad) 0%, var(--bg-base) 70%);
  background-attachment: fixed;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.45s var(--easing), color 0.45s var(--easing);
}

::selection { background: var(--gold-soft); color: #000; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.doc-wrap { max-width: 860px; margin: 0 auto; padding: 0 32px; }

/* ── Шапка ───────────────────────────────────────── */
.doc-header {
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 50;
  transition: background-color 0.45s var(--easing), border-color 0.45s var(--easing);
}
.doc-header .doc-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.word-mark {
  font-family: var(--font-head);
  font-size: 18px;
  letter-spacing: 0.35em;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.back-link {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--line-gold-strong);
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  transition: all 0.4s var(--easing);
  white-space: nowrap;
}
.back-link:hover {
  background: var(--gold-soft);
  color: var(--on-accent);
  box-shadow: 0 0 20px var(--gold-glow);
}

/* ── Заголовок документа ─────────────────────────── */
.doc-hero { padding: 80px 0 48px; }
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.eyebrow::before { content: ''; width: 20px; height: 1px; background: var(--accent); }

.doc-hero h1 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.doc-meta {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

/* ── Тело документа ──────────────────────────────── */
.doc-body { padding-bottom: 100px; }
.doc-body section { margin-bottom: 44px; }

.doc-body h2 {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-gold);
}
.doc-body h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 28px 0 12px;
}
.doc-body p { margin-bottom: 14px; }
.doc-body ul, .doc-body ol { margin: 0 0 18px 22px; }
.doc-body li { margin-bottom: 9px; }
.doc-body ul { list-style: none; margin-left: 0; }
.doc-body ul > li {
  position: relative;
  padding-left: 22px;
}
.doc-body ul > li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bullet);
}
.doc-body ol { counter-reset: item; list-style: none; margin-left: 0; }
.doc-body ol > li {
  counter-increment: item;
  position: relative;
  padding-left: 32px;
}
.doc-body ol > li::before {
  content: counter(item) '.';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
}
.doc-body strong { color: var(--text); font-weight: 500; }
.doc-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--line-gold-strong); }
.doc-body a:hover { border-bottom-color: var(--accent); }

/* Карточка реквизитов */
.req-card {
  background: var(--surface);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  padding: 32px;
  margin: 24px 0;
  transition: background-color 0.45s var(--easing), border-color 0.45s var(--easing);
}
.req-card dl { display: grid; grid-template-columns: 210px 1fr; gap: 12px 24px; }
.req-card dt {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 600;
  padding-top: 3px;
}
.req-card dd { color: var(--text); font-size: 14px; line-height: 1.5; }

/* Замечание-плейсхолдер */
.todo {
  border-left: 2px solid var(--accent);
  background: var(--accent-tint);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 13px;
  color: var(--accent);
  border-radius: 0 12px 12px 0;
}

/* Таблица */
.doc-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.doc-table th, .doc-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.doc-table th {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.doc-table td { color: var(--text-dim); }

/* ── Подвал ──────────────────────────────────────── */
.doc-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 60px;
}
.doc-footer .doc-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.doc-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.doc-footer a { color: var(--text-mute); text-decoration: none; transition: color 0.3s; }
.doc-footer a:hover { color: var(--accent); }

@media (max-width: 700px) {
  body { font-size: 14px; }
  .doc-wrap { padding: 0 20px; }
  .doc-header .doc-wrap { gap: 12px; }
  .back-link { padding: 9px 16px; }
  .doc-hero { padding: 48px 0 32px; }
  .req-card { padding: 22px; }
  .req-card dl { grid-template-columns: 1fr; gap: 4px; }
  .req-card dd { margin-bottom: 12px; }
  .doc-table, .doc-table tbody, .doc-table tr, .doc-table td, .doc-table th { display: block; width: 100%; }
  .doc-table thead { display: none; }
  .doc-table tr { border-bottom: 1px solid var(--line-soft); padding: 8px 0; }
  .doc-table td { border: none; padding: 4px 0; }
}

@media (prefers-reduced-motion: reduce) {
  body, .doc-header, .req-card, .theme-toggle { transition: none; }
}
