/* ============================================
   MARUN - CSS Styles
   Современный, минималистичный, "дорогой" дизайн
   ============================================ */

/* CSS Variables */
:root {
    --color-primary: #1a1a2e;
    --color-primary-light: #16213e;
    --color-accent: #e94560;
    --color-accent-hover: #d63d56;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-bg: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-bg-dark: #f0f2f5;
    --color-border: #e5e7eb;
    --color-white: #ffffff;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --container-max: 1200px;
    --header-height: 100px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

ul {
    list-style: none;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    height: var(--header-height);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo__img {
    height: 80px;
    width: auto;
}

.logo__text {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.5px;
}

/* Navigation */
.nav__list {
    display: flex;
    gap: 32px;
}

.nav__link {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-light);
    padding: 8px 0;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-normal);
}

.nav__link:hover,
.nav__link.active {
    color: var(--color-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
    width: 100%;
}

/* Burger Menu */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 32px;
    height: 32px;
    padding: 4px;
}

.burger__line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all var(--transition-normal);
}

.burger.active .burger__line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger.active .burger__line:nth-child(2) {
    opacity: 0;
}

.burger.active .burger__line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.btn--primary {
    background: var(--color-accent);
    color: var(--color-white);
    box-shadow: 0 4px 16px rgba(233, 69, 96, 0.3);
}

.btn--primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
}

.btn--secondary {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-border);
}

.btn--secondary:hover {
    border-color: var(--color-primary);
    background: var(--color-bg-light);
}

.btn--full {
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: 80px 0 100px;
    background: linear-gradient(135deg, var(--color-bg-light) 0%, var(--color-bg) 100%);
    overflow: hidden;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero__content {
    max-width: 560px;
}

.hero__title {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-primary);
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero__subtitle {
    font-size: 20px;
    color: var(--color-text-light);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero__buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero__image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__logo-img {
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* ============================================
   ADVANTAGES SECTION
   ============================================ */
.advantages {
    padding: 80px 0;
    background: var(--color-white);
}

.advantages__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.advantage-card {
    padding: 32px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-normal);
}

.advantage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.advantage-card__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.advantage-card__icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-accent);
}

.advantage-card__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.advantage-card__text {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.5;
}

/* ============================================
   SECTIONS (General)
   ============================================ */
.section {
    padding: 100px 0;
}

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

.about__content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section--about .section__title {
    font-size: 32px;
    margin-bottom: 32px;
}

.about__text {
    text-align: left;
}

.about__text p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.about__text p:last-child {
    margin-bottom: 0;
}

.section--drinks {
    background: var(--color-bg-light);
}

.section--sweets {
    background: var(--color-white);
}

.section--brands {
    background: var(--color-bg-light);
}

.section--horeca {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-white);
}

.section--contacts {
    background: var(--color-white);
}

.section__header {
    text-align: center;
    margin-bottom: 48px;
}

.section__title {
    font-size: 40px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section--horeca .section__title {
    color: var(--color-white);
}

.section__subtitle {
    font-size: 18px;
    color: var(--color-text-light);
}

/* ============================================
   BRANDS GRID
   ============================================ */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
}

.brands-grid--all {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.brand-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 24px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
}

.brand-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-accent);
}

.brand-card__logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    text-align: center;
    word-break: break-word;
}

.brand-card__logo img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

/* Brands Filter */
.brands-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-light);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

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

/* Brands Search */
.brands-search {
    max-width: 400px;
    margin: 0 auto 32px;
}

.brands-search__input {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-white);
    transition: all var(--transition-fast);
}

.brands-search__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.brands-search__input::placeholder {
    color: var(--color-text-muted);
}

/* ============================================
   HORECA SECTION
   ============================================ */
.horeca__content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.horeca__logo {
    margin-bottom: 24px;
}

.horeca__logo img {
    height: 120px;
    width: auto;
}

.horeca__description {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.7;
}

