/* =====================================================
   FINCHI – header.css
   Header + Top banner + Fullscreen mobile hamburger menu
   Mobile-first • Sticky • I18N ready
   ===================================================== */

/* ---------------------------
   Top banner
---------------------------- */
.top-banner {
  background: rgba(0, 0, 0, 0.85);
  border-bottom: 1px solid var(--c-border);
  font-size: var(--fs-sm);
}

.banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
}

.banner-left {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.banner-chip {
  color: var(--c-gold);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: var(--fs-xs);
}

.banner-sep {
  color: var(--c-faint);
}

.banner-link {
  color: var(--c-muted);
  transition: color var(--t-fast) var(--ease);
}

.banner-link:hover {
  color: var(--c-text);
}

/* Desktop-only elements */
.lang-switch--desktop {
  display: none;
}

/* ---------------------------
   Main header
---------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 25000;
  isolation: isolate;
  transform: translateZ(0);
  will-change: transform;
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background-color var(--t-med) var(--ease),
    border-color var(--t-med) var(--ease);
}

.site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.92);
  border-bottom-color: var(--c-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

/* ---------------------------
   Brand
---------------------------- */
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-mark {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-sub {
  font-size: var(--fs-xs);
  color: var(--c-faint);
  margin-top: 2px;
}

/* ---------------------------
   Desktop navigation
   (supports both .nav-link and plain <a>)
---------------------------- */
.main-nav {
  display: none;
  gap: var(--sp-4);
}

.main-nav a,
.nav-link {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  position: relative;
  transition: color var(--t-fast) var(--ease);
}

.main-nav a:hover,
.nav-link:hover {
  color: var(--c-text);
}

.main-nav a::after,
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--c-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast) var(--ease);
}

.main-nav a:hover::after,
.nav-link:hover::after {
  transform: scaleX(1);
}

/* ---------------------------
   Header actions
---------------------------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

/* ---------------------------
   Open/Closed status chip
---------------------------- */
.open-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 10px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;

  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: var(--c-text);

  user-select: none;
  white-space: nowrap;
}

.open-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.open-status--open::before {
  background: rgba(80, 220, 140, 0.95);
}

.open-status--closed::before {
  background: rgba(255, 110, 110, 0.95);
}

.open-status--loading {
  opacity: 0.7;
}
/* ---------------------------
   Hamburger button
---------------------------- */
.hamburger {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hamburger-lines {
  width: 22px;
  height: 2px;
  background: var(--c-text);
  position: relative;
}

.hamburger-lines::before,
.hamburger-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  transition: transform var(--t-fast) var(--ease);
}

.hamburger-lines::before {
  top: -7px;
}
.hamburger-lines::after {
  top: 7px;
}

/* ---------------------------
   Mobile menu overlay (fullscreen)
---------------------------- */
.mobile-menu[hidden] {
  display: none;
}

.mobile-menu {
  position: fixed;
  inset: 0;

  width: 100vw;
  height: 100svh;

  z-index: 30000;

  display: flex;
  flex-direction: column;

  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;

  touch-action: none;

  background-color: #000;

  padding-bottom: env(safe-area-inset-bottom);
}

/* Dark overlay for readability */
.mobile-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 0;
}

/* Panel content sits above overlay */
.mobile-menu__panel {
  position: relative;
  z-index: 1;

  width: 100vw;
  height: 100svh;

  overflow: hidden;

  display: flex;
  flex-direction: column;

  padding: var(--sp-5) var(--sp-4);
  background: transparent;
}

.mobile-menu__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;

  background-image: url("../assets/images/finchi-logo.webp");
  background-repeat: no-repeat;
  background-position: center 70%;
  background-size: 92vmin;

  opacity: 0.14;
  filter: brightness(0.98);

  animation: none;

  pointer-events: none;
}

.mobile-menu__panel > * {
  position: relative;
  z-index: 1;
}

.mobile-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
}

.mobile-brand {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.mobile-brand-sub {
  font-size: var(--fs-xs);
  color: var(--c-faint);
}

.mobile-menu__close {
  background: none;
  border: none;
  color: var(--c-text);
  font-size: 20px;
  cursor: pointer;
}

/* ---------------------------
   Language switch (mobile)
---------------------------- */
.lang-switch--mobile {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.lang-btn {
  background: none;
  border: 1px solid var(--c-border);
  padding: 6px 10px;
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
  color: var(--c-muted);
  cursor: pointer;
}

.lang-btn[aria-pressed="true"] {
  border-color: var(--c-orange);
  color: var(--c-text);
}

/* ---------------------------
   Mobile navigation
---------------------------- */
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.mobile-nav a,
.mobile-link {
  font-size: var(--fs-lg);
  color: var(--c-text);
}

/* ---------------------------
   Mobile menu bottom
---------------------------- */
.mobile-menu__bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.mobile-menu__meta {
  font-size: var(--fs-xs);
  color: var(--c-faint);
  text-align: center;
}

/* ---------------------------
   Desktop breakpoint
---------------------------- */
@media (min-width: 1024px) {
  .lang-switch--desktop {
    display: flex;
    gap: var(--sp-2);
  }

  .main-nav {
    display: flex;
  }

  /* hide all mobile-only UI on desktop */
  .hamburger,
  #mobileMenu,
  .lang-switch--mobile {
    display: none;
  }
}

/* =========================
   VISUAL TUNING (header)
   ========================= */

.header {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav a {
  position: relative;
}

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

.nav a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -10px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    rgba(214, 181, 106, 0),
    rgba(214, 181, 106, 0.9),
    rgba(214, 181, 106, 0)
  );
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.22s var(--finchi-ease),
    transform 0.22s var(--finchi-ease);
}

.nav a:hover::after {
  opacity: 0.9;
  transform: translateY(0);
}

/* language switch: a bit more premium */
.lang-switch button,
.lang-switch a {
  border-color: rgba(214, 181, 106, 0.35);
}
.lang-switch button.is-active,
.lang-switch a.is-active {
  background: rgba(214, 181, 106, 0.14);
  border-color: rgba(214, 181, 106, 0.75);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

/* =====================================
   Finchi glow pulse (mobile menu)
===================================== */

.mobile-menu::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;

  background: radial-gradient(
    circle at 50% 70%,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(255, 255, 255, 0.18) 18%,
    rgba(255, 255, 255, 0.08) 32%,
    rgba(255, 255, 255, 0.03) 45%,
    rgba(0, 0, 0, 0) 60%
  );

  animation: finchi-glow-pulse 4.5s ease-in-out infinite;
  pointer-events: none;
}

@media (display-mode: standalone) {
  .site-header {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: none;
  }
}

@keyframes finchi-logo-pulse {
  0% {
    opacity: 0.12;
    filter: brightness(0.95);
  }
  50% {
    opacity: 0.22;
    filter: brightness(1.08);
  }
  100% {
    opacity: 0.12;
    filter: brightness(0.95);
  }
}

/* FINCHI logo pulse – ONLY when hamburger menu is open */
html.is-menu-open .mobile-menu__panel::before {
  animation: finchi-logo-pulse 6.5s ease-in-out infinite;
}
