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

:root {
    --bg: #f8f9ff;
    --surface: #ffffff;
    --text: #2d3142;
    --text-light: #5a5f7a;
    --accent: #4f6ef7;
    --accent-glow: #9eb0ff;
    --border: #e2e4f0;
    --shadow: 0 4px 24px rgba(0,0,0,0.04);
    --radius: 20px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.2s ease;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Header */
header {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    font-size: 1.6rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 2.5rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

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

/* Hero */
.hero {
    padding: 5rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #eef0ff 100%);
}

.hero-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: -2px;
    color: var(--text);
    margin-bottom: 1.2rem;
    line-height: 1.1;
}

.hero-text .lead {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat strong {
    display: block;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent);
}

.stat span {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Визуальная луна */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 350px;
}

.orbit-ring {
    width: 280px;
    height: 280px;
    border: 2px dashed #cfd4f0;
    border-radius: 50%;
    position: absolute;
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.moon-3d {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fefefe, #d9dceb, #a3abcc);
    box-shadow: 0 25px 50px rgba(79, 110, 247, 0.15), inset -12px -12px 20px rgba(0,0,0,0.05), inset -4px -4px 8px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

/* Факты */
.facts {
    padding: 6rem 1.5rem;
    background: var(--surface);
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-weight: 400;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.8rem;
}

.card {
    background: var(--bg);
    padding: 2rem 1.8rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    border: 1px solid var(--border);
    text-align: center;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.2rem;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    color: var(--text);
}

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

/* Фазы */
.phases {
    padding: 6rem 1.5rem;
    background: #f0f2fc;
}

.phases-strip {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-top: 2rem;
}

.phase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 85px;
}

.phase span {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    text-align: center;
}

.moon-phase {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #eef0ff;
    box-shadow: inset -4px -4px 8px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.06);
    position: relative;
}

.new           { background: #dde0f0; }
.wax-crescent  { background: linear-gradient(to right, #ffffff 30%, #dde0f0 30%); }
.first-q       { background: linear-gradient(to right, #ffffff 50%, #dde0f0 50%); }
.wax-gibbous   { background: linear-gradient(to right, #ffffff 75%, #dde0f0 75%); }
.full          { background: radial-gradient(circle at 40% 40%, #ffffff, #cfd4f0); }
.wan-gibbous   { background: linear-gradient(to left, #ffffff 75%, #dde0f0 75%); }
.last-q        { background: linear-gradient(to left, #ffffff 50%, #dde0f0 50%); }
.wan-crescent  { background: linear-gradient(to left, #ffffff 30%, #dde0f0 30%); }

/* Footer */
footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        height: 280px;
    }

    .nav-links a {
        margin-left: 1.2rem;
        font-size: 0.95rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-text h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .nav-links a {
        margin-left: 0.8rem;
        font-size: 0.85rem;
    }

    .phases-strip {
        gap: 0.8rem;
    }

    .moon-phase {
        width: 55px;
        height: 55px;
    }
}
