:root {
  --bg-dark: #0a0e14;
  --bg-card: #151c26;
  --bg-hover: #1e293b;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-hover: #0ea5e9;
  --border: #334155;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 80px 0; }

.container-thx {
  max-width: 600px;
  width: 100%;
}
/* ===== Header ===== */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,14,20,0.95);
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  backdrop-filter: blur(10px);
}
.header-wrap {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.logo {
  font-size: 1.4rem; font-weight: 700; color: var(--accent);
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
/*.logo::before { content: "🔍"; font-size: 1.2em; } */

nav { display: flex; gap: 20px; flex-wrap: wrap; }
nav a {
  color: var(--text-muted); text-decoration: none;
  margin-left: 24px; font-size: 0.95rem;
  transition: color 0.2s;
}
nav a:hover { color: var(--accent); }
nav a:hover, nav a.active { color: var(--accent); }

.phone {
  color: var(--accent); font-weight: 600; text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  margin-left: -50px;
}

/* ===== Hero ===== */
.hero {
  text-align: center; padding: 100px 0 80px;
  background: radial-gradient(ellipse at top, #1e3a5f 0%, var(--bg-dark) 60%);
}
.hero h1 {
  font-size: 2.5rem; margin-bottom: 20px; line-height: 1.2;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 1.2rem; color: var(--text-muted);
  max-width: 700px; margin: 0 auto 35px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  background: var(--accent); color: #000;
  padding: 14px 32px; border-radius: 8px;
  font-weight: 600; text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  border: none; cursor: pointer;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn-outline {
  background: transparent; border: 2px solid var(--accent);
  color: var(--accent); margin-left: 12px;
}
.btn-outline:hover { background: var(--accent); color: #000; }

.btn-full { width: 100%; }

.btn-center { display: flex; justify-content: center; }

/* ===== Section titles ===== */
.section-title {
  text-align: center; margin-bottom: 50px;
}
.section-title h2 {
  font-size: 2rem; margin-bottom: 12px;
}
.section-title p { color: var(--text-muted); }

/* ===== Grid & Cards ===== */
.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: var(--accent); transform: translateY(-4px);
}
.card-icon {
  font-size: 2rem; margin-bottom: 16px; color: var(--accent);
}
.card h3 { margin-bottom: 12px; font-size: 1.3rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

/* ===== Benefits ===== */
.benefits { background: var(--bg-card); }
.benefit-item {
  display: flex; gap: 16px; align-items: flex-start;
}
.benefit-num {
  min-width: 32px; height: 32px;
  background: var(--accent); color: #000;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.text-muted { color: var(--text-muted); }

/* ===== Process ===== */
.process-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px; text-align: center;
}
.step { padding: 20px; }
.step-num {
  display: inline-flex; width: 40px; height: 40px;
  background: var(--bg-hover); border: 2px solid var(--accent);
  border-radius: 50%; align-items: center; justify-content: center;
  font-weight: 700; margin-bottom: 14px; color: var(--accent);
}
.step h4 { margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 0.9rem; }

/* ===== CTA ===== */
.cta {
  text-align: center;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-dark));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta h2 { margin-bottom: 16px; }
.cta p { color: var(--text-muted); margin-bottom: 30px; }

/* ===== Contacts ===== */
.contacts-wrap {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px; align-items: center;
}
.contact-info h3 { margin-bottom: 20px; }
.contact-item {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; color: var(--text-muted);
}
.contact-item strong { color: var(--text-main); }
.contact-link { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.contact-link:hover { color: var(--accent); }
.contact-text { color: var(--text-muted); text-decoration: none; transition: color 0.2s;}
.contact-text:hover { color: var(--accent); }

.contact-form {
  background: var(--bg-card); padding: 30px;
  border-radius: 12px; border: 1px solid var(--border);
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; margin-bottom: 6px; font-size: 0.9rem;
  color: var(--text-muted);
}
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 14px;
  background: var(--bg-dark); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-main);
  font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-note {
  font-size: 0.8rem; color: var(--text-muted);
  margin-top: 12px; text-align: center;
}

/* ===== CTA Block ===== */
.cta-block {
  background: var(--bg-card);
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta-block h2 { margin-bottom: 16px; }
.cta-block p { color: var(--text-muted); margin-bottom: 30px; }

    /* ===== Portfolio Header ===== */
    .portfolio-header {
      text-align: center; margin-bottom: 50px;
    }
    .portfolio-header h1 {
      font-size: 2.2rem; margin-bottom: 16px;
    }
    .portfolio-header p {
      color: var(--text-muted); max-width: 600px; margin: 0 auto;
    }

    /* ===== Gallery Grid ===== */
    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 24px;
      align-items: stretch; /* Одинаковая высота карточек в ряду */
    }

    /* ===== Project Card — Flexbox для прижатия низа ===== */
    .project-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      transition: transform 0.3s, border-color 0.3s;
      
      /* Flex-контейнер для выравнивания */
      display: flex;
      flex-direction: column;
      height: 100%;
    }

    .project-card:hover {
      transform: translateY(-5px);
      border-color: var(--accent);
    }

    .img-wrapper {
      overflow: hidden;
      position: relative;
      flex-shrink: 0; /* Картинка не сжимается */
    }

    .project-img {
      width: 100%;
      height: 220px;
      object-fit: cover;
      display: block;
      transition: transform 0.5s;
    }

    .project-card:hover .project-img {
      transform: scale(1.05);
    }

    /* Контент растягивается */
    .project-content {
      padding: 20px;
      display: flex;
      flex-direction: column;
      flex-grow: 1; /* Занимает всё свободное место */
    }

    .project-tag {
      display: inline-block;
      background: var(--accent);
      color: #000;
      font-size: 0.75rem;
      font-weight: 700;
      padding: 4px 10px;
      border-radius: 4px;
      margin-bottom: 12px;
      width: fit-content;
      text-transform: uppercase;
    }

    .project-content h3 {
      margin-bottom: 10px;
      font-size: 1.2rem;
    }

    .project-content p {
      color: var(--text-muted);
      font-size: 0.95rem;
      line-height: 1.6;
      margin-bottom: 16px;
    }

    /* Мета-информация прижата к низу */
    .project-meta {
      margin-top: auto; /* ← Ключевое свойство: толкает вниз */
      padding-top: 14px;
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.85rem;
      color: var(--text-muted);
      flex-wrap: wrap;
      gap: 8px;
    }
    
        /* Privacy Content */
    .privacy-wrapper {
      max-width: 800px;
      margin: 0 auto;
    }
    .privacy-wrapper h1 {
      font-size: 2.2rem;
      margin-bottom: 12px;
      color: var(--text-main);
    }
    .privacy-meta {
      color: var(--text-muted);
      font-size: 0.9rem;
      margin-bottom: 40px;
      padding-bottom: 20px;
      border-bottom: 1px solid var(--border);
    }
    .privacy-wrapper h3 {
      color: var(--accent);
      font-size: 1.25rem;
      margin: 32px 0 16px;
    }
    .privacy-wrapper p {
      color: var(--text-muted);
      margin-bottom: 16px;
      line-height: 1.7;
    }
    .privacy-wrapper ul {
      color: var(--text-muted);
      margin-bottom: 16px;
      padding-left: 24px;
    }
    .privacy-wrapper li {
      margin-bottom: 8px;
      line-height: 1.6;
    }
    .privacy-wrapper a {
      color: var(--accent);
      text-decoration: none;
      transition: color 0.2s;
    }
    /* ===== thanks ===== */
    .success-box {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 50px 40px;
      text-align: center;
    }
    
    .success-icon {
      width: 80px;
      height: 80px;
      background: var(--accent);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 24px;
      font-size: 2.5rem;
      color: #000;
    }

/* ===== Footer ===== */
footer {
  text-align: center; padding: 30px 0;
  color: var(--text-muted); font-size: 0.9rem;
  border-top: 1px solid var(--border);
}
/* ===== screen ===== */
/* ===== Индикатор записи (мобильно-совместимый) ===== */
#rec-indicator {
  position: fixed;
  top: 22px;
  right: 16px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Courier New', monospace, sans-serif;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1px;
  
  /* Явно задаём цвет, чтобы не перебивался глобальными стилями */
  color: #ff3b3b !important; 
  text-shadow: 0 0 6px rgba(255, 59, 59, 0.9);
  
  pointer-events: none;
  opacity: 1;
  -webkit-font-smoothing: antialiased;
}

/* Точка-индикатор */
#rec-indicator::before {
  content: "●";
  font-size: 1.1rem;
  line-height: 1;
  color: #ff3b3b !important;
  text-shadow: 0 0 8px rgba(255, 59, 59, 1);
  animation: recBlinkMobile 1.5s infinite ease-in-out;
}

/* Плавное мигание (работает стабильнее steps(1) на мобильных) */
@keyframes recBlinkMobile {
  0%, 40% { opacity: 1; transform: scale(1); }
  50%, 90% { opacity: 0.15; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

/* Углы-рамка */
#rec-corners {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100dvh; /* Для мобильных с плавающей адресной строкой */
  height: 100vh;  /* Фоллбек для старых браузеров */
  z-index: 99998;
  pointer-events: none;
}

.corner {
  position: absolute;
  width: 24px; height: 24px;
  border: 2px solid rgba(56, 189, 248, 0.85) !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
  opacity: 1;
}

/* Позиционирование углов */
.corner.top-left    { top: 12px; left: 12px;  border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.corner.top-right   { top: 12px; right: 12px; border-left: none; border-bottom: none; border-radius: 0 4px 0 0; }
.corner.bottom-left { bottom: 12px; left: 12px; border-right: none; border-top: none; border-radius: 0 0 0 4px; }
.corner.bottom-right{ bottom: 12px; right: 12px;border-left: none; border-top: none; border-radius: 0 0 4px 0; }

/* Пульсация углов */
@keyframes cornerPulseMobile {
  0%, 100% { opacity: 0.7; box-shadow: 0 0 8px rgba(56, 189, 248, 0.5); }
  50%      { opacity: 1;   box-shadow: 0 0 16px rgba(56, 189, 248, 0.9); }
}
#rec-corners .corner { animation: cornerPulseMobile 2.5s infinite ease-in-out; }

/* 🔧 Адаптив для телефонов */
@media (max-width: 768px) {
  #rec-indicator {
    top: 10px; right: 10px;
    font-size: 0.75rem;
  }
  #rec-indicator::before {
    font-size: 0.95rem;
  }
  .corner {
    width: 20px; height: 20px;
    border-width: 2px;
  }
  .corner.top-left    { top: 8px; left: 8px; }
  .corner.top-right   { top: 8px; right: 8px; }
  .corner.bottom-left { bottom: 8px; left: 8px; }
  .corner.bottom-right{ bottom: 8px; right: 8px; }
}
/* ===== screen ===== */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.2));
    background-size: 100% 3px;
    pointer-events: none;
   /* z-index: 1000; */
    opacity: 0.4;
}

/* ===== Кастомный скроллбар ===== */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg-card);
}

/* Chrome, Edge, Safari, Opera */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-card);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
  border: 2px solid var(--bg-card); /* Создаёт "зазор" вокруг ползунка */
  transition: background 0.2s;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* Интеграция с Lenis (v1+) */
html.lenis, html.lenis body {
  height: auto;
}
html.lenis ::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-wrap { flex-direction: column; gap: 12px; }
  nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
  nav a { margin: 0; }
  .hero h1 { font-size: 2rem; }
  .btn { width: 100%; margin: 8px 0 !important; }
  .btn-outline { margin-left: 0 !important; }
  .phone {margin-left: 0px;}
  .privacy-wrapper h1 { font-size: 1.8rem; }
}