.btn--light {
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn--light:hover {
    background: var(--color-bg-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.horeca__features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 32px;
    margin-bottom: 40px;
}

.horeca__feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.horeca__feature svg {
    width: 20px;
    height: 20px;
    color: var(--color-accent);
}

/* ============================================
   CONTACTS SECTION
   ============================================ */
.contacts__wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

.contacts__info {
    padding-top: 20px;
}

.contacts__text {
    font-size: 16px;
    color: var(--color-text-light);
    margin-bottom: 32px;
    line-height: 1.7;
}

.contacts__item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contacts__item svg {
    width: 24px;
    height: 24px;
    color: var(--color-accent);
}

.contacts__link {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-primary);
}

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

/* Form */
.contacts__form-wrapper {
    position: relative;
}

.form {
    background: var(--color-bg-light);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form__group {
    margin-bottom: 20px;
}

.form__group--hidden {
    display: none;
}

.form__group--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.form__label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.form__input,
.form__select,
.form__textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    transition: all var(--transition-fast);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.form__input.error,
.form__select.error,
.form__textarea.error {
    border-color: #ef4444;
}

.form__select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

.form__textarea {
    resize: vertical;
    min-height: 100px;
}

.form__checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.form__checkbox-label {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.5;
}

.form__link {
    color: var(--color-accent);
}

.form__link:hover {
    text-decoration: underline;
}

/* Form Success */
.form__success {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.form__success.show {
    opacity: 1;
    visibility: visible;
}

.form__success svg {
    width: 64px;
    height: 64px;
    color: #22c55e;
    margin-bottom: 20px;
}

.form__success h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.form__success p {
    font-size: 16px;
    color: var(--color-text-light);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 60px 0 40px;
}

.footer__content {
    text-align: center;
}

.footer__logo {
    display: inline-block;
    margin-bottom: 24px;
}

.footer__logo .logo__img {
    height: 72px;
    width: auto;
}

.footer__logo .logo__text {
    color: var(--color-white);
}

.footer__nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
}

.footer__link {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--color-white);
}

.footer__bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__privacy {
    display: inline-block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.footer__privacy:hover {
    color: var(--color-white);
}

.footer__copy {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    transition: transform var(--transition-normal);
}

.modal.open .modal__content {
    transform: translate(-50%, -50%) scale(1);
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.modal__close:hover {
    background: var(--color-bg-light);
}

.modal__close svg {
    width: 24px;
    height: 24px;
    color: var(--color-text-light);
}

.modal__title {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 20px;
    padding-right: 40px;
}

.modal__body {
    color: var(--color-text-light);
    line-height: 1.7;
}

.modal__body h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 20px 0 8px;
}

.modal__body p {
    margin-bottom: 12px;
}

/* Brand Modal */
.modal__brand {
    text-align: center;
}

.modal__brand-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    padding: 16px;
}

.modal__brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal__brand-category {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.modal__brand-description {
    font-size: 16px;
    color: var(--color-text-light);
    margin-bottom: 24px;
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .hero__container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero__content {
        max-width: 100%;
    }
    
    .hero__buttons {
        justify-content: center;
    }
    
    .hero__image {
        order: -1;
    }
    
    .hero__image-placeholder {
        max-width: 350px;
    }
    
    .advantages__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contacts__wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contacts__info {
        text-align: center;
    }
    
    .contacts__item {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    /* Header Mobile */
    .burger {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--color-white);
        padding: 32px 24px;
        opacity: 0;
        visibility: hidden;
        transform: translateX(100%);
        transition: all var(--transition-normal);
    }
    
    .nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
    
    .nav__list {
        flex-direction: column;
        gap: 0;
    }
    
    .nav__link {
        display: block;
        padding: 16px 0;
        font-size: 18px;
        border-bottom: 1px solid var(--color-border);
    }
    
    .nav__link::after {
        display: none;
    }
    
    /* Hero Mobile */
    .hero {
        padding: 60px 0 80px;
    }
    
    .hero__title {
        font-size: 36px;
    }
    
    .hero__subtitle {
        font-size: 18px;
    }
    
    .hero__buttons {
        flex-direction: column;
    }
    
    .hero__buttons .btn {
        width: 100%;
    }
    
    /* Sections Mobile */
    .section {
        padding: 60px 0;
    }
    
    .section__title {
        font-size: 28px;
    }
    
    .section__subtitle {
        font-size: 16px;
    }
    
    /* Advantages Mobile */
    .advantages {
        padding: 60px 0;
    }
    
    .advantages__grid {
        grid-template-columns: 1fr;
    }
    
    /* Brands Grid Mobile */
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .brand-card {
        padding: 16px;
    }
    
    /* HoReCa Mobile */
    .horeca__features {
        flex-direction: column;
        align-items: center;
    }
    
    /* Form Mobile */
    .form {
        padding: 24px;
    }
    
    /* Footer Mobile */
    .footer__nav {
        flex-direction: column;
        gap: 16px;
    }
    
    /* Modal Mobile */
    .modal__content {
        padding: 24px;
        width: 95%;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero__title {
        font-size: 28px;
    }
    
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}
