/* =========================================
   Infinity AI Академия Лунных Технологий
   Stylesheet — styles.css
   ========================================= */

/* 1. Variables & Reset
   ========================================= */
:root {
    --bg-deep: #06080a;
    --bg-surface: #0f1218;
    --bg-elevated: #181c24;
    --text-primary: #e8ecf1;
    --text-secondary: #94a3b8;
    --accent: #00f0ff;
    --accent-dim: rgba(0, 240, 255, 0.12);
    --silver: #c8cdd3;
    --border: rgba(255, 255, 255, 0.07);
    --radius: 16px;
    --shadow: 0 24px 64px rgba(0,0,0,0.5);
    --header-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 2. Typography
   ========================================= */
h1, h2, h3, h4 {
    font-family: 'Orbitron', sans-serif;
    line-height: 1.2;
    letter-spacing: 0.04em;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

address {
    font-style: normal;
}

/* 3. Layout
   ========================================= */
.container {
    width: 92%;
    max-width: 1200px;
    margin-inline: auto;
}

.section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, var(--silver) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 48px;
    max-width: 640px;
}

/* 4. Header & Navigation
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background: rgba(6, 8, 10, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 0.06em;
    color: var(--text-primary);
}

.logo span {
    color: var(--accent);
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 36px;
}

.nav-list a {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-list a:hover {
    color: var(--accent);
}

.nav-list a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* 5. Hero Section
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at center, #161b26 0%, var(--bg-deep) 70%);
}

.starfield {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.orbital-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid var(--accent-dim);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.ring-1 {
    width: 500px;
    height: 500px;
    animation: spin 24s linear infinite;
}

.ring-2 {
    width: 740px;
    height: 740px;
    animation: spin 34s linear infinite reverse;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 24px;
}

.hero-title .line {
    display: block;
}

.hero-title .accent {
    color: var(--accent);
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.35);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 40px;
}

/* 6. CTA Button
   ========================================= */
.cta-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 40px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bg-deep);
    background: linear-gradient(135deg, #e2e8f0 0%, #ffffff 50%, #cbd5e1 100%);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
}

.cta-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent), transparent 60%, var(--accent));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.3), 0 12px 40px rgba(0,0,0,0.4);
}

.cta-btn:hover::before {
    opacity: 1;
}

/* 7. Glassmorphism Utility
   ========================================= */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* 8. Reveal Animations
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 9. Systems Section
   ========================================= */
.systems {
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 100%);
}

.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.system-card {
    padding: 32px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.system-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 240, 255, 0.25);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.08);
}

.system-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0,240,255,0.12), transparent);
    border: 1px solid rgba(0,240,255,0.25);
    margin-bottom: 20px;
    position: relative;
}

.system-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px var(--accent);
}

.system-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.system-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* 10. About Section
   ========================================= */
.about {
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.moon-hologram {
    width: 320px;
    height: 320px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 800px;
}

.moon-core {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(0,240,255,0.35), rgba(0,240,255,0.05) 60%, transparent 70%);
    box-shadow: 0 0 50px rgba(0,240,255,0.15);
    position: relative;
    z-index: 2;
}

.moon-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(0,240,255,0.25);
    border-radius: 50%;
    pointer-events: none;
}

.moon-ring.r1 {
    width: 220px;
    height: 220px;
    animation: spin 14s linear infinite;
}

.moon-ring.r2 {
    width: 280px;
    height: 280px;
    animation: spin 22s linear infinite reverse;
}

.about-text p {
    margin-bottom: 18px;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.about-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-list li {
    position: relative;
    padding-left: 24px;
    color: var(--text-secondary);
    font-size: 0.98rem;
}

.about-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--accent);
}

/* 11. Programs Section
   ========================================= */
.programs {
    background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
}

.program-card {
    position: relative;
    padding: 36px;
    background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    overflow: hidden;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.program-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0,240,255,0.2);
    box-shadow: 0 0 40px rgba(0,240,255,0.06), var(--shadow);
}

