/* eltanin.name · основная таблица стилей */
:root {
  --sky: #0b0e1a;
  --sky-2: #121729;
  --panel: #161c31;
  --line: #2a3150;
  --text: #dfe3ef;
  --muted: #9aa3bf;
  --star: #f2a35e;      /* оранжевый, как у звезды класса K */
  --star-soft: #f7c9a0;
  --link: #9fc2ff;
  --radius: 14px;
  --wrap: 920px;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(1200px 700px at 70% -10%, #1b2244 0%, var(--sky) 60%) fixed, var(--sky);
  color: var(--text);
  font: 17px/1.65 var(--sans);
}

#sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--star-soft); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Шапка и навигация */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(11, 14, 26, .85);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font: 600 19px/1 var(--serif);
  letter-spacing: .02em;
}
.logo svg { width: 22px; height: 22px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 15px;
  cursor: pointer;
}
.nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.nav a:hover { color: var(--text); background: var(--sky-2); }
.nav a[aria-current="page"] { color: var(--star); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--sky);
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 16px 16px; }
}

/* Основной контент */
main { flex: 1; padding: 40px 0 64px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(30px, 6vw, 46px); margin: 0 0 12px; }
h2 { font-size: 26px; margin: 48px 0 12px; }
h3 { font-size: 19px; margin: 28px 0 8px; }
p { margin: 0 0 14px; }

.lead { font-size: 19px; color: var(--muted); max-width: 680px; }

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 24px 0 8px;
}
.hero-star {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 40%, #fff3e2 0%, #ffc98f 18%, var(--star) 45%, #b8612a 72%, rgba(184, 97, 42, 0) 73%);
  box-shadow: 0 0 60px 10px rgba(242, 163, 94, .35), 0 0 140px 40px rgba(242, 163, 94, .12);
}
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  .hero-star { width: 120px; height: 120px; order: -1; }
}

/* Факты */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 32px 0;
}
.fact {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.fact b {
  display: block;
  font: 700 26px/1.2 var(--serif);
  color: var(--star-soft);
}
.fact span { font-size: 14px; color: var(--muted); }

/* Карточки разделов */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--star); transform: translateY(-2px); color: var(--text); }
.card h3 { margin-top: 0; color: var(--star-soft); }
.card p { color: var(--muted); font-size: 15px; margin: 0; }

/* Таблицы */
.table-wrap { overflow-x: auto; margin: 16px 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td:first-child { color: var(--star-soft); white-space: nowrap; }

/* Врезки */
.note {
  background: var(--sky-2);
  border-left: 3px solid var(--star);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 15px;
}
.calc {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 14px;
  background: #0f1324;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  white-space: pre;
}

/* Хронология */
.timeline { list-style: none; margin: 16px 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 20px 22px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--star);
  box-shadow: 0 0 10px var(--star);
}
.timeline b { color: var(--star-soft); font-family: var(--serif); }

/* Карта неба */
.skymap {
  background: #070913;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  margin: 16px 0 6px;
}
.skymap svg { display: block; width: 100%; height: auto; }
.caption { font-size: 14px; color: var(--muted); }

/* Источники */
.sources { font-size: 14px; color: var(--muted); padding-left: 20px; }
.sources li { margin-bottom: 8px; }

/* Форма */
.form { display: grid; gap: 16px; max-width: 560px; margin-top: 16px; }
.form label { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.form input, .form textarea {
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--star); outline-offset: 1px; }
.form textarea { min-height: 140px; resize: vertical; }
.btn {
  justify-self: start;
  font: 600 16px/1 var(--sans);
  color: #1a1206;
  background: var(--star);
  border: 0;
  border-radius: 10px;
  padding: 12px 22px;
  cursor: pointer;
}
.btn:hover { background: var(--star-soft); }
.form-status { font-size: 15px; min-height: 1.5em; color: var(--star-soft); }

/* Подвал */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  font-size: 14px;
  color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: var(--muted); }
