/* ====== VARIABLES & RESET ====== */
:root{
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #222222; /* Чуть мягче черного */
  --muted: #666666;
  --accent: #1b1b1b;
  --accent-2: #dba86b;
  --card: #f9f9f9;
  --border: rgba(0,0,0,0.08); /* Более явная переменная для границ */
  --radius: 16px;
  --maxw: 1140px; /* Чуть уже стандарт, часто смотрится аккуратнее */
  --gap: 24px;
  --transition: 300ms ease; /* Добавил плавность ease */
  --header-height: 80px; /* Фиксируем высоту хедера для расчетов */
}

:root.dark{
  --bg:#0a0a0a;
  --surface:#141414;
  --text:#f3f3f3;
  --muted:#a0a0a0;
  --accent:#ffffff;
  --accent-2:#e0b97a;
  --card:#1a1a1a;
  --border: rgba(255,255,255,0.05);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    /* Добавил sans-serif в конец для надежности */
    font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    margin:0;
    background:var(--bg);
    color:var(--text);
    line-height:1.6; /* Чуть увеличил межстрочный интервал для читаемости */
    transition: background var(--transition), color var(--transition);
}

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

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px; /* Чуть больше отступы по бокам */
    width: 100%;
}

/* Utility Class for A11y (Hides visually but keeps for screen readers) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999;
}
.skip-link:focus {
    left: 24px;
    top: 24px;
    background: var(--accent);
    color: var(--bg);
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

/* ===== HEADER ===== */
.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky; /* Закрепляем хедер при скролле */
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: var(--text);
}
.logo { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; }
.site-title { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.2; }
.site-sub { margin: 0; font-size: 13px; color: var(--muted); }

/* Navigation & Mobile Toggle Logic */
.nav-wrapper { position: relative; }
.nav-toggle { display: none; /* Скрыта на десктопе */ background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); padding: 4px; }

.nav-list {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 99px;
    transition: background var(--transition), color var(--transition);
}

.nav-list a:hover {
    background: var(--border);
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .nav-toggle { display: block; } /* Показываем бургер */

    .nav-list {
        display: none; /* Скрываем меню по умолчанию */
        position: absolute;
        top: calc(100% + 18px); /* Отступ от хедера */
        right: -12px; /* Выравнивание по правому краю контейнера */
        flex-direction: column;
        background: var(--surface);
        border: 1px solid var(--border);
        padding: 12px;
        border-radius: var(--radius);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        min-width: 200px;
    }
    
    /* Когда добавлен класс .is-open к родителю .nav-wrapper */
    .nav-wrapper.is-open .nav-list {
        display: flex;
    }

    .nav-list a { display: block; width: 100%; }
}

/* actions */
.actions { margin-left: 16px; }
.theme-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: background var(--transition);
}
.theme-btn:hover { background: var(--border); }

/* ===== HERO ===== */
.hero { padding: 80px 0; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.hero-title { margin: 0; font-size: clamp(32px, 5vw, 48px); /* Адаптивный размер шрифта */ line-height: 1.1; font-weight: 900; }
.hero-lead { margin-top: 20px; color: var(--muted); font-size: 18px; max-width: 540px; }
.hero-cta { margin-top: 32px; display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 28px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    font-weight: 700;
    border: 2px solid var(--accent);
    transition: transform var(--transition), opacity var(--transition), background var(--transition), color var(--transition);
    cursor: pointer;
    font-family: inherit; /* Чтобы кнопки-теги наследовали шрифт */
    font-size: 16px;
}

.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.btn.ghost:hover { border-color: var(--accent); background: var(--border); }

.hero-image {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

@media (max-width: 900px){
    .hero { padding: 40px 0; }
    .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero-right { 
        order: -1; /* Картинка сверху на мобильном */ }
    .hero-cta { 
        justify-content: center; 
    }
    
    .hero-lead { 
        margin-left: auto; 
        margin-right: auto; 
    }

    .hero-image { 
        max-height: 400px; 
        object-fit: cover; 
    }
}

/* ===== SECTIONS ===== */
.section { 
    padding: 80px 0; 
}

.section-title { 
    font-size: 28px; 
    margin: 0 0 16px; 
    font-weight: 800; 
}

.section-lead { 
    color: var(--muted); 
    margin: 0 0 40px; 
    font-size: 18px; 
    max-width: 700px; 
}

/* features grid */
.features-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 24px; 
}

.feature {
    background: var(--card);
    padding: 32px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    transition: transform var(--transition);
}

.feature:hover { 
    transform: translateY(-5px); 
}

.feature h4 { 
    margin: 0 0 12px; 
    font-size: 18px; 
}

.feature p { 
    margin: 0; 
    color: var(--muted); 
}

/* menu */
.menu-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 24px; 
}

.menu-card {
    background: var(--card);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    transition: border-color var(--transition);
}
.menu-card:hover { 
    border-color: var(--accent-2); 
}


.menu-img {
    width: 100%;
    height: 220px; 
    object-fit: cover; 
    border-radius: 12px;
    margin-bottom: 16px;
}

.menu-card h4 { 
    margin: 0 0 8px; font-size: 18px; 
}

.price { 
    font-weight: 800; 
    color: var(--accent-2); 
    font-size: 20px; 
    margin: 0; 
}

.form-group { 
    width: 100%; 
}

.grid-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: end; 
}

.grid-form input, .grid-form select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    transition: border-color var(--transition);
    appearance: none; 
}

.grid-form select {
    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;
    padding-right: 40px;
}

.grid-form input:focus, .grid-form select:focus {
    outline: none;
    border-color: var(--accent-2);
}

.form-submit-btn {
    grid-column: span 3;
    width: 100%;
}

@media (max-width: 768px){
    .grid-form { 
        grid-template-columns: 1fr;
    }
    .form-submit-btn { 
        grid-column: 1; 
    }
}

/* notice */
.notice {
    margin-top: 24px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(34,197,94,0.1);
    color: #15803d;
    border: 1px solid rgba(34,197,94,0.2);
    font-weight: 600;
    text-align: center;
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn { 
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    } to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

/* contacts */
.contact-list {
    list-style: none;
    padding: 0;
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap; /* Разрешаем перенос на новые строки */
    gap: 16px 24px; /* Разные отступы по вертикали и горизонтали */
}
.contact-list a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color var(--transition);
}
.contact-list a:hover { 
    color: var(--accent-2); 
}

/* footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 80px;
    text-align: center;
    font-size: 14px;
}

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

@media (max-width: 600px){ 
    .footer-inner{ 
        flex-direction: column; 
        gap: 8px; 
    } 
}

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

/* ===== DARK MODE ADJUSTMENTS ===== */
:root.dark .btn.ghost { 
    border-color: var(--border); 
    color: var(--text); 
}

:root.dark .btn.ghost:hover { 
    background: var(--border); 
}

:root.dark .hero-image { 
    box-shadow: 0 20px 40px rgba(0,0,0,0.5); 
}