:root {
    --purple: #7B61FF;
    --purple-hover: #5a3edb;
    --dark-bg: #101018;
    --dark-blue: #1A1A2E;
    --grey-text: #808080;
    --light-border: #D9D9D9;
    --white: #FFFFFF;
    --font-head: 'Manrope', sans-serif;
    --font-text: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-text); color: var(--dark-blue); background-color: var(--white); line-height: 1.5; overflow-x: hidden; }
h1, h2, h3, .logo, .nav-link, .btn { font-family: var(--font-head); }

.container { 
    max-width: 1440px; margin: 0 auto; padding: 0 120px; 
}

.section-padding { padding: 80px 0; transition: padding 0.3s ease; } 
section { margin-bottom: 40px; scroll-margin-top: 100px; }

/* Анимации Fade-Up */
.fade-up { opacity: 0; transform: translateY(60px); transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.3s; }
.stagger-3 { transition-delay: 0.5s; }

/* Header */
.header { position: fixed; top: 0; left: 0; width: 100%; height: 80px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(8px); z-index: 1000; border-radius: 0 0 12px 12px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo { font-size: 32px; font-weight: 500; color: var(--dark-blue); text-decoration: none; letter-spacing: -0.04em; }
.nav { display: flex; gap: 40px; }
.nav-link { text-decoration: none; color: var(--dark-blue); font-size: 18px; transition: color 0.3s ease; }
.nav-link:hover, .nav-link.active { color: var(--purple); }
/* Кнопка в навигации (скрываем по умолчанию на десктопе) */
.nav-btn {
    display: none;
}

.burger-menu { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 6px; z-index: 1001; }
.burger-menu span { display: block; width: 30px; height: 2px; background-color: var(--dark-blue); transition: transform 0.3s ease, opacity 0.3s ease; }
.burger-menu.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger-menu.open span:nth-child(2) { opacity: 0; }
.burger-menu.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.btn-primary { background-color: var(--purple); color: var(--white); border: none; border-radius: 12px; padding: 20px 40px; font-size: 20px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; }
.btn-primary:hover { background-color: var(--purple-hover); transform: translateY(-2px); }

/* Hero */
.hero { height: 100vh; min-height: 700px; background: url('images/Hero_gradient.webp') center / cover no-repeat, url('images/people-having-fun-wedding-hall_crop.webp') center / cover no-repeat; display: flex; align-items: center; padding-top: 100px; box-sizing: border-box; }
.hero > .container { width: 100%; }
.hero-content { max-width: 750px; }
.hero-title { font-size: 40px; line-height: 1.2; letter-spacing: -0.04em; color: #FFFFFF; max-width: 614px; margin-bottom: 24px; font-weight: 500; }
.hero-subtitle { font-size: 18px; color: #B4B4B4; line-height: 1.5; margin-bottom: 40px; }
.hero-action { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; }
.hero-hint { font-size: 14px; color: #B4B4B4; font-weight: 400; }

/* Заголовки */
.section-title { font-size: clamp(28px, 4vw, 36px); margin-bottom: 60px; font-weight: 400; letter-spacing: -0.02em; }
.text-purple { color: var(--purple); }
.text-white { color: var(--white) !important; }
.center { text-align: center; }

/* Направления */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.service-card { background-color: var(--white); border: 2px solid var(--light-border); border-radius: 12px; padding: 40px; transition: transform 0.5s ease, border-color 0.5s ease; }
.service-card:hover { border-color: var(--purple); transform: scale(1.05); z-index: 2; }
.service-card .icon-wrapper { margin-bottom: 30px; }
.service-card h3 { font-size: 24px; line-height: 1.3; margin-bottom: 12px; font-weight: 600; }
.service-card p { font-size: 16px; color: #4A4A4A; }
.card-link {
    display: inline-block;
    margin-top: 24px;
    color: var(--purple);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-head);
    transition: color 0.3s ease, transform 0.3s ease;
}

.card-link:hover {
    color: var(--purple-hover);
    transform: translateX(6px); /* Легкий сдвиг стрелочки вправо при наведении */
}

/* Таймлайн */
.process-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.process-timeline { flex: 1; max-width: 362px; height: 580px; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.timeline-line-bg { position: absolute; left: 15px; top: 16px; height: calc(100% - 32px); width: 2px; background-color: var(--light-border); z-index: 1; }
.timeline-line-progress { position: absolute; left: 15px; top: 16px; width: 2px; background-color: var(--purple); height: 0px; z-index: 2; }
.timeline-step { position: relative; padding-left: 70px; z-index: 3; }
.step-marker { position: absolute; left: 0; top: 0; width: 32px; height: 32px; background-color: var(--light-border); border-radius: 50%; border: 6px solid #FFF; transform: scale(0.5); opacity: 0.5; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.step-content { opacity: 0; transform: translateX(30px); transition: opacity 0.5s ease, transform 0.5s ease; }
.timeline-step.active .step-marker { background-color: var(--purple); border-color: #EAE5FF; transform: scale(1); opacity: 1; }
.timeline-step.active .step-content { opacity: 1; transform: translateX(0); }
.process-image img { width: 100%; max-width: 589px; height: 600px; border-radius: 12px; object-fit: cover; }

/* Почему мы */
.why-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 60px; }
.why-col h3 { font-size: 26px; font-weight: 500; margin-bottom: 20px; font-family: var(--font-text); }
.why-col p { font-size: 16px; color: #4A4A4A; line-height: 1.6; }

/* Форма контактов */
.contact-form-section { background-color: var(--dark-bg); border-radius: 24px 24px 0 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 800px; margin: 0 auto; }
.input-group { position: relative; width: 100%; transition: transform 0.4s ease; }
.input-group:hover { transform: scale(1.02); }
.input-group input { width: 100%; padding: 20px 50px 20px 20px; background: transparent; border: 1px solid var(--grey-text); border-radius: 6px; color: var(--white); font-size: 16px; outline: none; transition: all 0.4s ease; }
.input-group input::placeholder { color: var(--grey-text); transition: color 0.4s ease; } 
.input-group:hover input, .input-group input:focus { border-color: var(--white); }
.input-group:hover input::placeholder { color: var(--white); }
.input-icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; pointer-events: none; transition: stroke 0.4s ease; }
.icon-purple { stroke: var(--purple); }
.icon-grey { stroke: #6D6D8B; }
.input-group:hover .input-icon { stroke: var(--purple); }
.submit-btn { grid-column: 1 / -1; margin-top: 20px; width: 100%; }

/* Карта и Контакты */
.map-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; align-items: stretch; }
.map-info { display: flex; flex-direction: column; justify-content: center; }
.map-info .section-title { margin-bottom: 40px; text-align: left; }
.contact-details { display: flex; flex-direction: column; gap: 24px; margin-bottom: 40px; }
.contact-item { display: flex; flex-direction: column; gap: 6px; }
.contact-label { font-size: 14px; color: var(--grey-text); text-transform: uppercase; letter-spacing: 0.05em; }
.contact-value { font-size: 18px; color: var(--dark-blue); text-decoration: none; font-weight: 500; transition: color 0.3s ease; }
a.contact-value:hover { color: var(--purple); }
.social-links { display: flex; gap: 16px; }
.social-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--light-border); border-radius: 50%; color: var(--dark-blue); transition: all 0.3s ease; }
.social-icon svg { width: 22px; height: 22px; fill: currentColor; }
.social-icon:hover { background-color: var(--purple); border-color: var(--purple); color: var(--white); transform: translateY(-4px); }
.map-wrapper { width: 100%; min-height: 450px; border-radius: 12px; overflow: hidden; border: 2px solid var(--light-border); position: relative; }

/* Footer */
.footer { background: #FFF; padding: 40px 0; border-top: 1px solid #eee; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 40px; }
.footer-nav a { text-decoration: none; color: var(--dark-blue); font-family: var(--font-head); font-size: 16px; transition: color 0.3s ease; }
.footer-nav a:hover { color: var(--purple); }

/* Выпадающий список */
.custom-select input { cursor: pointer; }
.dropdown-list { position: absolute; top: calc(100% + 5px); left: 0; width: 100%; background-color: var(--dark-bg); border: 1px solid var(--light-border); border-radius: 12px; list-style: none; padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(-15px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 100; box-shadow: 0 15px 30px rgba(0,0,0,0.5); }
.custom-select.open .dropdown-list { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-list li { padding: 15px 20px; color: var(--white); font-size: 16px; cursor: pointer; transition: background 0.3s ease, padding-left 0.3s ease; }
.dropdown-list li:hover { background-color: var(--purple); padding-left: 25px; }
.input-group.custom-select .input-icon { transition: stroke 0.4s ease, transform 0.3s ease; }
.custom-select.open .input-icon { transform: translateY(-50%) rotate(180deg); }

/* Модальное окно */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(8px); z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.4s ease; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-content { background-color: var(--dark-bg); border-radius: 24px; padding: 60px 80px; width: 100%; max-width: 800px; position: relative; transform: translateY(40px) scale(0.95); transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.modal-overlay.open .modal-content { transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 20px; right: 24px; background: none; border: none; color: var(--grey-text); font-size: 40px; line-height: 1; cursor: pointer; transition: color 0.3s ease; }
.modal-close:hover { color: var(--white); }

/* ==============================================================
    ПРО-АДАПТИВНОСТЬ (Safe Zoom, Rem & Fluid Typography)
============================================================== */

.nav .nav-btn { display: none; }

/* === Планшеты (max-width: 62em = ~992px) === */
@media (max-width: 62em) {
    .container { padding: 0 4vw; } 
    
    .nav {
        position: fixed; top: 0; right: 0; width: 320px; height: 100vh;
        background: #FFF; flex-direction: column; justify-content: flex-start;
        padding: 6rem 2.5rem 2.5rem; overflow-y: auto; gap: 1.5rem;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1); z-index: 1005;
        transform: translateX(100%); visibility: hidden; transition: all 0.4s ease;
    }
    .nav.open { transform: translateX(0); visibility: visible; }
    .nav-link { font-size: 1.5rem; text-align: left; width: 100%; }
    .burger-menu { display: flex; z-index: 1010; }

    .nav .nav-btn {
        display: block; width: 100%; margin-top: auto;
        text-align: center; font-size: 1.125rem; padding: 1rem 1.25rem; border-radius: 12px;
    }

    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .why-grid, .map-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .process-inner { flex-direction: column; }
    .process-image img { height: auto; max-width: 100%; aspect-ratio: 1; }
    .footer-inner { flex-direction: column; gap: 2.5rem; }
    
    .stagger-1, .stagger-2, .stagger-3 { transition-delay: 0s; } 
}

/* === Смартфоны (max-width: 48em = ~768px) === */
@media (max-width: 48em) {
    /* Умный clamp: min(rem), calc(rem + vw), max(rem) */
    .section-title { font-size: clamp(1.75rem, 1rem + 3vw, 2.25rem); margin-bottom: clamp(1.875rem, 1rem + 4vw, 3.75rem); }
    .hero-title { font-size: clamp(2rem, 1.2rem + 4vw, 3rem); }
    .hero-subtitle { font-size: clamp(1rem, 0.8rem + 1vw, 1.125rem); margin-bottom: 1.875rem; }
    
    .hero { padding-top: 7.5rem; min-height: 100vh; background-position: 70% center; }
    .section-padding { padding: clamp(3rem, 2rem + 5vw, 5rem) 0; }

    .services-grid {
        display: grid; grid-template-columns: 1fr; gap: 1.25rem;
        overflow-x: visible; scroll-snap-type: none; margin: 0; padding: 0;
    }
    
    .service-card { padding: clamp(1.5rem, 1rem + 3vw, 2.5rem); height: auto; }
    .service-card h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem); }
    .service-card p { font-size: clamp(0.875rem, 0.8rem + 0.5vw, 1rem); }

    .form-grid { grid-template-columns: 1fr; gap: 1rem; }
    .input-group input { padding: 1.125rem 2.8rem 1.125rem 1.25rem; font-size: 1rem; }
    
    .process-timeline { height: auto; gap: 2.5rem; max-width: 100%; }
    .timeline-line-bg, .timeline-line-progress { left: 11px; }
    .step-marker { width: 24px; height: 24px; border-width: 4px; }
    .timeline-step { padding-left: 50px; }
    
    .timeline-step h3 { font-size: clamp(1.25rem, 1rem + 1vw, 1.5rem); }
    .timeline-step p { font-size: clamp(0.875rem, 0.8rem + 0.5vw, 1rem); }

    .modal-content { padding: 3rem 1.5rem 2.5rem; margin: 1rem; border-radius: 20px; max-height: 90vh; overflow-y: auto; }
    .modal-close { top: 1rem; right: 1.25rem; font-size: 2rem; }
}

/* === Маленькие телефоны (max-width: 30em = ~480px) === */
@media (max-width: 30em) {
    .nav { padding: 6rem 1.25rem 2.5rem; } 
    .hero-action { width: 100%; }
    .btn-primary { width: 100%; padding: 1rem 1.25rem; font-size: 1.125rem; }
    .footer-nav { flex-direction: column; gap: 1.25rem; align-items: center; text-align: center; }
}