/* ===== Переменные (чёрно-белая + киберпанк) ===== */
:root {
  --bg: #080808;
  --bg-elevated: #0c0c0c;
  --bg-card: rgba(255, 255, 255, 0.03);
  --text: #c4c4c4;
  --text-muted: #7a7a7a;
  --accent: #b0b0b0;
  --accent-hover: #d0d0d0;
  --border: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.06);
  --node: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Manrope', system-ui, sans-serif;
  --header-h: 72px;
  --transition: 0.35s ease;
}

/* ===== Сброс и база ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== Фон: картинка со звукоизолирующими панелями ===== */
.bg-panels {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg) url('panels.jpg') center / cover no-repeat;
}

.bg-panels::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.88);
}

/* Когда добавите файл с панелями — положите его в папку с index.html и назовите panels.jpg (или измените путь выше на своё имя файла) */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

.main {
  position: relative;
  z-index: 1;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Анимация появления секций ===== */
.section {
  opacity: 0;
  transform: translateY(24px);
  animation: sectionIn 0.7s ease forwards;
}

.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.15s; }
.section:nth-child(4) { animation-delay: 0.2s; }
.section:nth-child(5) { animation-delay: 0.25s; }
.section:nth-child(6) { animation-delay: 0.3s; }
.section:nth-child(7) { animation-delay: 0.35s; }
.section:nth-child(8) { animation-delay: 0.4s; }
.section:nth-child(9) { animation-delay: 0.45s; }

@keyframes sectionIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Шапка ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.header__logo:hover { color: var(--text); opacity: 0.9; }

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.nav__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-hover);
  border-color: rgba(255, 255, 255, 0.35);
}

.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  padding: 4px;
}

.header__burger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}

.header__burger-check:checked ~ .header__burger .header__burger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.header__burger-check:checked ~ .header__burger .header__burger-line:nth-child(2) {
  opacity: 0;
}
.header__burger-check:checked ~ .header__burger .header__burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  .header__burger { display: flex; }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
  }

  .header__burger-check:checked ~ .nav {
    opacity: 1;
    visibility: visible;
  }

  .nav__link { font-size: 1.1rem; }
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--header-h) 1.5rem 4rem;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 55%),
    transparent;
  animation: heroBg 10s ease-in-out infinite alternate;
}

@keyframes heroBg {
  from { opacity: 0.8; }
  to { opacity: 1; }
}

.hero__content {
  position: relative;
  text-align: center;
  max-width: 640px;
}

.hero__label {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.35s forwards;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.5s forwards;
}

.hero__cta {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.65s forwards;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.hero__cta:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-hover);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Секции ===== */
.section {
  padding: 5rem 0;
}

.section__title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.section__subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

/* About ===== */
.about__grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
}

.about__image-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.about__image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.about__lead {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.about__subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.about__list {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-left: 1.25rem;
}

.about__list li {
  margin-bottom: 0.4rem;
}

.about__list--compact li {
  margin-bottom: 0.25rem;
}

.about__text p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about__image-wrap { max-width: 240px; margin: 0 auto; }
}

/* ===== Портфолио ===== */
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.portfolio__card {
  display: block;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}
.portfolio__card:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.28);
  transform: translateY(-6px) scale(1.02);
}

.portfolio__card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.portfolio__card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.portfolio__card-image--contain img {
  object-fit: cover;
  object-position: center;
}

.portfolio__card-title,
.portfolio__card-desc {
  padding: 1rem 1.25rem;
}

.portfolio__card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.portfolio__card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .portfolio__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .portfolio__grid { grid-template-columns: 1fr; }
}

/* ===== Услуги ===== */
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.services__item {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.services__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.services__icon svg {
  width: 24px;
  height: 24px;
}

.services__icon--games svg {
  width: 40px;
  height: 40px;
}

.services__item-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.services__item p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .services__grid { grid-template-columns: 1fr; }
}

/* ===== Отзывы ===== */
/* ===== Контакты ===== */
.contacts {
  text-align: center;
}

.contacts__lead {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.contacts__links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.contacts__link {
  font-weight: 500;
  font-size: 1.05rem;
}

.contacts__cta {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.contacts__cta:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-hover);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ===== Футер ===== */
.footer {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  justify-content: center;
}

.footer__copy {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Модалка прайса ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal:target {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  animation: overlayIn 0.3s ease;
}

.modal:target .modal__overlay {
  animation: overlayIn 0.3s ease;
}

.modal__box {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  animation: modalIn 0.35s ease;
}

.modal__box--wide {
  max-width: 560px;
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.modal__close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.modal__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-right: 2.5rem;
}

.modal__body {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.modal__body p + p { margin-top: 0.75rem; }

/* Прайс внутри модалки */
.price__heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.price__heading:first-child { margin-top: 0; }

.price__list {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.price__list li {
  margin-bottom: 0.35rem;
}

.price__item {
  margin-bottom: 0.75rem;
}

.price__note {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
