/* --- ГЛОБАЛЬНЫЕ НАСТРОЙКИ И ПЕРЕМЕННЫЕ --- */
:root {
    --bg-deep-blue: #181F2B;
    --accent-lime: #B7F800;
    --text-white: #FFFFFF;
    --text-soft: rgba(255,255,255,0.85);
    --bg-grey: #4A5568;
    --accent-blue: #3BD6FF;
    --font-main: 'Montserrat', sans-serif;
    --font-headings: 'Orbitron', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-deep-blue);
    background-image: url('../img/noise.svg');
    color: var(--text-white);
    font-family: var(--font-main);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- СТИЛИ ЗАГОЛОВКОВ И АКЦЕНТОВ --- */
.section-title {
    font-family: var(--font-headings);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    font-weight: 900;
    text-transform: uppercase;
}
.accent-lime { color: var(--accent-lime); }
.accent-blue { color: var(--accent-blue); }

/* --- КНОПКИ --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.btn-primary { background-color: var(--accent-lime); color: var(--bg-deep-blue); }
.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-lime);
    border-color: var(--accent-lime);
    box-shadow: 0 0 15px var(--accent-lime);
}
.btn-secondary { background-color: transparent; color: var(--accent-blue); border-color: var(--accent-blue); }
.btn-secondary:hover { background-color: var(--accent-blue); color: var(--bg-deep-blue); box-shadow: 0 0 15px var(--accent-blue); }

/* --- ШАПКА --- */
.main-header {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 20px 0; z-index: 1000;
    background: rgba(24, 31, 43, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(74, 85, 104, 0.5);
}
.main-header .container { display: flex; justify-content: space-between; align-items: center; }

.logo {
    font-family: var(--font-headings);
    font-size: 1.8rem;
    color: var(--text-white);
    text-decoration: none;
    font-weight: 900;
}

.main-nav ul { list-style: none; display: flex; }
.main-nav li { margin: 0 20px; }
.main-nav a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}
.main-nav a:hover { color: var(--accent-lime); }

.lang-switch a {
  margin-left: 14px;
  color: var(--text-white);
  opacity: .8;
  text-decoration: none;
  font-weight: 700;
}
.lang-switch a:hover { opacity: 1; color: var(--accent-lime); }

/* --- ГЛАВНЫЙ ЭКРАН (HERO) --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 80px; /* offset for header */
}
.hero-title {
    font-family: var(--font-headings);
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(183, 248, 0, 0.5);
}
.cursor { color: var(--accent-lime); animation: blink 1s step-end infinite; }
@keyframes blink { from, to { opacity: 1; } 50% { opacity: 0; } }
.hero-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: rgba(255, 255, 255, 0.8);
}

/* --- СЕКЦИИ --- */
section { padding: 100px 0; }

/* --- УСЛУГИ --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.service-card {
    background-color: #2D3748; padding: 40px; border-radius: 10px; text-align: center;
    border: 1px solid var(--bg-grey); transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.service-card i { font-size: 3rem; margin-bottom: 20px; }
.service-card h3 { font-family: var(--font-headings); font-size: 1.5rem; margin-bottom: 15px; color: var(--text-white); }

/* --- ПОРТФОЛИО --- */
.portfolio-filters { text-align: center; margin-bottom: 40px; }
.filter-btn {
    background: transparent; border: 1px solid var(--bg-grey); color: var(--text-white);
    padding: 10px 20px; margin: 5px; border-radius: 5px; cursor: pointer; transition: all 0.3s ease;
}
.filter-btn:hover, .filter-btn.active { background-color: var(--accent-lime); color: var(--bg-deep-blue); border-color: var(--accent-lime); }

.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 20px; }
.portfolio-item { position: relative; overflow: hidden; border-radius: 10px; display: block; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.portfolio-item:hover img { transform: scale(1.1); }
.portfolio-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(24, 31, 43, 0.9), transparent);
    color: var(--text-white); padding: 40px 20px 20px; transition: opacity 0.4s ease; opacity: 1;
}
.portfolio-overlay h3 { font-family: var(--font-headings); margin-bottom: 5px; }

