/* Fartuna — космическая тема (Матрица судьбы).
   Единый тёмный визуальный мир: индиго-ночь, золото, звёздная пыль. */

:root {
  --bg:        #100E24;
  --bg-deep:   #0A0819;
  --panel:     #1A1740;
  --panel-2:   #221E4C;
  --line:      #322C5E;
  --line-soft: #2A2550;
  --ink:       #F2EFFF;
  --ink-soft:  #ABA3CE;
  --ink-dim:   #7E77A6;
  --gold:      #E7B94E;
  --gold-soft: #F3D48C;
  --gold-deep: #C6952E;
  --rose:      #CB82B4;
  --good:      #6FD39B;
  --warn:      #E79A6B;
  --radius:    14px;
  --maxw:      1120px;
  --shadow:    0 24px 60px -30px rgba(0,0,0,.8);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  /* звёздная пыль: несколько слоёв радиальных точек + сияние */
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.5px 1.5px at 78% 12%, rgba(255,255,255,.40), transparent),
    radial-gradient(1px 1px at 32% 42%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 62% 68%, rgba(255,255,255,.30), transparent),
    radial-gradient(1.5px 1.5px at 88% 78%, rgba(255,255,255,.35), transparent),
    radial-gradient(2px 2px at 45% 88%, rgba(231,185,78,.30), transparent),
    radial-gradient(900px 500px at 80% -10%, rgba(75,58,140,.45), transparent),
    radial-gradient(760px 460px at 5% 110%, rgba(120,60,120,.22), transparent);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .3px;
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 700; margin: 0 0 16px; }
h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 14px; }
h3 { font-size: 22px; margin: 0 0 8px; }
h4 { font-size: 19px; margin: 18px 0 6px; }

p { margin: 0 0 14px; }

/* ── Шапка ─────────────────────────────────────────────── */
header.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(12,10,30,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
header.site .wrap {
  display: flex; align-items: center; gap: 26px;
  min-height: 74px; flex-wrap: wrap;
}
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo svg { width: 36px; height: 36px; filter: drop-shadow(0 0 10px rgba(231,185,78,.45)); }
.logo .word {
  display: flex; flex-direction: column; line-height: 1.05;
  font-family: var(--font-display); font-weight: 700; font-size: 24px;
  letter-spacing: 1.5px; color: var(--ink);
}
.logo .word small {
  font-family: var(--font-body); font-weight: 600; font-size: 8.5px;
  letter-spacing: 3px; color: #D9C48E;
}
.logo .word b { color: var(--gold); font-weight: 700; }
nav.main { display: flex; gap: 22px; }
nav.main a {
  color: var(--ink-soft); font-size: 15px; font-weight: 500;
  padding: 6px 0; position: relative;
}
nav.main a:hover { color: var(--ink); }
nav.main a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--gold); transition: right .25s ease;
}
nav.main a:hover::after { right: 0; }
.spacer { flex: 1; }
.lang-switch select {
  width: auto; margin: 0; padding: 8px 12px; font-size: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-soft); cursor: pointer;
}
.lang-switch select:focus { border-color: var(--gold); box-shadow: none; }

/* глазок «показать пароль» */
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 46px; }
.pwd-eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-58%);
  background: none; border: 0; padding: 4px; cursor: pointer;
  color: var(--ink-dim); display: flex; align-items: center;
}
.pwd-eye:hover { color: var(--ink-soft); }
.pwd-eye.on { color: var(--gold); }

/* ── Кнопки ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 15px; font-weight: 700;
  letter-spacing: .3px; cursor: pointer; border: 0; border-radius: 999px;
  padding: 12px 26px; color: #241a05;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 10px 26px -12px rgba(231,185,78,.7);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(231,185,78,.85); color: #241a05; filter: brightness(1.04); }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-outline {
  background: transparent; color: var(--gold-soft);
  border: 1px solid var(--gold-deep); box-shadow: none; padding: 11px 24px;
}
.btn-outline:hover { background: rgba(231,185,78,.1); color: var(--gold); }

/* ── Секции и карточки ─────────────────────────────────── */
section { padding: 60px 0; }
.eyebrow {
  font-family: var(--font-body); font-size: 12px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--gold);
  margin: 0 0 14px;
}
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }

/* ── Hero ──────────────────────────────────────────────── */
.hero { position: relative; padding: 78px 0 40px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 18px; color: var(--ink-soft); max-width: 46ch; margin-bottom: 26px; }
.hero .star-emblem { display: flex; justify-content: center; align-items: center; }
.hero .star-emblem svg { width: min(420px, 82%); height: auto; filter: drop-shadow(0 0 40px rgba(231,185,78,.35)); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%,100% { opacity: .5; } 50% { opacity: 1; } }
.star-emblem .rotor { transform-origin: 300px 300px; animation: spin 90s linear infinite; }
.star-emblem .twinkle { animation: twinkle 3.5s ease-in-out infinite; }

