/* ========================================
   GreenTomato — Основные стили лендинга
   Mobile-first подход
   ======================================== */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
    background: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

ul, ol {
    list-style: none;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* === Кнопки === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
}

.btn-primary {
    background: #16a34a;
    color: #ffffff;
    border-color: #16a34a;
}

.btn-primary:hover {
    background: #15803d;
    border-color: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.3);
}

.btn-outline {
    background: transparent;
    color: #16a34a;
    border-color: #16a34a;
}

.btn-outline:hover {
    background: #16a34a;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: #16a34a;
    z-index: 1001;
}

.logo-text {
    color: #1e293b;
}

/* Бургер-меню */
.burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2rem;
    height: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #1e293b;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Навигация - мобильная */
.main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav.open {
    right: 0;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.nav-link {
    font-size: 1.125rem;
    font-weight: 500;
    color: #475569;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #16a34a;
}

/* Оверлей при открытом меню */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   HERO — О компании
   ======================================== */
.hero {
    padding: 7rem 0 4rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 50%, #fef2f2 100%);
    overflow: hidden;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 2rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    margin-bottom: 1.25rem;
}

.text-accent {
    color: #16a34a;
    position: relative;
}

.hero-text {
    font-size: 1.0625rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Статистика */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: #16a34a;
    line-height: 1.2;
}

.stat-number::after {
    content: '+';
}

.stat-label {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.25rem;
    display: block;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Визуальная часть героя */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper {
    width: 100%;
    max-width: 320px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.hero-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(239, 68, 68, 0.15));
}

/* ========================================
   СЕКЦИИ — Общие стили
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 2rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   SERVICES — Услуги
   ======================================== */
.services {
    padding: 4rem 0;
    background: #ffffff;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.service-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.75rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #16a34a, #4ade80);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover {
    border-color: #bbf7d0;
    box-shadow: 0 10px 40px rgba(22, 163, 74, 0.08);
    transform: translateY(-4px);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    margin-bottom: 1.25rem;
}

.service-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.service-text {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-features li {
    font-size: 0.875rem;
    color: #475569;
    padding-left: 1.5rem;
    position: relative;
}

.service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
}

/* ========================================
   WORKS — Работы
   ======================================== */
.works {
    padding: 4rem 0;
    background: #f8fafc;
}

.works-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.work-card {
    background: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.work-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

.work-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f1f5f9;
}

.work-image svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.work-card:hover .work-image svg {
    transform: scale(1.05);
}

.work-content {
    padding: 1.5rem;
}

.work-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #f0fdf4;
    color: #16a34a;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 1rem;
    margin-bottom: 0.75rem;
}

.work-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.work-text {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.6;
}

/* ========================================
   CONTACTS — Контакты
   ======================================== */
.contacts {
    padding: 4rem 0;
    background: #ffffff;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    background: #f0fdf4;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.contact-item p {
    font-size: 0.9375rem;
    color: #475569;
}

.contact-note {
    font-size: 0.8125rem;
    color: #94a3b8;
    display: block;
    margin-top: 0.125rem;
}

.contact-socials {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.contact-socials h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    background: #f1f5f9;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #16a34a;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Форма */
.contacts-form-wrapper {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid #e2e8f0;
}

.form-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.required {
    color: #ef4444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 1.5px solid #d1d5db;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

.form-note {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    margin-top: 0.75rem;
}

.form-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    display: none;
}

.form-message.success {
    display: block;
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.form-message.error {
    display: block;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background: #0f172a;
    color: #e2e8f0;
    padding: 3rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.footer-desc {
    font-size: 0.875rem;
    color: #94a3b8;
    line-height: 1.6;
}

.footer-grid h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #4ade80;
}

.footer-contacts li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.footer-contacts svg {
    flex-shrink: 0;
    color: #4ade80;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: #64748b;
}

/* ========================================
   АНИМАЦИИ ПОЯВЛЕНИЯ
   ======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   ПЛАНШЕТЫ (вертикально) 600px–899px
   ======================================== */
@media (min-width: 600px) and (max-width: 899px) {
    .header-inner {
        height: 4.5rem;
    }

    .hero {
        padding: 8rem 0 4rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: row;
    }

    .hero-image-wrapper {
        max-width: 380px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contacts-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ========================================
   ПЛАНШЕТЫ (горизонтально) / НОУТБУКИ 900px–1199px
   ======================================== */
@media (min-width: 900px) and (max-width: 1199px) {
    .burger {
        display: none;
    }

    .main-nav {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        background: transparent;
        box-shadow: none;
    }

    .nav-list {
        flex-direction: row;
        gap: 2rem;
    }

    .nav-link {
        font-size: 0.9375rem;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background: #16a34a;
        transition: width 0.3s ease;
    }

    .nav-link:hover::after {
        width: 100%;
    }

    .hero {
        padding: 9rem 0 5rem;
    }

    .hero-inner {
        flex-direction: row;
        align-items: center;
    }

    .hero-content {
        flex: 1;
    }

    .hero-visual {
        flex: 0 0 40%;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-buttons {
        flex-direction: row;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .contacts-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .services,
    .works,
    .contacts {
        padding: 5rem 0;
    }
}

/* ========================================
   ДЕСКТОПЫ 1200px–1599px
   ======================================== */
@media (min-width: 1200px) and (max-width: 1599px) {
    .burger {
        display: none;
    }

    .main-nav {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        background: transparent;
        box-shadow: none;
    }

    .nav-list {
        flex-direction: row;
        gap: 2.5rem;
    }

    .nav-link {
        font-size: 1rem;
        position: relative;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background: #16a34a;
        transition: width 0.3s ease;
    }

    .nav-link:hover::after {
        width: 100%;
    }

    .header-inner {
        height: 5rem;
    }

    .hero {
        padding: 10rem 0 6rem;
    }

    .hero-inner {
        flex-direction: row;
        align-items: center;
        gap: 4rem;
    }

    .hero-content {
        flex: 1;
    }

    .hero-visual {
        flex: 0 0 42%;
    }

    .hero-title {
        font-size: 3.25rem;
    }

    .hero-text {
        font-size: 1.125rem;
    }

    .hero-buttons {
        flex-direction: row;
    }

    .stat-number {
        font-size: 2.25rem;
    }

    .hero-image-wrapper {
        max-width: 420px;
    }

    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .contacts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .section-header {
        margin-bottom: 4rem;
    }

    .services,
    .works,
    .contacts {
        padding: 6rem 0;
    }
}

/* ========================================
   БОЛЬШИЕ ЭКРАНЫ 1600px+
   ======================================== */
@media (min-width: 1600px) {
    html {
        font-size: 18px;
    }

    .burger {
        display: none;
    }

    .main-nav {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        background: transparent;
        box-shadow: none;
    }

    .nav-list {
        flex-direction: row;
        gap: 2.5rem;
    }

    .nav-link {
        font-size: 1rem;
        position: relative;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background: #16a34a;
        transition: width 0.3s ease;
    }

    .nav-link:hover::after {
        width: 100%;
    }

    .header-inner {
        height: 5rem;
    }

    .hero {
        padding: 11rem 0 7rem;
    }

    .hero-inner {
        flex-direction: row;
        align-items: center;
        gap: 5rem;
    }

    .hero-content {
        flex: 1;
    }

    .hero-visual {
        flex: 0 0 45%;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-buttons {
        flex-direction: row;
    }

    .hero-image-wrapper {
        max-width: 480px;
    }

    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

    .works-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

    .contacts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .section-title {
        font-size: 2.75rem;
    }

    .services,
    .works,
    .contacts {
        padding: 7rem 0;
    }
}