/* --- ПРОЦЕСС РАБОТЫ --- */
.process-timeline { position: relative; max-width: 800px; margin: 0 auto; }
.process-timeline::after {
    content: ''; position: absolute; width: 3px; background: var(--bg-grey); top: 0; bottom: 0; left: 50%; margin-left: -1.5px;
}
.timeline-item { padding: 10px 40px; position: relative; width: 50%; }
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-dot {
    content: ''; position: absolute; width: 20px; height: 20px; right: -10px;
    background-color: var(--bg-deep-blue); border: 4px solid var(--accent-blue);
    top: 30px; border-radius: 50%; z-index: 1;
}
.timeline-item:nth-child(even) .timeline-dot { left: -10px; }
.timeline-content {
    padding: 20px 30px; background: #2D3748; position: relative; border-radius: 6px; border: 1px solid var(--bg-grey);
}
.timeline-item:nth-child(odd) { text-align: right; }
.timeline-content h3 { font-family: var(--font-headings); color: var(--accent-lime); }

/* --- CTA СЕКЦИЯ --- */
.cta-section { background-color: #2D3748; text-align: center; }
.cta-section h2 { font-size: 2.5rem; font-family: var(--font-headings); margin-bottom: 15px; }
.cta-form { margin-top: 30px; display: flex; justify-content: center; gap: 10px; }
.cta-form input {
    padding: 14px; width: 300px; border-radius: 5px; border: 1px solid var(--bg-grey);
    background: var(--bg-deep-blue); color: var(--text-white); font-size: 1rem;
}

/* --- ПОДВАЛ --- */
.main-footer { background-color: #121821; padding: 30px 0; border-top: 1px solid var(--bg-grey); }
.footer-content { display: flex; justify-content: space-between; align-items: center; }
.social-links a { color: var(--text-white); margin: 0 10px; font-size: 1.5rem; transition: color 0.3s ease; }
.social-links a:hover { color: var(--accent-blue); }

/* --- АНИМАЦИИ ПРИ СКРОЛЛЕ --- */
.anim-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.anim-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* --- ФОРМЫ (контакты) --- */
.contact-body { background: radial-gradient(1200px 600px at 10% 0%, #0b2238 0%, #071725 40%, #060d17 100%); }
.contact-main .container { max-width: 980px }
.contact-progress { display:flex; gap:12px; margin:24px 0 12px }
.contact-progress .step { padding:8px 12px; border-radius:999px; font-size:.95rem; background:#0e1c2a; color:#a9bfd3; border:1px solid #1a2636 }
.contact-progress .step.active { color:#dff7ff; border-color:#49e659 }
.contact-progress .step.done { color:#b7ffd0; border-color:#2f9d52 }

.card-form {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid #1a2636; border-radius:18px; padding:22px; box-shadow:0 12px 48px rgba(0,0,0,.3);
}
.grid { display:grid; gap:14px }
.grid.two { grid-template-columns: 1fr 1fr }
@media (max-width: 720px){ .grid.two { grid-template-columns: 1fr } }

.card-form .floating { position:relative }
.card-form input[type="text"],
.card-form input[type="email"],
.card-form input[type="tel"],
.card-form input[type="url"],
.card-form input[type="date"],
.card-form select,
.card-form textarea {
  width:100%; padding:14px 12px 12px; border-radius:12px; border:1px solid #1a2636;
  background:rgba(255,255,255,0.06); color:#eaf6ff; outline:none;
  transition:border-color .2s, box-shadow .2s, background .2s;
}
.card-form textarea { resize:vertical }
.card-form select {
  appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,#8fb9ff 50%), linear-gradient(135deg,#8fb9ff 50%,transparent 50%), linear-gradient(to right, transparent, transparent);
  background-position: calc(100% - 20px) calc(1em + 2px), calc(100% - 15px) calc(1em + 2px), 100% 0;
  background-size: 5px 5px, 5px 5px, 2.5em 2.5em; background-repeat: no-repeat;
}
.card-form .floating span {
  position:absolute; left:12px; top:12px; color:#a9bfd3; pointer-events:none;
  transition:transform .15s ease, font-size .15s ease, top .15s ease, opacity .15s ease;
}
.card-form .floating :is(input,textarea,select):focus + span,
.card-form .floating :is(input,textarea):not(:placeholder-shown) + span,
.card-form .floating select:has(option:checked:not(:disabled)) + span {
  top:-8px; font-size:12px; transform:translateY(-2px); opacity:.9;
  background:linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.35) 46%);
  padding:0 6px; border-radius:6px;
}
.card-form :is(input,textarea,select):focus { border-color:#49e659; box-shadow:0 0 0 4px rgba(73,230,89,.15) }
.range-wrap { position:relative; padding-top:18px }
.range-wrap output { position:absolute; right:10px; top:-8px; font-size:.9rem; color:#cfe9ff; opacity:.85 }
.agree { display:flex; align-items:center; gap:10px; margin:10px 0 4px; color:#b8cadd }
.agree input { width:18px; height:18px }
.form-actions { display:flex; gap:16px; align-items:center; margin-top:8px }
.form-status { min-height:1.2em; color:#cfe9ff; opacity:.9 }
.hp-field { position:absolute !important; left:-10000px !important; opacity:0 !important }
.thanks-modal[hidden] { display:none }
.thanks-modal { position:fixed; inset:0; display:grid; place-items:center; background:rgba(5,10,18,.65); backdrop-filter: blur(5px); z-index:99; }
.thanks-card { background:#0d1b2a; border:1px solid #1a2636; border-radius:16px; padding:26px; text-align:center; color:#eaf6ff; box-shadow:0 20px 64px rgba(0,0,0,.45) }

/* --- MOBILE NAV --- */
.burger {
  display: none;
  width: 36px; height: 28px;
  background: transparent; border: 0; padding: 0; margin-left: 12px;
  cursor: pointer; z-index:1100;
  display: none;
}
.burger { display: none; } /* по умолчанию скрыт на десктопе */
.burger { display: none; } /* для ясности - переопределим ниже в @media */

.burger { /* финальные базовые стили */
  display: none;
  width: 36px; height: 28px;
  background: transparent; border: 0; padding: 0; margin-left: 12px;
  cursor: pointer; z-index: 1100;
  display: none;
}

.burger { display: none; } /* на всякий случай - включим в медиа */

.burger span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--accent-lime); /* #B7F800 */
  border-radius: 2px;
  margin: 2px 0;
  transition: transform .25s, opacity .25s;
}

.mobile-drawer {
  position: fixed; top: 64px; left: 0; right: 0;
  background: rgba(24, 31, 43, 0.98);
  border-top: 1px solid rgba(74,85,104,.5);
  padding: 16px;
  backdrop-filter: blur(10px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  display: none; opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
}
.mobile-drawer.open { display: block; opacity: 1; transform: translateY(0); }

.mobile-nav ul { list-style: none; padding: 0; margin: 0; }
.mobile-nav li { border-bottom: 1px solid rgba(74,85,104,.35); }
.mobile-nav a { display: block; padding: 12px 4px; color: var(--text-soft); text-decoration: none; }
.mobile-nav a:hover { color: var(--accent-blue); }

/* анимация бургер -> крестик */
.burger.active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2){ opacity: 0; }
.burger.active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* --- АДАПТИВНОСТЬ --- */
@media (max-width: 992px) {
    .section-title { font-size: 2.5rem; }
    .hero-title { font-size: 3rem; }

    .main-nav { display: none; }
    .main-header > .container > .lang-switch { display: none; } /* языки - только в панели */
    .btn.btn-primary { display: none; }

    .burger { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; }
    .main-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

    .mobile-drawer .lang-switch { display: flex; gap: 12px; padding-top: 8px; }
}

@media (max-width: 768px) {
    .section-title { font-size: 2rem; }
    .hero-title { font-size: 2.5rem; }
    .portfolio-grid { grid-template-columns: 1fr; }

    .process-timeline::after { left: 10px; }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 0; }
    .timeline-item:nth-child(even) { left: 0%; }
    .timeline-dot { left: 0px; }
    .timeline-item:nth-child(odd) { text-align: left; }

    .cta-form { flex-direction: column; align-items: center; }
    .cta-form input { width: 100%; max-width: 300px; }
    .footer-content { flex-direction: column; gap: 20px; }
}



/* поднять шапку и мобильную панель выше контента */
.main-header { z-index: 1300; }
.mobile-drawer { z-index: 1250; pointer-events: auto; }

