@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #faf7fc;
  --ink: #2e2a38;
  --muted: #6b6478;
  --lilac: #c9b6e4;
  --mint: #a8d8d8;
  --peach: #f3c9c0;
  --card: #ffffff;
  --border: #e7e0ef;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; color: var(--muted); }

a { color: inherit; }

/* ===== Шапка – без линии, с небольшим нижним отступом ===== */
nav.site-nav {
  padding: 28px 0 8px;
}

nav.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.lang-switch {
  display: flex;
  gap: 2px;
  font-size: 0.82rem;
}

.lang-switch a {
  text-decoration: none;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.lang-switch a[aria-current="true"] {
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--border);
  font-weight: 500;
}

.lang-switch span {
  color: var(--border);
}

.brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ——— Акцент в навигации (нижняя черта) ——— */
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease, border-bottom 0.2s ease;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
  border-bottom-color: var(--lilac);
}

/* ===== Основной контент ===== */
main {
  padding: 8px 0 80px;
}

/* Фигура – с большим верхним отступом, чтобы быть ниже шапки */
.orb {
  position: relative;
  height: 260px;
  margin: 40px 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--lilac), var(--mint) 60%, var(--peach) 100%);
  filter: blur(2px);
  opacity: 0.55;
  animation: float 9s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .orb::before { animation: none; }
}

/* ——— Заголовок и текст слегка на фигуре ——— */
.orb + h1 {
  margin-top: -100px;           /* поднимаем заголовок, чтобы он перекрывал фигуру */
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 12px rgba(255,255,255,0.8), 0 4px 20px rgba(255,255,255,0.4);
}

.orb + h1 + .lede {
  margin-top: -10px;            /* слегка поднимаем подзаголовок */
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(255,255,255,0.7);
}
/* ——— Конец изменений для наложения на фигуру ——— */

.lede {
  font-size: 1.05rem;
  color: var(--ink);
  max-width: 46ch;
}

/* Кнопки */
.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--lilac), var(--mint));
  color: #2b2740;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(169, 150, 200, 0.35); }

.btn-secondary {
  background: var(--card);
  border-color: var(--border);
  color: var(--ink);
}

.btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }

/* Карточка погоды */
.weather-card {
  margin-top: 28px;
  padding: 32px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
}

.status-line {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

.temp-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.temp-big {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 4rem;
  font-weight: 500;
  line-height: 1;
}

.condition {
  font-size: 1.1rem;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.detail-grid div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.detail-value {
  font-size: 1.05rem;
  font-weight: 500;
}

/* ===== Неделя: широкая колонка дней ===== */
.week-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.day-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
}

.day-name {
  width: 120px;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
  padding-right: 8px;
}

.day-cond {
  flex: 1;
  color: var(--muted);
  font-size: 0.92rem;
}

.day-temps {
  display: flex;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.day-hi { font-weight: 600; }
.day-lo { color: var(--muted); }

/* Страница "Об авторе" */
.about-body p { color: var(--ink); }

.signature {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  color: var(--muted);
}

footer {
  padding: 40px 0 60px;
  color: var(--muted);
  font-size: 0.85rem;
}

.empty-state {
  margin-top: 28px;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}

/* Мобильные */
@media (max-width: 480px) {
  .temp-big { font-size: 3rem; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .day-name { width: 90px; }
}