/* ============================================
   xRossinka — лор
   ============================================ */

/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
  /* Фоны */
  --bg:            #12100f;
  --bg-elevated:   #1a1715;
  --bg-soft:       #231f1c;
  --bg-deep:       #0b0a09;
  --bg-warm:       #1f1a17;

  /* Текст */
  --text:          #f0ebe4;
  --text-muted:    #a89e94;
  --text-dim:      #6b625a;

  /* Акценты */
  --accent:        #d94a4a;
  --accent-soft:   #ff6b6b;
  --accent-2:      #9b6bff;
  --accent-2-soft: #b88aff;
  --accent-warm:   #e8a55c;
  --accent-warm-soft: #f5c48a;
  --accent-angel:  #7ec8ff;
  --accent-angel-soft: #a8dcff;

  /* Градиенты */
  --gradient:      linear-gradient(135deg, #d94a4a 0%, #9b6bff 100%);
  --gradient-warm: linear-gradient(135deg, #e8a55c 0%, #d94a4a 100%);
  --gradient-angel: linear-gradient(135deg, #7ec8ff 0%, #b88aff 100%);

  /* Границы и тени */
  --border:        #2e2823;
  --border-soft:   #221d19;
  --shadow:        0 8px 24px rgba(0, 0, 0, 0.45);
  --glow:          0 0 24px rgba(217, 74, 74, 0.2);
  --glow-angel:    0 0 24px rgba(126, 200, 255, 0.2);
  --glow-warm:     0 0 24px rgba(232, 165, 92, 0.2);

  /* Шрифты */
  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent:   'Cormorant Infant', Georgia, serif;

  /* Размеры шрифтов */
  --fs-hero:       clamp(2.5rem, 6vw, 4.5rem);
  --fs-h1:         clamp(2rem, 4vw, 3rem);
  --fs-h2:         clamp(1.5rem, 3vw, 2.25rem);
  --fs-h3:         clamp(1.25rem, 2vw, 1.5rem);
  --fs-body:       1.0625rem;
  --fs-small:      0.9375rem;
  --fs-tiny:       0.8125rem;

  /* Радиусы и отступы */
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --radius-pill:   999px;
  --gap:           24px;
  --gap-lg:        48px;
  --gap-xl:        80px;

  /* Контейнеры */
  --container:     1000px;
  --container-text: 720px;
}

/* ===== СБРОС ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(217, 74, 74, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(155, 107, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(232, 165, 92, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ===== ТИПОГРАФИКА ===== */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

/* ===== КОНТЕЙНЕР ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container--text {
  max-width: var(--container-text);
  margin-left: auto;
  margin-right: auto;
}

/* ===== УТИЛИТЫ ===== */
.muted { color: var(--text-muted); font-size: var(--fs-small); }
.dim   { color: var(--text-dim);   font-size: var(--fs-tiny); }

/* ===== ХЕДЕР ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(18, 16, 15, 0.7);
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(18, 16, 15, 0.92);
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  height: 68px;
}

/* ===== ЛОГОТИП ===== */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s ease;
}

.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 0 8px rgba(217, 74, 74, 0.5));
}

.logo:hover .logo-img {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 12px rgba(217, 74, 74, 0.8));
}

.logo-text {
  font-family: var(--font-accent);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.logo:hover .logo-text {
  color: var(--accent-soft);
}

/* ===== НАВИГАЦИЯ ===== */
.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav a {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
  padding: 4px 0;
}

.nav a:hover { color: var(--text); }
.nav a.is-active { color: var(--text); }

.nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--gradient);
  border-radius: var(--radius-pill);
}

/* ===== СОЦСЕТИ В ХЕДЕРЕ ===== */
.header-socials {
  display: flex;
  gap: 14px;
  align-items: center;
}

.social-link {
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.social-link svg {
  width: 100%;
  height: 100%;
}

.social-link:hover {
  color: var(--accent-soft);
  transform: translateY(-2px);
}

/* ===== БУРГЕР ===== */
.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== МОБИЛКА (ХЕДЕР) ===== */
@media (max-width: 860px) {
  .nav,
  .header-socials {
    display: none;
  }

  .burger {
    display: flex;
  }

  .nav.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(18, 16, 15, 0.98);
    backdrop-filter: blur(16px);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav.is-open a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: var(--fs-body);
  }

  .nav.is-open a:last-child {
    border-bottom: none;
  }

  .nav.is-open a.is-active::after {
    display: none;
  }

  .nav.is-open a.is-active {
    color: var(--accent-soft);
  }
}

