/* CSS Variables */
:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.1);
    --secondary: #64748b;
    --accent: #10b981;
    --accent-light: #d1fae5;
    --warning: #f59e0b;
    --error: #ef4444;
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.875rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.highlight {
    color: var(--primary);
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

/* YStudy logo styling in text */
.section-header .y-letter {
    color: var(--primary);
}

.section-header .study-text {
    color: var(--text);
}

.about-text .y-letter {
    color: var(--primary);
}

.about-text .study-text {
    color: var(--text);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}

.nav {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.025em;
}

.logo .y-letter {
    color: var(--primary);
}

.logo .study-text {
    color: var(--text);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

.cta-button {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.cta-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

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

.hero-content {
    animation: fadeInUp 1s ease-out;
}

/* Мобильная анимация hero - без вертикального сдвига */
@media (max-width: 768px) {
    .hero-content {
        animation: fadeInMobile 1s ease-out;
    }
}

@keyframes fadeInMobile {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Mockup */
.hero-visual {
    animation: fadeInRight 1s ease-out 0.3s both;
}

.mockup-container {
    perspective: 1000px;
}

.mockup-screen {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: rotateY(-5deg) rotateX(5deg);
    transition: var(--transition);
}

.mockup-screen:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.mockup-header {
    background: var(--bg-secondary);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.mockup-logo {
    font-weight: 600;
}

.mockup-logo .y-letter {
    color: var(--primary);
}

.mockup-nav {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.mockup-content {
    padding: 1.5rem;
}

.course-card {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.course-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    background: var(--primary);
    color: white;
    line-height: 1;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    color: var(--text) !important;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--bg);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Pricing Section */
.pricing {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.pricing-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.popular {
    border-color: var(--primary);
    transform: scale(1.05);
}

.pricing-card.enterprise {
    border-color: var(--accent);
}

.pricing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-card.enterprise .pricing-badge {
    background: var(--accent);
}

.pricing-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.pricing-price {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.price-period {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pricing-features {
    padding: 2rem;
    margin-bottom: auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.feature-item:last-child {
    margin-bottom: 0;
}

.pricing-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-card .pricing-header,
.pricing-card .pricing-features {
    flex-shrink: 0;
}

.pricing-card .btn {
    margin: 1rem;
    border-radius: var(--radius);
    width: calc(100% - 2rem);
    align-self: center;
}

.pricing-note {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}

.pricing-note h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.pricing-note p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--bg);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text h2 {
    margin-bottom: 2rem;
}

.about-text ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.about-text li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.tech-stack {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.tech-stack h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.tech-icons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.tech-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.tech-icon {
    font-size: 1.5rem;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: var(--bg-secondary);
    color: var(--text);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-primary {
    background: var(--primary);
    color: white;
}

.cta .btn-primary:hover {
    background: var(--primary-hover);
    color: white;
}

.cta .btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.cta .btn-secondary:hover {
    background: var(--bg);
    color: var(--text);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo .y-letter {
    color: var(--primary);
}

.footer-logo .study-text {
    color: white;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

    .hero-title {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 0.5rem 0;
    }

    .nav-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.popular {
        transform: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-actions,
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .hero {
        padding: 160px 0 60px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .nav-links a {
        font-size: 0.875rem;
        letter-spacing: -0.01em;
    }

    .pricing-card .btn {
        margin: 1rem;
        margin-top: auto;
        width: calc(100% - 2rem);
    }
}