.program-card:hover::before {
    opacity: 1;
}

.card-header {
    margin-bottom: 16px;
}

.card-num {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.1em;
}

.program-card h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.program-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-tag {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--accent);
    background: rgba(0,240,255,0.08);
    border: 1px solid rgba(0,240,255,0.2);
}

/* 12. Lab Section
   ========================================= */
.lab {
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-deep) 100%);
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.lab-item {
    padding: 32px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.lab-item h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.lab-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.lab-item:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(0,240,255,0.25);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* 13. Contacts Section
   ========================================= */
.contacts {
    background: linear-gradient(180deg, var(--bg-deep) 0%, #0a0c10 100%);
}

.contacts-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.contacts-lead {
    color: var(--text-secondary);
    margin-bottom: 36px;
    font-size: 1.05rem;
}

.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contacts-list li {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contacts-list .label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
}

.contacts-list a,
.contacts-list address {
    font-size: 1.1rem;
    color: var(--text-primary);
    position: relative;
    transition: color 0.3s ease;
}

.contacts-list a:hover {
    color: var(--accent);
    text-shadow: 0 0 12px rgba(0,240,255,0.3);
}

.contacts-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-globe {
    width: 260px;
    height: 260px;
    position: relative;
    perspective: 800px;
}

.globe-core {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,240,255,0.35), transparent 70%);
    box-shadow: 0 0 40px rgba(0,240,255,0.2);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.globe-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(0,240,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.globe-ring.gr1 {
    width: 160px;
    height: 160px;
    animation: spin 10s linear infinite;
}

.globe-ring.gr2 {
    width: 220px;
    height: 220px;
    animation: spin 16s linear infinite reverse;
}

.globe-ring.gr3 {
    width: 200px;
    height: 200px;
    border: 1px solid rgba(0,240,255,0.12);
    transform: translate(-50%, -50%) rotateX(70deg);
}

/* 14. Footer
   ========================================= */
.site-footer {
    border-top: 1px solid var(--border);
    background: #06080a;
    padding: 32px 0;
}

.footer-inner {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 15. Keyframes
   ========================================= */
@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0,240,255,0.15); }
    50%      { box-shadow: 0 0 40px rgba(0,240,255,0.35); }
}

/* 16. Media Queries
   ========================================= */
@media (max-width: 1024px) {
    .hero-title { font-size: 2.75rem; }
    .about-layout { gap: 48px; }
    .contacts-layout { gap: 48px; }
}

@media (max-width: 768px) {
    .section { padding: 72px 0; }
    .section-title { font-size: 1.75rem; }

    .menu-toggle { display: flex; }

    .nav-list {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 32px 24px;
        background: rgba(6, 8, 10, 0.97);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s ease, opacity 0.35s ease;
    }

    .nav-list.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .hero-title { font-size: 2.25rem; }
    .hero-subtitle { font-size: 1rem; }

    .about-layout,
    .contacts-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-visual { order: -1; }
    .about-list { align-items: center; }
    .about-list li { padding-left: 0; }
    .about-list li::before { display: none; }

    .contacts-visual { order: -1; }
    .contacts-list { align-items: center; }

    .moon-hologram { width: 260px; height: 260px; }
    .moon-ring.r1 { width: 180px; height: 180px; }
    .moon-ring.r2 { width: 240px; height: 240px; }
    .moon-core { width: 110px; height: 110px; }

    .contact-globe { width: 220px; height: 220px; }
}

@media (max-width: 480px) {
    .hero { min-height: 90vh; }
    .hero-title { font-size: 1.85rem; }
    .cta-btn { padding: 16px 28px; font-size: 0.8rem; }

    .system-card,
    .program-card,
    .lab-item { padding: 24px; }

    .lab-grid,
    .programs-grid,
    .systems-grid {
        grid-template-columns: 1fr;
    }
}