/* ===== ОСНОВНАЯ ЧАСТЬ ===== */
.site-main {
  position: relative;
  z-index: 1;
}

.section {
  padding: var(--gap-xl) 0;
  position: relative;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--gap-lg);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 48px;
  height: 2px;
  background: var(--gradient);
  border-radius: var(--radius-pill);
}

.section--accent::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(217, 74, 74, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}

/* ===== СТЕКЛЯННАЯ ПАНЕЛЬ ===== */
.glass {
  position: relative;
  background: rgba(26, 23, 21, 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(240, 235, 228, 0.06);
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(240, 235, 228, 0.08);
  padding: var(--gap-lg);
  overflow: hidden;
}

.glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(240, 235, 228, 0.15) 50%,
    transparent 100%
  );
  pointer-events: none;
}

/* ===== О НЕЙ ===== */
.about-panel {
  /* панель на всю ширину контейнера */
}

.about-intro {
  margin-bottom: var(--gap-lg);
}

.about-lead {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: var(--gap);
  letter-spacing: 0.01em;
}

.about-text {
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.75;
}

.about-text p + p {
  margin-top: 1.25em;
}

/* ===== ЧИПЫ ===== */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(35, 31, 28, 0.6);
  color: var(--text-muted);
  border: 1px solid rgba(240, 235, 228, 0.08);
  border-radius: var(--radius-pill);
  font-size: var(--fs-tiny);
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.chip:hover {
  color: var(--accent-soft);
  border-color: var(--accent);
  background: rgba(35, 31, 28, 0.8);
}

/* ===== ФУТЕР ===== */
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-soft);
  padding: var(--gap-xl) 0 var(--gap-lg);
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--gap-lg);
  align-items: start;
}

.footer-logo {
  display: block;
  font-family: var(--font-accent);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: var(--fs-small);
  max-width: 320px;
  line-height: 1.6;
}

.footer-nav,
.footer-socials {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a,
.footer-socials a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-small);
  transition: color 0.2s ease, transform 0.2s ease;
  width: fit-content;
}

.footer-nav a:hover,
.footer-socials a:hover {
  color: var(--accent-soft);
  transform: translateX(2px);
}

.footer-bottom {
  margin-top: var(--gap-lg);
  padding-top: var(--gap);
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap);
  flex-wrap: wrap;
}

.footer-author {
  color: var(--accent-soft);
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-author:hover {
  color: var(--accent);
}

/* ===== МОБИЛКА (СЕКЦИИ, СТЕКЛО, ФУТЕР) ===== */
@media (max-width: 768px) {
  .section {
    padding: var(--gap-lg) 0;
  }

  .section-title {
    margin-bottom: var(--gap);
  }

  .glass {
    padding: var(--gap);
    border-radius: var(--radius);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--gap);
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ===== МОДАЛЬНОЕ ОКНО «В РАЗРАБОТКЕ» ===== */
.dev-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: devFadeIn 0.4s ease;
}

.dev-modal[hidden] {
  display: none;
}

/* Затемнение фона */
.dev-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 10, 9, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Само окно */
.dev-modal__dialog {
  position: relative;
  max-width: 480px;
  width: 100%;
  background: rgba(26, 23, 21, 0.95);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(240, 235, 228, 0.08);
  border-radius: var(--radius-lg);
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(240, 235, 228, 0.1);
  animation: devSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Верхняя градиентная полоска */
.dev-modal__dialog::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Иконка-звёздочка */
.dev-modal__icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 16px;
  filter: drop-shadow(0 0 12px rgba(217, 74, 74, 0.6));
  animation: devPulse 3s ease-in-out infinite;
}

.dev-modal__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 0.01em;
}

.dev-modal__text {
  color: var(--text-muted);
  font-size: var(--fs-small);
  line-height: 1.65;
  margin-bottom: 28px;
}

.dev-modal__button {
  display: inline-block;
  padding: 12px 32px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(217, 74, 74, 0.35);
}

.dev-modal__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217, 74, 74, 0.5);
}

.dev-modal__button:active {
  transform: translateY(0);
}

/* Анимации */
@keyframes devFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes devSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes devPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

/* Мобилка */
@media (max-width: 768px) {
  .dev-modal__dialog {
    padding: 32px 24px 24px;
  }

  .dev-modal__title {
    font-size: 1.5rem;
  }
}

/* Уважение к prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .dev-modal,
  .dev-modal__dialog,
  .dev-modal__icon {
    animation: none;
  }
}