/* ══════════════════════════════════════
   ARTISAN'S TABLE - Header & Footer
   ══════════════════════════════════════ */

/* ── HEADER ── */
header {
  position: fixed; top:0; left:0; right:0; z-index:400;
  display: flex; align-items:center; justify-content:space-between;
  padding: 28px 60px;
  padding-top: max(28px, env(safe-area-inset-top, 0px));
  transition: background .4s, padding .4s, border-color .4s;
  overflow: visible;
}
/* В начале страницы: белая шапка, плавный переход в hero */
header.light {
  background: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
header.light nav a { color: var(--ink); opacity: .9; font-weight: 500; }
header.light nav a:hover { opacity: 1; color: var(--rust); }
header.light .btn-nav { border-color: var(--rust); color: var(--rust)!important; }
header.light .btn-nav:hover { background: var(--rust); color: #fff!important; border-color: var(--rust); }
header.light .burger { color: var(--ink); }
header.scrolled {
  background: #fff;
  padding: 20px 60px;
  padding-top: max(20px, env(safe-area-inset-top, 0px));
  border-bottom: 1px solid rgba(0,0,0,.06);
}

/* Ссылка с логотипом - выравнивание по центру по вертикали */
header > a:first-child {
  color: inherit;
  line-height: 0;
  display: flex;
  align-items: center;
}

.logo {
  height: 64px;
  width: auto;
  max-width: 240px;
  display: block;
  vertical-align: middle;
  filter: none !important;
  opacity: 1 !important;
  isolation: isolate;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: normal;
}
/* На светлой шапке - логотип чётко виден, без смешивания с фоном */
header.light .logo {
  mix-blend-mode: normal;
  filter: none;
}

nav { display:flex; align-items:center; gap:44px; }

nav a {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: inherit;
  opacity: .7;
  font-weight: 400;
  transition: opacity .2s, color .2s;
}
nav a:hover { opacity:1; color:var(--rust); }

/* Light mode (over hero) - теперь светлая шапка с тёмным текстом, см. выше */

.btn-nav {
  padding: 10px 24px;
  border: 1.5px solid var(--rust);
  border-radius: 40px;
  color: var(--rust)!important;
  opacity: 1!important;
  font-weight: 500;
  transition: all .25s;
}
.btn-nav:hover { background: var(--rust); color: #fff!important; }

/* Mobile hamburger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 12px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  border: none;
  background: transparent;
}
.burger span { width:22px; height:1.5px; background:currentColor; display:block; transition:all .3s; }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: 300;
  background: rgba(0, 0, 0, 0.35);
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav.open {
  display: flex;
  z-index: 500;
  pointer-events: auto;
}
.mobile-nav-panel {
  width: 100%;
  max-width: 100%;
  min-height: 200px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--cream);
  padding: max(56px, env(safe-area-inset-top)) 24px 32px;
  padding-right: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
  position: relative;
  box-sizing: border-box;
}
body.menu-open #cur {
  display: none !important;
}
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}
.mobile-nav a {
  font-family: var(--font-serif);
  font-size: 38px; font-weight:300;
  color: var(--ink); letter-spacing:-.01em;
  transition: color .2s;
  flex-shrink: 0;
}
@media (max-height: 600px) {
  .mobile-nav a { font-size: 28px; }
  .mobile-nav-panel { gap: 20px; }
}
.mobile-nav a:hover { color:var(--rust); }
.mobile-close {
  position: absolute;
  top: max(20px, env(safe-area-inset-top));
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
  background: none;
  border: none;
  line-height: 1;
  padding: 12px;
  min-width: 44px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

/* ── TICKER ── */
.ticker { background:var(--rust); padding:15px 0; overflow:hidden; }
.ticker-track {
  display:flex; white-space:nowrap;
  animation: ticker 28s linear infinite;
}
.ticker-item {
  display:inline-flex; align-items:center; gap:32px; padding:0 32px;
  font-size:10px; letter-spacing:.22em; text-transform:uppercase;
  color:rgba(255,255,255,.85); font-weight:500; flex-shrink:0;
}
.ticker-dot { width:3px; height:3px; border-radius:50%; background:rgba(255,255,255,.35); }
@keyframes ticker { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ── FOOTER ── */
footer {
  background: var(--ink);
  padding: 52px 60px;
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:20px;
}
.footer-logo { height: 52px; width: auto; object-fit: contain; filter: none; opacity: .9; }
.footer-copy { font-size:11px; color:rgba(255,255,255,.25); letter-spacing:.03em; }
.footer-links { display:flex; gap:24px; }
.footer-links a {
  font-size:11px; letter-spacing:.09em; text-transform:uppercase;
  color:rgba(255,255,255,.25); transition:color .2s;
}
.footer-links a:hover { color:rgba(255,255,255,.6); }

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 350;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--rust);
  background: #fff;
  color: var(--rust);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .3s, visibility .3s, transform .3s, background .25s, color .25s;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--rust);
  color: #fff;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  header, header.scrolled { padding: 12px 22px; padding-top: max(12px, env(safe-area-inset-top, 0px)); }
  header .logo { height: 42px; }
  nav > a:not(.btn-nav) { display:none; }
  .burger { display:flex; }
  footer { padding:40px 22px; flex-direction:column; gap:14px; text-align:center; }
  .footer-links { justify-content:center; }
  .back-to-top { bottom: 20px; right: 20px; width: 44px; height: 44px; }
}
