/* ==============================
   HEADER
   ============================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
    /* Frosted glass: светлый кремовый фон с прозрачностью + размытие + насыщение */
    background: rgba(246, 239, 227, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    /* Граница снизу прозрачна в покое — появляется только при скролле */
    border-bottom: 1px solid transparent;
    /* Безопасная зона для iPhone с челкой и других устройств */
    padding-top: env(safe-area-inset-top, 0);
    /* Плавная производительность скролла */
    will-change: background-color;
}

/* Декоративная золотая линия с центральным акцентом — появляется при скролле */
.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, rgba(180, 92, 63, 0.45) 35%, var(--gold) 50%, rgba(180, 92, 63, 0.45) 65%, transparent 100%);
    transition: width 0.6s ease;
    pointer-events: none;
}

/* При скролле — фон плотнее, граница ярче */
.header.scrolled {
    background: rgba(246, 239, 227, 0.94);
    border-bottom-color: rgba(180, 92, 63, 0.28);
}

.header.scrolled::after {
    width: 70%;
}

.nav {
    display: flex;
    align-items: center;
    gap: 44px;
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Логотип слева, меню и кнопка — единой группой справа */
.nav > .logo {
    margin-right: auto;
}

/* CTA в шапке — контурная «пилюля»: не спорит с главной кнопкой в hero */
.nav .btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid rgba(158, 98, 71, 0.55);
    border-radius: 40px;
    padding: 11px 28px;
}

.nav .btn-outline:hover {
    background: var(--gold);
    color: var(--emerald-deep);
    border-color: var(--gold);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(158, 98, 71, 0.22);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    line-height: 1;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--emerald-deep);
    border-radius: 9px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(180, 92, 63, 0.26);
}

.logo-mark svg {
    width: 20px;
    height: 20px;
    display: block;
}

.logo-text-wrap {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
}

.logo-text {
    color: var(--cream);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.logo-sub {
    color: var(--gold);
    font-size: 10.5px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.03em;
    position: relative;
    padding: 6px 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    transition: width 0.4s ease;
}

.nav-link:hover {
    color: var(--gold);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--gold);
}

.nav-link.active::after {
    width: 100%;
    background: var(--gold);
}

.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gold);
    transition: all 0.3s ease;
}
