/* DESIGN SYSTEM & TOKENS */
:root {
    --color-brand-dark: #2D1B14;
    --color-brand-brown: #4A3728;
    --color-brand-accent: #D4A373;
    --color-brand-bg: #FDF8F3;
    --color-brand-white: #FFFFFF;
    --color-brand-cherry: #880D1E;
    --color-text-main: #3E2F28;
    --color-text-muted: #7A6960;
    
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    
    --container-width: 1200px;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(45, 27, 20, 0.08);
    --radius: 8px;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; border: none; outline: none; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-main);
    background-color: var(--color-brand-bg);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 80px 0; }
.section--warm { background-color: #F8F0E8; }
.section--dark { background-color: var(--color-brand-dark); color: var(--color-brand-white); }

.h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--color-brand-dark);
    margin-bottom: 30px;
}
.section--dark .h2 { color: var(--color-brand-white); }
.text-italic { font-family: var(--font-serif); font-style: italic; }
.text-center { text-align: center; }

/* UTILS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}
.btn--small { padding: 10px 20px; font-size: 14px; }
.btn--accent { background-color: var(--color-brand-accent); color: var(--color-brand-dark); }
.btn--accent:hover { background-color: #c5925f; transform: translateY(-2px); }
.btn--outline { border: 1px solid var(--color-brand-white); color: var(--color-brand-white); }
.btn--outline:hover { background: rgba(255,255,255,0.1); }
.btn--full { width: 100%; }
.btn-text { 
    color: var(--color-brand-accent); 
    font-weight: 600; 
    border-bottom: 1px solid transparent;
}
.btn-text:hover { border-bottom-color: var(--color-brand-accent); }

/* HEADER */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(253, 248, 243, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(74, 55, 40, 0.1);
    height: auto;
    display: flex;
    align-items: center;
	
	padding-block: 20px; /* Больше воздуха */
    min-height: 90px;
}

.logo 	{ display: flex; 
		flex-direction: column;
		line-height: 1.2; /* Чтобы "Чеховский" не подрезался */
		padding-top: 4px;
		}
		
.logo__title	{ font-family: var(--font-serif);
				  font-weight: 700;
				  font-size: 20px;
				  letter-spacing: 2px;
				  color: var(--color-brand-dark);
				  
				  display: block;
				  padding-bottom: 2px;
				  }
				  
.logo__sub { font-size: 10px; font-weight: 400; color: var(--color-brand-brown); letter-spacing: 1px; }

.logo--light .logo__title { color: var(--color-brand-white); }

.logo--light .logo__sub { color: var(--color-brand-accent); }

.nav__list { display: flex; gap: 30px; }
.nav__link { font-size: 14px; font-weight: 500; color: var(--color-brand-brown); }
.nav__link:hover { color: var(--color-brand-accent); }

.header__actions { display: flex; align-items: center; gap: 20px; }
.header__phone { font-weight: 600; color: var(--color-brand-dark); }

/* HERO */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--color-brand-white);
    background-color: var(--color-brand-dark);
    overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 1; opacity: 0.5; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__container { position: relative; z-index: 2; }
.hero__content { max-width: 700px; }
.hero__title { font-family: var(--font-serif); font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; margin-bottom: 25px; }
.hero__subtitle { font-size: 1.25rem; margin-bottom: 40px; opacity: 0.9; font-weight: 300; }
.hero__btns { display: flex; gap: 15px; }

