/* ============================================================
   VIBEFIRE — Site chrome (header / footer / mobile / toast)
   ============================================================ */

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-word { font-family: var(--font-display); font-size: 21px; letter-spacing: .01em; line-height: 1; }
.brand-word b { color: var(--text); font-weight: 400; }
.brand-word i { font-style: normal; }
.brand-mark {
  width: 22px; height: 26px; position: relative; display: inline-block;
  background: var(--fire-grad);
  clip-path: path("M11 0c1 5 6 6 6 12a6 6 0 0 1-12 0c0-2 1-3 1-3 0 2 1 3 2 3 1 0 1-1 1-2 0-4-1-7 1-10Z");
  filter: drop-shadow(0 2px 8px rgba(255,69,0,.55));
  animation: flameFlick 2.8s ease-in-out infinite;
}
@keyframes flameFlick {
  0%,100% { transform: scale(1) rotate(-1deg); }
  50% { transform: scale(1.06) rotate(1.5deg); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 24px;
  height: var(--header-h);
  padding-inline: clamp(16px, 4vw, 36px);
  background: rgba(10,10,10,.55);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2), height var(--dur-2);
}
.site-header.compact { background: rgba(8,8,8,.82); border-bottom-color: var(--line); height: 60px; }

.nav-main { display: flex; gap: 4px; margin-left: 8px; }
.nav-link {
  position: relative; padding: 8px 14px; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap;
  transition: color var(--dur-1) var(--ease), background var(--dur-1);
}
.nav-link:hover { color: var(--text); }
.nav-link.is-current { color: var(--text); }
.nav-link.is-current::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--fire-grad); border-radius: 2px;
}

.nav-side { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  color: var(--muted); border: 1px solid transparent; transition: all var(--dur-1) var(--ease);
}
.icon-btn:hover { color: var(--text); background: rgba(255,255,255,.06); }
.nav-lib {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding-inline: 14px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; color: var(--text-soft); white-space: nowrap;
  border: 1px solid var(--line-2); transition: all var(--dur-1) var(--ease);
}
.nav-lib:hover { border-color: var(--line-fire); color: var(--text); }
.lib-count {
  min-width: 20px; height: 20px; padding-inline: 5px; border-radius: 99px;
  background: var(--fire-grad); color: var(--on-fire); font-size: 12px; font-weight: 800;
  display: inline-grid; place-items: center;
}

/* ---------- Mobile sheet ---------- */
.mobile-sheet {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity var(--dur-2);
}
.mobile-sheet.open { opacity: 1; pointer-events: auto; }
.mobile-sheet-inner {
  position: absolute; top: 0; right: 0; width: min(82vw, 360px); height: 100%;
  background: var(--surface-1); border-left: 1px solid var(--line);
  padding: calc(var(--header-h) + 16px) 22px 22px; display: flex; flex-direction: column; gap: 4px;
  transform: translateX(100%); transition: transform var(--dur-3) var(--ease-out);
  overflow-y: auto;
}
.mobile-sheet.open .mobile-sheet-inner { transform: none; }
.mobile-sheet-inner > a:not(.btn) {
  padding: 15px 8px; font-size: 18px; font-weight: 600; color: var(--text-soft);
  border-bottom: 1px solid var(--line);
}
.mobile-sheet-inner > a:not(.btn):active { color: var(--fire-300); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); padding-top: clamp(56px,7vw,88px); padding-bottom: 36px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot-brand .brand { margin-bottom: 16px; }
.foot-tag { font-size: 15px; line-height: 1.6; margin-bottom: 22px; }
.foot-news { max-width: 320px; }
.foot-news .label { margin-bottom: 8px; display: block; }
.foot-news-row { display: flex; gap: 8px; }
.foot-news-row .input { height: 44px; }
.foot-col h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 16px; font-weight: 700; }
.foot-col a { display: block; padding: 6px 0; font-size: 14.5px; color: var(--muted); transition: color var(--dur-1); }
.foot-col a:hover { color: var(--fire-300); }
.foot-base { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13.5px; flex-wrap: wrap; }
.foot-legal { display: flex; gap: 22px; }
.foot-legal a { color: var(--muted); }
.foot-legal a:hover { color: var(--text); }

/* ---------- Toast ---------- */
.vf-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  z-index: 200; padding: 13px 20px; border-radius: var(--r-pill);
  background: var(--surface-3); border: 1px solid var(--line-fire);
  color: var(--text); font-size: 14.5px; font-weight: 600;
  box-shadow: var(--sh-3), 0 0 24px rgba(255,69,0,.2);
  opacity: 0; transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
  max-width: min(92vw, 420px); text-align: center;
}
.vf-toast.in { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Flames ---------- */
.flames { display: inline-flex; gap: 2px; }
.flame { filter: grayscale(1) brightness(.5); opacity: .5; font-size: 1em; transition: all var(--dur-2) var(--ease); }
.flame.on { filter: none; opacity: 1; }

@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-main { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-base { justify-content: flex-start; }
}
@media (max-width: 460px) {
  .foot-grid { grid-template-columns: 1fr; }
}
