* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --bg: #07060a;
  --card: #0f1220;
  --muted: #9aa4b2;
  --accent: #7c3aed;
  --radius: 14px;
  --maxw: 1180px;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}
html {
  scroll-behavior: smooth;
}
body {
  height: 100%;
  font-family: var(--font-family);
  background: var(--bg);
  color: #e6eef8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}
[data-theme="light"] {
  --bg: #ffffff;
  --card: #ffffff;
  --muted: #374151;
  color: #111827;
}
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.muted { color: var(--muted) !important; }
.accent { color: var(--accent); }
.text-outline {
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000,
               -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
}
[data-theme="light"] .text-outline {
  text-shadow: none;
  color: #111827 !important;
}
.text-xs { font-size: 0.75rem; }
.hidden { display: none !important; }

/* Фоновые элементы */
.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Анимированная нейронная сеть */
.neural-network {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  z-index: 1;
}

.neuron {
  position: absolute;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, #5d9fff, #2a4bff);
  border-radius: 50%;
  box-shadow: 0 0 15px #5d9fff;
  z-index: 2;
}

.connection {
  position: absolute;
  background: linear-gradient(to right, rgba(93, 159, 255, 0.1), rgba(93, 159, 255, 0.8));
  height: 1px;
  transform-origin: left center;
  z-index: 1;
}

/* Мозговые волны */
.brain-waves {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  z-index: 1;
}

.wave {
  position: absolute;
  width: 100%;
  height: 100px;
  background: transparent;
  border-bottom: 1px solid rgba(157, 122, 255, 0.3);
  animation: waveMove 20s infinite linear;
}

.wave:nth-child(2) {
  top: 25%;
  animation-delay: -5s;
  opacity: 0.2;
}

.wave:nth-child(3) {
  top: 50%;
  animation-delay: -10s;
  opacity: 0.15;
}

.wave:nth-child(4) {
  top: 75%;
  animation-delay: -15s;
  opacity: 0.1;
}

/* Плавающие элементы мозга */
.brain-element {
  position: absolute;
  background: transparent;
  border-radius: 50%;
  opacity: 0.1;
  filter: blur(2px);
  z-index: 1;
}

.brain-element-1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 5%;
  border: 1px solid #5d9fff;
  animation: float 25s infinite linear;
}

.brain-element-2 {
  width: 200px;
  height: 200px;
  bottom: 15%;
  right: 10%;
  border: 1px solid #9d7aff;
  animation: float 30s infinite linear reverse;
}

/* Мерцающие частицы */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: #9d7aff;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 10px #9d7aff;
  animation: twinkle 3s infinite;
}

/* Тонкий слой для глубины */
.depth-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 30%, rgba(20, 20, 60, 0.4) 0%, rgba(5, 5, 20, 0.8) 70%);
  z-index: 0;
}

/* Анимации для фона */
@keyframes waveMove {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(20px, -20px) rotate(90deg);
  }
  50% {
    transform: translate(0, -40px) rotate(180deg);
  }
  75% {
    transform: translate(-20px, -20px) rotate(270deg);
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
}

/* Header text LEFT aligned */
.header-text-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.brand-name {
  font-weight: 600;
  letter-spacing: 0.2px;
  font-size: 1.1rem;
  line-height: 1.2;
}
.brand-slogan {
  font-size: 0.7rem; /* увеличен на 5% от 0.66 → 0.7 */
  line-height: 1.2;
  margin-top: 2px;
}
.powered-by-large {
  font-size: 0.85rem;
  font-weight: 600;
}
.powered-link {
  color: var(--accent);
  text-decoration: none;
}
.powered-link:hover { text-decoration: underline; }