/* FLAGSHIPS */
.card-flagship {
    background: var(--color-brand-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.card-flagship:hover { transform: translateY(-10px); }
.card-flagship__img { height: 300px; overflow: hidden; }
.card-flagship__img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.card-flagship:hover .card-flagship__img img { scale: 1.1; }
.card-flagship__content { padding: 40px; }
.badge { 
    display: inline-block; padding: 4px 12px; background: var(--color-brand-bg); 
    color: var(--color-brand-brown); font-size: 12px; border-radius: 20px; margin-bottom: 15px; 
}
.card-flagship__title { font-family: var(--font-serif); font-size: 1.8rem; margin-bottom: 15px; }

/* BENEFITS */
.benefits__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-top: 50px; }
.benefit-item { text-align: center; }
.benefit-item__icon { font-size: 2.5rem; margin-bottom: 20px; display: block; }
.benefit-item__title { font-size: 1.1rem; margin-bottom: 10px; color: var(--color-brand-dark); }
.benefit-item p { font-size: 0.9rem; color: var(--color-text-muted); }

/* SHOWCASE */
.showcase__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.product-card { background: white; border-radius: 4px; border: 1px solid rgba(0,0,0,0.05); transition: var(--transition); position: relative; }
.product-card:hover { box-shadow: var(--shadow); }
.product-card__img { aspect-ratio: 1; background: #f9f9f9; padding: 20px; }
.product-card__img img { width: 100%; height: 100%; object-fit: contain; }
.product-card__info { padding: 20px; }
.product-card__cat { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--color-brand-accent); }
.product-card__name { font-family: var(--font-serif); margin: 5px 0; font-size: 1.2rem; }
.product-card__desc { font-size: 13px; color: var(--color-text-muted); }

.filter-btn { background: none; padding: 8px 16px; cursor: pointer; border-radius: 20px; font-size: 14px; }
.filter-btn.active { background: var(--color-brand-brown); color: white; }

/* PRODUCTION */
.production__wrapper { display: flex; gap: 60px; align-items: center; }
.production__content { flex: 1; }
.production__stats { display: flex; gap: 40px; margin-top: 40px; }
.stat-item { display: flex; flex-direction: column; }
.stat-item__num { font-family: var(--font-serif); font-size: 2.5rem; color: var(--color-brand-accent); line-height: 1; }
.stat-item__text { font-size: 14px; color: var(--color-text-muted); }
.production__gallery { flex: 1; }
.production__img-main { border-radius: var(--radius); overflow: hidden; height: 400px; }
.production__img-main img { width: 100%; height: 100%; object-fit: cover; }

/* B2B FORM */
.b2b__list { margin: 25px 0; }
.b2b__list li { margin-bottom: 15px; padding-left: 25px; position: relative; }
.b2b__list li::before { content: '✓'; position: absolute; left: 0; color: var(--color-brand-accent); }
.steps { display: flex; justify-content: space-between; margin-top: 40px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.step { font-size: 13px; opacity: 0.8; }
.step span { display: block; font-weight: 700; color: var(--color-brand-accent); font-size: 18px; }

.contact-form { background: var(--color-brand-white); padding: 40px; border-radius: var(--radius); color: var(--color-text-main); }
.contact-form__title { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: 5px; }
.contact-form__sub { font-size: 13px; color: var(--color-text-muted); margin-bottom: 25px; }
.form-group { margin-bottom: 15px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 16px; border: 1px solid #E2E2E2; border-radius: 4px; background: #F9F9F9;
}
.grid-2-small { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* WHERE TO BUY */
.marketplaces { display: flex; justify-content: center; gap: 30px; margin: 40px 0; flex-wrap: wrap; }
.market-link { 
    padding: 15px 40px; border: 1px solid #ddd; font-weight: 700; font-size: 1.2rem; border-radius: 4px; 
    filter: grayscale(1); opacity: 0.6; 
}
.market-link:hover { filter: grayscale(0); opacity: 1; border-color: var(--color-brand-accent); }
.small { font-size: 12px; color: var(--color-text-muted); }

/* CONTACTS */
.contacts__data { display: flex; flex-direction: column; gap: 30px; }
.contact-item strong { display: block; font-size: 14px; text-transform: uppercase; color: var(--color-brand-accent); margin-bottom: 5px; }
.map-placeholder { 
    background: #eee; height: 100%; min-height: 400px; border-radius: var(--radius); 
    display: flex; align-items: center; justify-content: center; color: #999;
}

/* FOOTER */
.footer { background: var(--color-brand-dark); color: rgba(255,255,255,0.7); padding: 60px 0 30px; border-top: 4px solid var(--color-brand-accent); }
.footer__top { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 30px; margin-bottom: 30px; }
.footer__socials a { margin-left: 20px; font-weight: 600; color: white; }
.footer__bottom { font-size: 12px; }
.footer__links a { margin-right: 20px; text-decoration: underline; }

/* RESPONSIVE */
.burger { display: none; flex-direction: column; gap: 6px; background: none; cursor: pointer; }
.burger span { width: 30px; height: 2px; background: var(--color-brand-dark); }

@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; }
    .showcase__grid { grid-template-columns: repeat(2, 1fr); }
    .benefits__grid { grid-template-columns: repeat(2, 1fr); }
    .production__wrapper { flex-direction: column; }
    .hero { height: auto; padding: 120px 0; }
}

@media (max-width: 768px) {
    .nav { display: none; } /* Будет реализовано в JS */
    .burger { display: flex; }
    .header__phone { display: none; }
    .h2 { font-size: 2rem; }
    .showcase__grid { grid-template-columns: 1fr; }
    .benefits__grid { grid-template-columns: 1fr; }
    .hero__title { font-size: 2.5rem; }
    .hero__btns { flex-direction: column; }
    .grid-2-small { grid-template-columns: 1fr; }
}



/* Мобильное меню (Off-canvas) */
.overlay {
    position: fixed; inset: 0; background: rgba(45, 27, 20, 0.6);
    z-index: 998; opacity: 0; pointer-events: none; transition: 0.3s;
}
.overlay[data-state="open"] { opacity: 1; pointer-events: auto; }

.mobile-menu {
    position: fixed; top: 0; right: -100%; width: 80%; max-width: 350px; height: 100%;
    background: var(--color-brand-bg); z-index: 999; padding: 40px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1); transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu[data-state="open"] { right: 0; }

.mobile-nav { display: flex; flex-direction: column; gap: 25px; margin-top: 40px; }
.mobile-nav a { font-family: var(--font-serif); font-size: 20px; color: var(--color-brand-dark); }
.mobile-nav hr { border: none; border-top: 1px solid rgba(0,0,0,0.1); margin: 10px 0; }

/* Состояния навигации */
.nav__link.is-active { color: var(--color-brand-accent); }
.nav__link.is-active::after { content: ''; display: block; height: 2px; background: var(--color-brand-accent); margin-top: 4px; }

/* Анимации появления */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Toast-уведомления */
.toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--color-brand-dark); color: white; padding: 12px 24px;
    border-radius: 40px; z-index: 2000; font-size: 14px; transition: 0.3s; box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.toast.is-active { transform: translateX(-50%) translateY(0); }
.toast--error { background: var(--color-brand-cherry); }

/* Бургер (3 полоски) */
.burger span { transition: 0.3s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Фикс шапки: распределяем лого и бургер по краям */
.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px; /* Минимальный зазор, чтобы не слипались */
}

/* Расстояние для логотипа, чтобы не прилипал к левому краю */
.logo {
    margin-right: auto; 
    padding-right: 15px;
}

/* Accessibility: Индикация фокуса при навигации с клавиатуры */
a:focus-visible, 
button:focus-visible, 
input:focus-visible {
    outline: 2px solid var(--color-brand-accent);
    outline-offset: 4px;
}

/* Стили для валидации в форме */
.input-error {
    border-color: var(--color-brand-cherry) !important;
    background-color: rgba(136, 13, 30, 0.05) !important;
}

/* Мобильные правки для iPhone SE */
@media (max-width: 375px) {
    .hero__title { font-size: 2rem; }
    .logo__title { font-size: 16px; }
    .header { padding-block: 15px; }
}