/* ── Калькулятор ───────────────────────────────────────── */
.calc-shell { max-width: 560px; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.tab-button {
  padding: 10px 20px; border: 1px solid var(--line); background: var(--panel);
  color: var(--ink-soft); border-radius: 999px; cursor: pointer;
  font-family: var(--font-body); font-size: 14px; font-weight: 600; transition: .2s;
}
.tab-button:hover { color: var(--ink); border-color: var(--gold-deep); }
.tab-button.active {
  color: #241a05; border-color: transparent;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
}
.tab-content { display: none; }
.tab-content.active { display: block; }

label { display: block; font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
input[type=text], input[type=date], input[type=email], input[type=password],
select, textarea {
  width: 100%; padding: 12px 14px; margin: 4px 0 14px;
  background: var(--bg-deep); border: 1px solid var(--line);
  border-radius: 10px; color: var(--ink); font-size: 15px; font-family: var(--font-body);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(231,185,78,.18);
}
input::placeholder { color: var(--ink-dim); }
.sex { display: flex; gap: 18px; margin-bottom: 14px; }
.sex label { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); margin: 0; cursor: pointer; }
input[type=radio] { width: auto; accent-color: var(--gold); margin: 0; }

/* ── Результат: аккордеоны ─────────────────────────────── */
.accordion {
  border: 1px solid var(--line); border-radius: var(--radius);
  margin: 14px 0; background: linear-gradient(180deg, var(--panel), var(--panel-2));
  overflow: hidden;
}
.accordion > .acc-head {
  padding: 17px 22px; font-family: var(--font-display); font-weight: 600;
  font-size: 21px; cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; color: var(--ink);
}
.accordion > .acc-head span { color: var(--gold); transition: transform .25s; }
.accordion.open > .acc-head span { transform: rotate(180deg); }
.accordion > .acc-body { display: none; padding: 0 22px 20px; }
.accordion.open > .acc-body { display: block; }
.accordion .acc-body h4 { color: var(--gold-soft); }

.locked-note {
  background: rgba(231,185,78,.08); border: 1px dashed var(--gold-deep);
  padding: 11px 15px; border-radius: 10px; font-size: 14px; margin: 8px 0 16px;
  color: var(--ink-soft);
}
.locked-note a { font-weight: 700; }

.tbl-scroll { overflow-x: auto; margin: 12px 0; }

/* таблица чакр / Карта здоровья */
table.chakras { border-collapse: collapse; width: 100%; font-size: 14px; margin: 12px 0; min-width: 460px; }
table.chakras th, table.chakras td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: middle; }
table.chakras th { background: var(--bg-deep); color: var(--gold-soft); font-weight: 600; }
table.chakras th.num, table.chakras td.num {
  text-align: center; font-family: "IBM Plex Mono", var(--font-body);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
table.chakra-map td.num { font-size: 15px; color: var(--gold-soft); font-weight: 600; }
table.chakra-map tr.chakra-total { background: rgba(231,185,78,.07); }
table.chakra-map tr.chakra-total b { color: var(--gold); }

/* прогноз на день */
.forecast-scales { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 10px 0; }
.scale { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg-deep); }
.scale .val { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--gold); }
.scale small { color: var(--ink-dim); }

/* диаграмма */
.diagram { max-width: 460px; margin: 12px auto; }
.diagram svg { width: 100%; height: auto; filter: drop-shadow(0 0 24px rgba(231,185,78,.25)); }
.diagram-full { max-width: 640px; }

/* ── Тарифы ────────────────────────────────────────────── */
.price-old { text-decoration: line-through; color: var(--ink-dim); margin-right: 8px; }
.price { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--gold); }
.plan-card { text-align: center; position: relative; }
.plan-card.featured { border-color: var(--gold-deep); box-shadow: 0 0 0 1px var(--gold-deep), var(--shadow); }

/* ── Кабинет ───────────────────────────────────────────── */
.cab-menu ul li { margin: 2px 0; }
.cab-menu ul li a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink-soft); }
.cab-menu ul li a:hover { background: var(--panel-2); color: var(--ink); }

/* ── Отзывы ────────────────────────────────────────────── */
.quote { font-family: var(--font-display); font-size: 19px; font-style: italic; color: var(--ink); }
.quote-author { color: var(--gold-soft); font-weight: 600; margin-top: 10px; font-style: normal; font-family: var(--font-body); font-size: 14px; }

/* ── Сообщения ─────────────────────────────────────────── */
.messages { padding: 0; margin: 16px auto; list-style: none; }
.messages li {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  padding: 12px 16px; border-radius: 8px; margin: 8px 0;
}

/* ── Футер ─────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--line-soft); margin-top: 50px;
  padding: 40px 0; color: var(--ink-dim); font-size: 14px;
  background: var(--bg-deep);
}
footer.site a { color: var(--ink-soft); }
footer.site a:hover { color: var(--gold); }
.footer-social { display: flex; gap: 16px; margin-top: 12px; }

/* ── Загрузчик ─────────────────────────────────────────── */
#loader {
  display: none; position: fixed; inset: 0; z-index: 99;
  background: rgba(10,8,25,.86); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; flex-direction: column; gap: 18px;
  color: var(--gold-soft); font-family: var(--font-display); font-size: 22px;
}
#loader .spinner { width: 54px; height: 54px; animation: spin 1.4s linear infinite; }

/* ── Бургер / мобильное меню ───────────────────────────── */
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { width: 26px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }

.menu-cab { display: none; }

@media (max-width: 860px) {
  nav.main {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(12,10,30,.97); backdrop-filter: blur(14px);
    padding: 10px 22px 20px; border-bottom: 1px solid var(--line);
    transform: translateY(-140%); transition: transform .3s ease;
  }
  nav.main.open { transform: translateY(0); }
  nav.main a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  nav.main .menu-cab { display: block; color: var(--gold); font-weight: 700; border-bottom: none; }
  .header-cab { display: none; }
  .burger { display: flex; order: 3; }
  .spacer { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero .star-emblem { order: -1; }
  .cab-wrap { grid-template-columns: 1fr !important; }
}

.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; display: flex; gap: 16px; align-items: center;
  justify-content: space-between; flex-wrap: wrap; box-shadow: var(--shadow); font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
}
