/* CSS Reset and Base Styles */
@font-face {
    font-family: 'Gilroy';
    src: local('Gilroy Regular'), local('Gilroy-Regular'),
         url('Gilroy/Gilroy-Regular.woff') format('woff'),
         url('Gilroy/Gilroy-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: local('Gilroy Medium'), local('Gilroy-Medium'),
         url('Gilroy/Gilroy-Medium.woff') format('woff'),
         url('Gilroy/Gilroy-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: local('Gilroy SemiBold'), local('Gilroy-SemiBold'),
         url('Gilroy/Gilroy-SemiBold.woff') format('woff'),
         url('Gilroy/Gilroy-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Gilroy';
    src: local('Gilroy Bold'), local('Gilroy-Bold'),
         url('Gilroy/Gilroy-Bold.woff') format('woff'),
         url('Gilroy/Gilroy-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f8f8f8;
    --card-bg: #ffffff;
    --text-primary: #111111;
    --text-secondary: #555555;
    --text-muted: #333333;
    --accent-color: #5266FB;
    --accent-hover: #4338CA;
    --border-color: #e5e5e5;
    --gradient-primary: linear-gradient(135deg, #5266FB 0%, #4338CA 100%);
    --gradient-secondary: linear-gradient(135deg, #f8f8f8 0%, #e5e5e5 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
}

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* выравниваем по левому краю */
    line-height: 1;
}

.nav-logo .logo-text {
    font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 34px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    margin-bottom: 2px;
}

.nav-logo .logo-subtitle {
    font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.nav-logo:hover .logo-text {
    color: var(--accent-color);
}

.nav-logo:hover .logo-subtitle {
    color: var(--text-muted);
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 120px; /* Отступ от навигации */
}

/* Растягиваем внутренний .container на всю ширину секции hero,
   чтобы левый край совпадал с остальными секциями */
.hero > .container {
    width: 100%;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(82, 102, 251, 0.03) 0%, transparent 70%);
    z-index: -1;
}

/* Hero top image strip - скрыта на десктопе */
.hero-image {
    display: none;
}

.hero-content {
    margin-left: 0;
    margin: 0;
    margin-top: 0; /* убираем отступ, так как нет картинки */
    padding-left: 0;
    text-align: left;
}


.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-title .highlight {
    color: var(--accent-color);
}

.hero-subtitle {
    max-width: 900px;
    margin: 0 0 48px 0;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.hero-intro {
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
}

.hero-tagline {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
    font-style: italic;
    margin-bottom: 20px;
    opacity: 0.8;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
    opacity: 0.85;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--card-bg);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--secondary-bg);
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-header {
    text-align: left;
    margin-bottom: 80px;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.contact-section .section-subtitle {
    margin-left: 0px;
    margin-right: auto;
}

/* About Section */
.about-section {
    background: var(--secondary-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-text .lead {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

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

.company-details h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.details-grid {
    display: grid;
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.detail-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-weight: 500;
    color: var(--text-primary);
}

/* Product Section */
.product-content {
    max-width: 800px;
    margin: 0;
    text-align: left;
}

.product-main {
    text-align: left;
}

.product-logo {
    margin-bottom: 32px;
    text-align: left;
}

.product-logo-img {
    max-width: 200px;
    height: auto;
    margin: 0;
    display: block;
    border-radius: 20px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    shape-rendering: crispEdges;
}

.product-logo-img svg {
    max-width: 200px;
    height: auto;
    shape-rendering: crispEdges;
}

/* product-description inherits container alignment */

.product-description .lead {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.product-description p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

.product-buttons {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: 0px;
}

/* Contact Section */
.contact-section {
    background: var(--secondary-bg);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1000px;
    margin: 0;
}

/* contact-info inherits container alignment */

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.contact-details {
    display: grid;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.contact-item svg {
    color: var(--accent-color);
}

.contact-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent-color);
}

/* contact-form-container inherits container alignment */

.contact-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(82, 102, 251, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--primary-bg);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo .logo-text {
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

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

.separator {
    color: var(--text-muted);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 90px 20px 60px 20px; /* ниже фикс-меню и меньше общий размер */
    }
    
    .hero-image {
        display: block; /* показываем картинку на мобилке */
        position: absolute;
        top: 90px; /* отступ под навигацию */
        left: 0;
        transform: none;
        width: 100%;
        max-width: none;
        height: 300px;
        background: url('uploads/tg-image.png') center center/cover no-repeat;
        background-position: center center;
        z-index: -1;
    }
    
    .hero-content {
        margin-top: 280px; /* опустим заголовок ниже на мобилке */
    }
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 90px;
        flex-direction: column;
        background-color: var(--primary-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: 20px 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-content {
        margin-left: 0px !important;
        /* Mobile alignment fix */
    }
    
    .product-logo,
    .product-description,
    .product-buttons {
        margin-left: 0 !important;
    }
    
    .contact-info,
    .contact-form-container,
    .contact-section .section-subtitle {
        margin-left: 0 !important;
    }

    .hero-title {
        font-size: 3.5rem;
        line-height: 1.1;
        text-align: left;
    }

    .hero-intro {
        font-size: 1.2rem;
        margin-bottom: 16px;
    }

    .hero-tagline {
        font-size: 1.05rem;
        margin-bottom: 16px;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .section-header {
        text-align: left;
        margin-bottom: 50px;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .section-subtitle {
        margin: 0;
    }

    .product-content {
        text-align: left;
    }

    .product-logo {
        text-align: left;
        margin-bottom: 24px;
    }

    .product-buttons {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .company-details h3 {
        font-size: 1.3rem;
    }

    .modal-header h3 {
        font-size: 1.3rem;
    }

    .section-subtitle {
        font-size: 1.1rem;
    }

    .about-text .lead,
    .product-description .lead {
        font-size: 1rem;
        font-weight: 400;
    }

    .about-text p,
    .product-description p {
        font-size: 1rem;
    }

    .btn {
        font-size: 15px;
        padding: 10px 20px;
    }

    .contact-info h3 {
        font-size: 1.2rem;
        line-height: 1.2;
        text-align: left;
    }

    .contact-form .btn {
        width: 100%;
        margin: 0 auto;
        display: block;
        text-align: center;
    }

    .product-logo-img {
        max-width: 180px;
    }

    .product-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-content {
        flex-direction: column;
        text-align: left;
    }

    section {
        padding: 80px 20px;
    }

    .section-header {
        margin-bottom: 50px;
    }
}

@media (max-width: 480px) {
    body {
        overflow-x: hidden;
    }

    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .hero-image {
        top: 90px; /* отступ под навигацию */
        left: 0;
        transform: none;
        width: 100%;
        max-width: none;
        height: 260px;
        background-position: center center;
    }
    
    .hero-content {
        margin-top: 280px !important; /* опустим заголовок ниже на мобилке */
    }
    
    .hero-content {
        margin-left: 0 !important;
    }
    
    .product-logo,
    .product-description,
    .product-buttons {
        margin-left: 0 !important;
    }
    
    .contact-info,
    .contact-form-container,
    .contact-section .section-subtitle {
        margin-left: 0 !important;
    }

    .container,
    .nav-container {
        padding: 0 16px;
    }

    .hero {
        padding: 110px 16px 80px 16px;
    }

    section {
        padding: 100px 16px;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.1;
        text-align: left;
        white-space: normal;
    }

    .hero-intro {
        font-size: 1.05rem;
        margin-bottom: 14px;
    }

    .hero-tagline {
        font-size: 0.95rem;
        margin-bottom: 14px;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-header {
        text-align: left;
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 1.4rem;
        text-align: left;
    }

    .section-subtitle {
        margin: 0;
    }

    .product-content {
        text-align: left;
    }

    .product-logo {
        text-align: left;
        margin-bottom: 20px;
    }

    .product-logo-img {
        max-width: 160px;
    }

    .product-buttons {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .details-grid {
        gap: 12px;
    }

    .detail-item {
        padding: 12px;
    }

    .contact-info h3 {
        font-size: 1rem;
        line-height: 1.1;
        text-align: left;
    }

    .company-details h3 {
        font-size: 1.1rem;
    }

    .modal-header h3 {
        font-size: 1.1rem;
        white-space: nowrap;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .about-text .lead,
    .product-description .lead {
        font-size: 0.95rem;
        font-weight: 400;
    }

    .about-text p,
    .product-description p {
        font-size: 0.95rem;
    }

    .detail-label {
        font-size: 0.8rem;
    }

    .detail-value {
        font-size: 0.9rem;
    }

    .btn {
        font-size: 14px;
        padding: 10px 18px;
        max-width: 100%;
        word-wrap: break-word;
    }

    .hero-title,
    .section-title,
    h1, h2, h3 {
        word-wrap: break-word;
        hyphens: auto;
    }

    .contact-info h3 {
        word-break: break-word;
        line-height: 1.3;
    }
}