/* Timer */
.timer-wrapper {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
  z-index: 40;
  position: relative;
}
.timer-container {
  width: 220px;
  padding: 16px;
  background: var(--card);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
  text-align: center;
  border: 1px solid rgba(124,58,237,0.4);
  color: #e6eef8;
  position: relative;
  z-index: 41;
}
.timer-container[data-theme="light"] {
  color: #111827;
  border-color: rgba(124,58,237,0.6);
}
.city-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.current-time {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
  padding: 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  font-family: 'Courier New', monospace;
}
[data-theme="light"] .current-time {
  background: rgba(0,0,0,0.04);
  color: var(--muted);
}
.caption {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.countdown {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  margin: 8px 0;
  font-family: 'Courier New', monospace;
  transition: color 0.3s ease;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}
[data-theme="light"] .countdown {
  background: rgba(0,0,0,0.04);
}
.status-text {
  font-size: 11px;
  color: var(--muted);
  height: 14px;
}

/* Modal dialog */
.call-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.call-dialog-content {
  padding: 1.5rem;
  max-width: 320px;
  width: 90%;
}
.call-dialog-title {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}
.dialog-title-link {
  color: inherit;
  text-decoration: none;
}
.dialog-title-link:hover {
  text-decoration: underline;
}
.call-dialog-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.call-option {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  white-space: nowrap;
  min-height: 48px;
  /* Ensure never hidden */
  visibility: visible !important;
  opacity: 1 !important;
}

/* Buttons */
.btn-accent,
.btn-gradient-animated,
.call-option,
.mobile-call-btn,
.contact-call-btn,
.header-call-btn {
  background: linear-gradient(45deg, #7c3aed, #5b21b6, #8b5cf6);
  background-size: 300% 300%;
  animation: gradientShift 6s ease infinite;
  color: white;
  border-radius: 10px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
  min-width: 140px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  white-space: nowrap;
  position: relative;
  z-index: 10;
}
[data-theme="light"] .btn-accent,
[data-theme="light"] .call-option {
  color: white;
}
.btn-accent:hover,
.btn-gradient-animated:hover,
.call-option:hover,
.mobile-call-btn:hover,
.contact-call-btn:hover,
.header-call-btn:hover {
  opacity: 0.9;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.whatsapp-btn { background: linear-gradient(45deg, #25D366, #128C7E) !important; }
.telegram-btn { background: linear-gradient(45deg, #0088cc, #005a87) !important; }

/* Header - прозрачный как подвал */
.header {
  background: transparent;
  backdrop-filter: none;
  position: relative;
  z-index: 50;
  padding: 1.25rem 0;
}
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header-logo-animated { 
  height: 53px; 
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header-controls {
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15,18,32,0.3);
  padding: 0.5rem;
  border-radius: 999px;
}
.pill {
  padding: 0.375rem 0.625rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: inherit;
  transition: background 0.2s;
  position: relative;
  z-index: 10;
}
[data-theme="light"] .pill {
  background: rgba(0,0,0,0.02);
}
.pill:hover {
  background: rgba(255,255,255,0.05);
}
[data-theme="light"] .pill:hover {
  background: rgba(0,0,0,0.05);
}
.lang-buttons { display: flex; gap: 0.25rem; }
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  color: inherit;
  transition: color 0.2s;
  position: relative;
  z-index: 10;
}
.lang-btn:hover { color: #e6eef8; }
[data-theme="light"] .lang-btn:hover {
  color: #374151;
}
.mobile-menu-btn { 
  display: block;
  background: rgba(15,18,32,0.5);
  backdrop-filter: blur(5px);
}

/* Кнопка в шапке для десктопа */
.header-call-btn {
  display: none; /* По умолчанию скрыта */
}

/* Mobile menu */
.mobile-nav {
  background: rgba(15,18,32,0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  margin: 0.75rem 20px 0;
  padding: 1.5rem;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 100;
  border: 1px solid rgba(124,58,237,0.2);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.mobile-nav-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.mobile-call-section {
  display: flex;
  justify-content: center;
}
.mobile-call-btn {
  margin: 0;
  text-align: center;
  text-decoration: none;
  width: 100%;
  max-width: 250px;
}
.mobile-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.05);
  padding: 0.75rem;
  border-radius: 999px;
  margin-top: 0.5rem;
  justify-content: center;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  position: relative;
  box-shadow: 0 6px 20px rgba(2,6,23,0.6);
  z-index: 10;
}
[data-theme="light"] .card {
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: all 520ms cubic-bezier(.2,.9,.2,1);
  position: relative;
  z-index: 10;
}
.reveal.show {
  opacity: 1;
  transform: none;
}

/* Sections */
.main-content { 
  margin-top: 1.25rem; 
  position: relative;
  z-index: 20;
}
.hero-section { 
  padding: 2rem 0 2rem; 
  position: relative;
  z-index: 20;
}
.hero-content { 
  text-align: center; 
  position: relative;
  z-index: 20;
}
.hero-title {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.25rem;
}
@media (min-width: 768px) {
  .hero-title { font-size: 2.25rem; }
}
.hero-cta {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
}

.services-section,
.contact-section {
  padding: 3rem 0;
  position: relative;
  z-index: 20;
}
.section-title {
  font-size: 1.6rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.75rem;
}
.section-subtitle {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
  margin-top: 1.5rem;
}
.service-card {
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  z-index: 10;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.3);
}
/* Backgrounds */
.video-service { background: linear-gradient(135deg, rgba(15,18,32,0.85), rgba(15,18,32,0.75)), url('../gif/vhs.gif'); background-size: cover; background-position: center; background-repeat: no-repeat; }
.audio-service { background: linear-gradient(135deg, rgba(15,18,32,0.85), rgba(15,18,32,0.75)), url('../gif/audioreel.gif'); background-size: cover; background-position: center; background-repeat: no-repeat; }
.film-service { background: linear-gradient(135deg, rgba(15,18,32,0.85), rgba(15,18,32,0.75)), url('../gif/8mm16mm.gif'); background-size: cover; background-position: center; background-repeat: no-repeat; }
.photoslides-service { background: linear-gradient(135deg, rgba(15,18,32,0.85), rgba(15,18,32,0.75)), url('../gif/photoslides.gif'); background-size: cover; background-position: center; background-repeat: no-repeat; }
.olddisks-service { background: linear-gradient(135deg, rgba(15,18,32,0.85), rgba(15,18,32,0.75)), url('../gif/olddisks.gif'); background-size: cover; background-position: center; background-repeat: no-repeat; }
.cassetterep-service { background: linear-gradient(135deg, rgba(15,18,32,0.85), rgba(15,18,32,0.75)), url('../gif/cassetterep.gif'); background-size: cover; background-position: center; background-repeat: no-repeat; }
.pcnotebook-service { background: linear-gradient(135deg, rgba(15,18,32,0.85), rgba(15,18,32,0.75)), url('../gif/pcnotebook.gif'); background-size: cover; background-position: center; background-repeat: no-repeat; }
.netcctv-service { background: linear-gradient(135deg, rgba(15,18,32,0.85), rgba(15,18,32,0.75)), url('../gif/netcctv.gif'); background-size: cover; background-position: center; background-repeat: no-repeat; }
.studio-service { background: linear-gradient(135deg, rgba(15,18,32,0.85), rgba(15,18,32,0.75)), url('../gif/studio.gif'); background-size: cover; background-position: center; background-repeat: no-repeat; }

.service-name { font-weight: 600; font-size: 1rem; margin: 0; }
.service-desc { font-size: 0.875rem; line-height: 1.4; margin: 0; }

/* Contact — CENTERED */
.contact-card {
  padding: 1.8rem;
  text-align: center;
}
.contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.contact-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.contact-details {
  line-height: 1.6;
  font-size: 0.9rem;
  text-align: center;
}
.contact-link, .contact-phone {
  text-decoration: none;
}
.contact-link:hover, .contact-phone:hover {
  text-decoration: underline;
}
.contact-buttons {
  display: flex;
  justify-content: center;
  width: 100%;
}
.contact-call-btn {
  display: flex !important;
  width: 100%;
  max-width: 250px;
}

/* Footer */
.footer {
  padding: 2.2rem 0;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  position: relative;
  z-index: 20;
  background: transparent;
}
[data-theme="light"] .footer {
  border-top-color: rgba(0,0,0,0.1);
}
.footer-content {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Scroll to top */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}
.scroll-to-top:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* Media Queries */
@media (min-width: 426px) {
  .header-controls { display: flex; }
  .header-call-btn { 
    display: flex !important; 
  }
  .mobile-menu-btn { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: 1.8rem; }
  .hero-section { padding: 3rem 0 2rem; }
  
  /* Убираем кнопку из мобильного меню на десктопе */
  .mobile-call-section {
    display: none;
  }
}
@media (min-width: 768px) {
  .hero-section { padding: 4rem 0 2rem; }
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .section-title { font-size: 2rem; }
}
@media (max-width: 425px) {
  .header-controls, .header-call-btn { 
    display: none !important; 
  }
  .mobile-menu-btn { 
    display: block; 
    background: rgba(15,18,32,0.7);
    backdrop-filter: blur(10px);
  }
  .timer-container { width: 190px; padding: 14px; }
  .city-name { font-size: 16px; }
  .countdown { font-size: 20px; }
  .call-option,
  .dialog-title-link {
    font-size: 0.85rem;
  }
  /* CRITICAL: Ensure buttons visible on mobile */
  .call-option {
    display: flex !important;
    width: 100%;
  }
  /* Кнопка в контактах всегда видна */
  .contact-call-btn {
    display: flex !important;
    width: 100%;
    max-width: none;
  }
}
.lang-btn.active { font-weight: 600; color: var(--accent); }