/* 1. ШРИФТЫ */
@font-face {
  font-family: 'ALSSector';
  src: url('fonts/ALS_Sector-Regular.woff') format('woff'),
       url('fonts/ALS_Sector-Regular.woff2') format('woff2'), 
       url('fonts/ALS_Sector-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

/* 2. ПЕРЕМЕННЫЕ ТЕМЫ */
:root {
    /* Светлая тема */
    --bg-main: #ffffff;
    --bg-alt: #f5f5f5;
    --text-main: #333333;
    --text-muted: #555555;
    --text-light: #777777;
    --border-color: #e0e0e0;
    --accent-green: #2E8B57;
    --accent-hover: #45a049;
    --header-bg: rgba(0, 0, 0, 0.85);
    --card-shadow: rgba(0,0,0,0.05);
}

[data-theme="dark"] {
    /* Темная тема */
    --bg-main: #121212;
    --bg-alt: #1e1e1e;
    --text-main: #f0f0f0;
    --text-muted: #cccccc;
    --text-light: #aaaaaa;
    --border-color: #333333;
    --header-bg: #000000;
    --card-shadow: rgba(0,0,0,0.3);
}

/* 3. ОБЩИЕ СТИЛИ */
body {
    font-family: 'ALSSector', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.section-padding {
    padding: 70px 0;
}

h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 32px;
    font-weight: 600;
    color: var(--text-main);
}

/* 4. ШАПКА (HEADER) */
header {
    background-color: var(--header-bg);
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    box-sizing: border-box;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'ALSSector', Arial, sans-serif;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.main-nav ul li {
    margin-left: 20px;
}

.main-nav ul li a {
    font-family: 'ALSSector', Arial, sans-serif;
    color: #fff;
    text-decoration: none;
    font-weight: 400;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    background-color: var(--accent-green);
}

/* Кнопка переключения темы */
#theme-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    padding: 5px 10px;
    border-radius: 20px;
    transition: 0.3s;
    margin-left: 15px;
}

#theme-toggle:hover {
    background: rgba(255,255,255,0.1);
}

/* 5. HERO SECTION */
#hero {
    height: 100vh;
    background-image: url('img/spectra.jpeg');
    background-size: cover;
    background-position: center center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 20px;
    box-sizing: border-box;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

#hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

#hero h1 {
    font-size: 38px;
    margin-bottom: 30px;
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero-arrow-svg {
    width: 38px; height: 19px;
    fill: #ffffff;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* 6. ТЕХНИЧЕСКИЕ ХАРАКТЕРИСТИКИ */
#tech-specs .specs-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

#tech-specs .specs-text {
    flex: 1 1 50%;
    min-width: 300px;
}

#tech-specs table {
    width: 100%;
    border-collapse: collapse;
}

#tech-specs table td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-color);
}

#tech-specs table td:first-child {
    font-weight: bold;
    color: var(--text-muted);
}

#tech-specs .specs-3d-model {
    flex: 1 1 40%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-alt);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

model-viewer {
    width: 100%; height: 100%;
    --poster-color: transparent;
    background-color: transparent;
}

/* 7. ОБЛАСТИ ПРИМЕНЕНИЯ */
.section-description {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px;
    font-size: 18px;
    color: var(--text-muted);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.feature-item {
    padding: 30px;
    background-color: var(--bg-alt);
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.feature-item:hover { transform: translateY(-5px); }

.feature-item img {
    width: 70px; height: 70px;
    margin-bottom: 15px;
    object-fit: contain;
}

.feature-item p {
    font-weight: 600;
    color: var(--text-main);
}

/* 8. КОМАНДА */
#team {
    background-color: var(--bg-alt);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.team-member {
    text-align: center;
    padding: 20px;
}

.team-member img {
    width: 130px; height: 130px;
    border-radius: 50%;
    margin-bottom: 20px;
    object-fit: cover;
    border: 4px solid var(--accent-green);
}

.team-member h3 { color: var(--text-main); margin-bottom: 8px; }
.team-member p.role { color: var(--text-muted); font-size: 15px; min-height: 40px; }
.team-member p.title { color: var(--text-light); font-size: 14px; font-style: italic; }

/* 9. ПОДДЕРЖКА (ЛОГОТИПЫ) */
#supported-by {
    background-color: var(--bg-main);
    text-align: center;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.startup-logo-container img {
    max-width: 250px;
    transition: transform 0.3s;
}

[data-theme="dark"] .startup-logo-container img {
    filter: brightness(0.9);
}

/* 10. ВИДЕО */
.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.video-item video {
    width: 100%;
    border-radius: 8px;
    background: #000;
    box-shadow: var(--card-shadow);
}

.video-item h3 { color: var(--text-main); text-align: center; margin-bottom: 10px; }

/* 11. КОНТАКТЫ (FOOTER) */
footer#contacts {
    background-color: var(--bg-main);
    text-align: center;
}

footer#contacts h2, 
footer#contacts p.contact-name {
    color: var(--text-main);
}

footer#contacts p.contact-phone a,
footer#contacts p.contact-email a {
    color: var(--accent-green);
    text-decoration: none;
}

footer#contacts p.footer-copyright {
    color: var(--text-light);
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* 12. АДАПТИВНОСТЬ */
@media (max-width: 820px) {
    .main-nav { display: none !important; }
    h1 { font-size: 28px !important; }
}

@media (max-width: 768px) {
    .video-grid { grid-template-columns: 1fr; }
    #tech-specs .specs-content { flex-direction: column; }
    #tech-specs .specs-3d-model { height: 300px; }
}